Merge branch 'master' into cluster-status-map2

This commit is contained in:
Felix Kunde 2019-05-07 13:53:04 +02:00
commit 8f9dfffef1
6 changed files with 22 additions and 10 deletions

View File

@ -21,7 +21,7 @@ config:
debug_logging: "true" debug_logging: "true"
workers: "4" workers: "4"
docker_image: registry.opensource.zalan.do/acid/spilo-cdp-10:1.5-p35 docker_image: registry.opensource.zalan.do/acid/spilo-cdp-11:1.5-p70
secret_name_template: '{username}.{cluster}.credentials' secret_name_template: '{username}.{cluster}.credentials'
super_username: postgres super_username: postgres
enable_teams_api: "false" enable_teams_api: "false"
@ -37,6 +37,7 @@ config:
# pam_role_name: zalandos # pam_role_name: zalandos
# pam_configuration: | # pam_configuration: |
# https://info.example.com/oauth2/tokeninfo?access_token= uid realm=/employees # https://info.example.com/oauth2/tokeninfo?access_token= uid realm=/employees
# inherited_labels: ""
aws_region: eu-central-1 aws_region: eu-central-1
db_hosted_zone: db.example.com db_hosted_zone: db.example.com
master_dns_name_format: '{cluster}.{team}.staging.{hostedzone}' master_dns_name_format: '{cluster}.{team}.staging.{hostedzone}'
@ -58,7 +59,9 @@ config:
resource_check_interval: 3s resource_check_interval: 3s
resource_check_timeout: 10m resource_check_timeout: 10m
resync_period: 5m resync_period: 5m
pod_management_policy: "ordered_ready"
enable_pod_antiaffinity: "false"
pod_antiaffinity_topology_key: "kubernetes.io/hostname"
rbac: rbac:
# Specifies whether RBAC resources should be created # Specifies whether RBAC resources should be created
create: true create: true

View File

@ -32,16 +32,19 @@ kubectl create -f manifests/postgres-operator.yaml # deployment
## Helm chart ## Helm chart
Another possibility is using a provided [Helm](https://helm.sh/) chart which Alternatively, the operator can be installed by using the provided [Helm](https://helm.sh/)
saves you these steps. Therefore, you would need to install the helm CLI on your chart which saves you the manual steps. Therefore, you would need to install
machine. After initializing helm (and its server component Tiller) in your local the helm CLI on your machine. After initializing helm (and its server
cluster you can install the operator chart. component Tiller) in your local cluster you can install the operator chart.
You can define a release name that is prepended to the operator resource's
names. Use `--name zalando` to match with the default service account name
as older operator versions do not support custom names for service accounts.
```bash ```bash
# 1) initialize helm # 1) initialize helm
helm init helm init
# 2) install postgres-operator chart # 2) install postgres-operator chart
helm install --name postgres-operator ./charts/postgres-operator helm install --name zalando ./charts/postgres-operator
``` ```
## Create a Postgres cluster ## Create a Postgres cluster

View File

@ -10,7 +10,7 @@ data:
debug_logging: "true" debug_logging: "true"
workers: "4" workers: "4"
docker_image: registry.opensource.zalan.do/acid/spilo-11:1.5-p4 docker_image: registry.opensource.zalan.do/acid/spilo-cdp-11:1.5-p70
pod_service_account_name: "zalando-postgres-operator" pod_service_account_name: "zalando-postgres-operator"
secret_name_template: '{username}.{cluster}.credentials' secret_name_template: '{username}.{cluster}.credentials'
super_username: postgres super_username: postgres
@ -30,6 +30,7 @@ data:
# pam_role_name: zalandos # pam_role_name: zalandos
# pam_configuration: | # pam_configuration: |
# https://info.example.com/oauth2/tokeninfo?access_token= uid realm=/employees # https://info.example.com/oauth2/tokeninfo?access_token= uid realm=/employees
# inherited_labels: ""
aws_region: eu-central-1 aws_region: eu-central-1
db_hosted_zone: db.example.com db_hosted_zone: db.example.com
master_dns_name_format: '{cluster}.{team}.staging.{hostedzone}' master_dns_name_format: '{cluster}.{team}.staging.{hostedzone}'

View File

@ -35,6 +35,9 @@ configuration:
# toleration: {} # toleration: {}
# infrastructure_roles_secret_name: "" # infrastructure_roles_secret_name: ""
# pod_environment_configmap: "" # pod_environment_configmap: ""
pod_management_policy: "ordered_ready"
enable_pod_antiaffinity: "false"
pod_antiaffinity_topology_key: "kubernetes.io/hostname"
postgres_pod_resources: postgres_pod_resources:
default_cpu_request: 100m default_cpu_request: 100m
default_memory_request: 100Mi default_memory_request: 100Mi

View File

@ -62,8 +62,9 @@ type KubernetesMetaConfiguration struct {
PodEnvironmentConfigMap string `json:"pod_environment_configmap,omitempty"` PodEnvironmentConfigMap string `json:"pod_environment_configmap,omitempty"`
PodPriorityClassName string `json:"pod_priority_class_name,omitempty"` PodPriorityClassName string `json:"pod_priority_class_name,omitempty"`
MasterPodMoveTimeout time.Duration `json:"master_pod_move_timeout,omitempty"` MasterPodMoveTimeout time.Duration `json:"master_pod_move_timeout,omitempty"`
EnablePodAntiAffinity bool `json:"enable_pod_antiaffinity" default:"false"` EnablePodAntiAffinity bool `json:"enable_pod_antiaffinity,omitempty"`
PodAntiAffinityTopologyKey string `name:"pod_antiaffinity_topology_key" default:"kubernetes.io/hostname"` PodAntiAffinityTopologyKey string `json:"pod_antiaffinity_topology_key,omitempty"`
PodManagementPolicy string `json:"pod_management_policy,omitempty"`
} }
// PostgresPodResourcesDefaults defines the spec of default resources // PostgresPodResourcesDefaults defines the spec of default resources

View File

@ -53,6 +53,7 @@ func (c *Controller) importConfigurationFromCRD(fromCRD *acidv1.OperatorConfigur
result.ClusterNameLabel = fromCRD.Kubernetes.ClusterNameLabel result.ClusterNameLabel = fromCRD.Kubernetes.ClusterNameLabel
result.NodeReadinessLabel = fromCRD.Kubernetes.NodeReadinessLabel result.NodeReadinessLabel = fromCRD.Kubernetes.NodeReadinessLabel
result.PodPriorityClassName = fromCRD.Kubernetes.PodPriorityClassName result.PodPriorityClassName = fromCRD.Kubernetes.PodPriorityClassName
result.PodManagementPolicy = fromCRD.Kubernetes.PodManagementPolicy
result.MasterPodMoveTimeout = fromCRD.Kubernetes.MasterPodMoveTimeout result.MasterPodMoveTimeout = fromCRD.Kubernetes.MasterPodMoveTimeout
result.EnablePodAntiAffinity = fromCRD.Kubernetes.EnablePodAntiAffinity result.EnablePodAntiAffinity = fromCRD.Kubernetes.EnablePodAntiAffinity