Use ConfigMap to store operator's config

This commit is contained in:
Murat Kabilov
2017-05-12 11:41:34 +02:00
parent 47e3e29a56
commit da438aab3a
16 changed files with 323 additions and 147 deletions
+29
View File
@@ -0,0 +1,29 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: postgres-operator
data:
service_account_name: operator
cluster_labels: application:spilo
cluster_name_label: version
pod_role_label: spilo-role
db_hosted_zone: db.example.com
dns_name_format: '%s.%s.staging.%s'
docker_image: registry.opensource.zalan.do/acid/spilo-9.6:1.2-p12
etcd_host: etcd-client.default.svc.cluster.local:2379
infrastructure_roles_secret_name: postgresql-infrastructure-roles
oauth_token_secret_name: postgresql-operator
pam_configuration: |
https://info.example.com/oauth2/tokeninfo?access_token= uid realm=/employees
pam_role_name: zalandos
pod_deletion_wait_timeout: 10m
pod_label_wait_timeout: 10m
ready_wait_interval: 3s
ready_wait_timeout: 30s
replication_username: replication
resource_check_interval: 3s
resource_check_timeout: 10m
resync_period: 5m
resync_period_pod: 5m
super_username: postgres
teams_api_url: https://teams.example.com/api/
+3 -43
View File
@@ -14,49 +14,9 @@ spec:
- name: postgres-operator
image: pierone.example.com/acid/postgres-operator:0.1
env:
- name: MY_POD_NAMESPACE #TODO: use PGOP_ prefix
- name: MY_POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: PGOP_SERVICE_ACCOUNT_NAME
valueFrom:
fieldRef:
fieldPath: spec.serviceAccountName
- name: PGOP_READY_WAIT_INTERVAL
value: "3s"
- name: PGOP_READY_WAIT_TIMEOUT
value: "30s"
- name: PGOP_RESYNC_PERIOD
value: "5m"
- name: PGOP_RESYNC_PERIOD_POD
value: "5m"
- name: PGOP_RESOURCE_CHECK_INTERVAL
value: "3s"
- name: PGOP_RESOURCE_CHECK_TIMEOUT
value: "10m"
- name: PGOP_POD_LABEL_WAIT_TIMEOUT
value: "10m"
- name: PGOP_POD_DELETION_WAIT_TIMEOUT
value: "10m"
- name: PGOP_PAM_ROLE_NAME
value: "zalandos"
- name: PGOP_PAM_CONFIGURATION
value: "https://info.example.com/oauth2/tokeninfo?access_token= uid realm=/employees"
- name: PGOP_TEAMS_API_URL
value: "https://teams.example.com/api/"
- name: PGOP_OAUTH_TOKEN_SECRET_NAME
value: "postgresql-operator"
- name: PGOP_SUPER_USERNAME
value: "postgres"
- name: PGOP_REPLICATION_USERNAME
value: "replication"
- name: PGOP_ETCD_HOST
value: "etcd-client.default.svc.cluster.local:2379"
- name: PGOP_DOCKER_IMAGE
value: "registry.opensource.zalan.do/acid/spilo-9.6:1.2-p12"
- name: PGOP_DB_HOSTED_ZONE
value: "db.example.com"
- name: PGOP_DNS_NAME_FORMAT
value: "%s.%s.staging.%s"
- name: PGOP_INFRASTRUCTURE_ROLES_SECRET_NAME
value: "postgresql-infrastructure-roles"
- name: CONFIG_MAP_NAME
value: "postgres-operator"
+1 -1
View File
@@ -2,7 +2,7 @@ apiVersion: "acid.zalan.do/v1"
kind: "Postgresql"
metadata:
name: testcluster
name: acid-testcluster
spec:
teamId: "ACID"
volume: