From 2ec29384d516bb33884b1973b8d7e0ef8b1f4d67 Mon Sep 17 00:00:00 2001 From: ace Date: Sat, 1 Jun 2024 03:41:59 +0300 Subject: [PATCH] postgres-operator: bump to v1.12.0, helm chart v1.12.0 --- postgres-operator/Chart.yaml | 4 +- .../crds/operatorconfigurations.yaml | 12 ++- postgres-operator/crds/postgresqls.yaml | 10 ++- postgres-operator/index.yaml | 82 +++++++------------ postgres-operator/templates/_helpers.tpl | 2 +- .../templates/operatorconfiguration.yaml | 20 ++--- postgres-operator/values.yaml | 18 ++-- 7 files changed, 73 insertions(+), 75 deletions(-) diff --git a/postgres-operator/Chart.yaml b/postgres-operator/Chart.yaml index 44e8885..0e74a45 100644 --- a/postgres-operator/Chart.yaml +++ b/postgres-operator/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: postgres-operator -version: 1.11.0 -appVersion: 1.11.0 +version: 1.12.0 +appVersion: 1.12.0 home: https://github.com/zalando/postgres-operator description: Postgres Operator creates and manages PostgreSQL clusters running in Kubernetes keywords: diff --git a/postgres-operator/crds/operatorconfigurations.yaml b/postgres-operator/crds/operatorconfigurations.yaml index b10be55..40ebd2b 100644 --- a/postgres-operator/crds/operatorconfigurations.yaml +++ b/postgres-operator/crds/operatorconfigurations.yaml @@ -68,7 +68,7 @@ spec: type: string docker_image: type: string - default: "ghcr.io/zalando/spilo-16:3.2-p2" + default: "ghcr.io/zalando/spilo-16:3.2-p3" enable_crd_registration: type: boolean default: true @@ -211,6 +211,9 @@ spec: enable_init_containers: type: boolean default: true + enable_secrets_deletion: + type: boolean + default: true enable_persistent_volume_claim_deletion: type: boolean default: true @@ -281,6 +284,9 @@ spec: oauth_token_secret_name: type: string default: "postgresql-operator" + pdb_master_label_selector: + type: boolean + default: true pdb_name_format: type: string default: "postgres-{cluster}-pdb" @@ -502,7 +508,7 @@ spec: pattern: '^(\d+m|\d+(\.\d{1,3})?)$' logical_backup_docker_image: type: string - default: "registry.opensource.zalan.do/acid/logical-backup:v1.11.0" + default: "ghcr.io/zalando/postgres-operator/logical-backup:v1.12.0" logical_backup_google_application_credentials: type: string logical_backup_job_prefix: @@ -525,6 +531,8 @@ spec: type: string logical_backup_s3_bucket: type: string + logical_backup_s3_bucket_prefix: + type: string logical_backup_s3_endpoint: type: string logical_backup_s3_region: diff --git a/postgres-operator/crds/postgresqls.yaml b/postgres-operator/crds/postgresqls.yaml index fcb278c..0498625 100644 --- a/postgres-operator/crds/postgresqls.yaml +++ b/postgres-operator/crds/postgresqls.yaml @@ -87,10 +87,14 @@ spec: - mountPath - volumeSource properties: + isSubPathExpr: + type: boolean name: type: string mountPath: type: string + subPath: + type: string targetContainers: type: array nullable: true @@ -99,8 +103,6 @@ spec: volumeSource: type: object x-kubernetes-preserve-unknown-fields: true - subPath: - type: string allowedSourceRanges: type: array nullable: true @@ -215,6 +217,8 @@ spec: items: type: object x-kubernetes-preserve-unknown-fields: true + logicalBackupRetention: + type: string logicalBackupSchedule: type: string pattern: '^(\d+|\*)(/\d+)?(\s+(\d+|\*)(/\d+)?){4}$' @@ -632,6 +636,8 @@ spec: required: - size properties: + isSubPathExpr: + type: boolean iops: type: integer selector: diff --git a/postgres-operator/index.yaml b/postgres-operator/index.yaml index c7bbeee..876d521 100644 --- a/postgres-operator/index.yaml +++ b/postgres-operator/index.yaml @@ -2,11 +2,33 @@ apiVersion: v1 entries: postgres-operator: - apiVersion: v2 - appVersion: 1.11.0 - created: "2024-03-14T17:11:54.311938906+01:00" + appVersion: 1.12.0 + created: "2024-05-24T16:33:38.650770727+02:00" description: Postgres Operator creates and manages PostgreSQL clusters running in Kubernetes - digest: f12f5ae9282dd77d37e3bfd0aa47be58ed0b2f02056889d8f1111bdb2b9fe286 + digest: d56e9471096d3e0dfd3a35619bfd8e81895979e95a0cad44eb021335814d19cf + home: https://github.com/zalando/postgres-operator + keywords: + - postgres + - operator + - cloud-native + - patroni + - spilo + maintainers: + - email: opensource@zalando.de + name: Zalando + name: postgres-operator + sources: + - https://github.com/zalando/postgres-operator + urls: + - postgres-operator-1.12.0.tgz + version: 1.12.0 + - apiVersion: v2 + appVersion: 1.11.0 + created: "2024-05-24T16:33:38.644616857+02:00" + description: Postgres Operator creates and manages PostgreSQL clusters running + in Kubernetes + digest: 3914b5e117bda0834f05c9207f007e2ac372864cf6e86dcc2e1362bbe46c14d9 home: https://github.com/zalando/postgres-operator keywords: - postgres @@ -25,7 +47,7 @@ entries: version: 1.11.0 - apiVersion: v2 appVersion: 1.10.1 - created: "2024-03-14T17:11:54.3101439+01:00" + created: "2024-05-24T16:33:38.638769428+02:00" description: Postgres Operator creates and manages PostgreSQL clusters running in Kubernetes digest: cc3baa41753da92466223d0b334df27e79c882296577b404a8e9071411fcf19c @@ -47,7 +69,7 @@ entries: version: 1.10.1 - apiVersion: v2 appVersion: 1.10.0 - created: "2024-03-14T17:11:54.308561116+01:00" + created: "2024-05-24T16:33:38.633634768+02:00" description: Postgres Operator creates and manages PostgreSQL clusters running in Kubernetes digest: 60fc5c8059dfed175d14e1034b40997d9c59d33ec8ea158c0597f7228ab04b51 @@ -69,7 +91,7 @@ entries: version: 1.10.0 - apiVersion: v2 appVersion: 1.9.0 - created: "2024-03-14T17:11:54.3194627+01:00" + created: "2024-05-24T16:33:38.663765707+02:00" description: Postgres Operator creates and manages PostgreSQL clusters running in Kubernetes digest: 64df90c898ca591eb3a330328173ffaadfbf9ddd474d8c42ed143edc9e3f4276 @@ -91,7 +113,7 @@ entries: version: 1.9.0 - apiVersion: v2 appVersion: 1.8.2 - created: "2024-03-14T17:11:54.317846817+01:00" + created: "2024-05-24T16:33:38.658286963+02:00" description: Postgres Operator creates and manages PostgreSQL clusters running in Kubernetes digest: f77ffad2e98b72a621e5527015cf607935d3ed688f10ba4b626435acb9631b5b @@ -111,48 +133,4 @@ entries: urls: - postgres-operator-1.8.2.tgz version: 1.8.2 - - apiVersion: v2 - appVersion: 1.8.1 - created: "2024-03-14T17:11:54.315242584+01:00" - description: Postgres Operator creates and manages PostgreSQL clusters running - in Kubernetes - digest: ee0c3bb6ba72fa4289ba3b1c6060e5b312dd023faba2a61b4cb7d9e5e2cc57a5 - home: https://github.com/zalando/postgres-operator - keywords: - - postgres - - operator - - cloud-native - - patroni - - spilo - maintainers: - - email: opensource@zalando.de - name: Zalando - name: postgres-operator - sources: - - https://github.com/zalando/postgres-operator - urls: - - postgres-operator-1.8.1.tgz - version: 1.8.1 - - apiVersion: v1 - appVersion: 1.8.0 - created: "2024-03-14T17:11:54.313632778+01:00" - description: Postgres Operator creates and manages PostgreSQL clusters running - in Kubernetes - digest: 3ae232cf009e09aa2ad11c171484cd2f1b72e63c59735e58fbe2b6eb842f4c86 - home: https://github.com/zalando/postgres-operator - keywords: - - postgres - - operator - - cloud-native - - patroni - - spilo - maintainers: - - email: opensource@zalando.de - name: Zalando - name: postgres-operator - sources: - - https://github.com/zalando/postgres-operator - urls: - - postgres-operator-1.8.0.tgz - version: 1.8.0 -generated: "2024-03-14T17:11:54.305930529+01:00" +generated: "2024-05-24T16:33:38.62797266+02:00" diff --git a/postgres-operator/templates/_helpers.tpl b/postgres-operator/templates/_helpers.tpl index 0fa4eb8..cb8c69c 100644 --- a/postgres-operator/templates/_helpers.tpl +++ b/postgres-operator/templates/_helpers.tpl @@ -70,8 +70,8 @@ Flatten nested config options when ConfigMap is used as ConfigTarget {{- $list := list }} {{- range $subKey, $subValue := $value }} {{- $list = append $list (printf "%s:%s" $subKey $subValue) }} -{{ $key }}: {{ join "," $list | quote }} {{- end }} +{{ $key }}: {{ join "," $list | quote }} {{- else }} {{ $key }}: {{ $value | quote }} {{- end }} diff --git a/postgres-operator/templates/operatorconfiguration.yaml b/postgres-operator/templates/operatorconfiguration.yaml index 59243ee..b72bfb8 100644 --- a/postgres-operator/templates/operatorconfiguration.yaml +++ b/postgres-operator/templates/operatorconfiguration.yaml @@ -14,7 +14,7 @@ configuration: users: {{ tpl (toYaml .Values.configUsers) . | indent 4 }} major_version_upgrade: -{{ toYaml .Values.configMajorVersionUpgrade | indent 4 }} +{{ tpl (toYaml .Values.configMajorVersionUpgrade) . | indent 4 }} kubernetes: {{- if .Values.podPriorityClassName.name }} pod_priority_class_name: {{ .Values.podPriorityClassName.name }} @@ -23,23 +23,23 @@ configuration: oauth_token_secret_name: {{ template "postgres-operator.fullname" . }} {{ tpl (toYaml .Values.configKubernetes) . | indent 4 }} postgres_pod_resources: -{{ toYaml .Values.configPostgresPodResources | indent 4 }} +{{ tpl (toYaml .Values.configPostgresPodResources) . | indent 4 }} timeouts: -{{ toYaml .Values.configTimeouts | indent 4 }} +{{ tpl (toYaml .Values.configTimeouts) . | indent 4 }} load_balancer: -{{ toYaml .Values.configLoadBalancer | indent 4 }} +{{ tpl (toYaml .Values.configLoadBalancer) . | indent 4 }} aws_or_gcp: -{{ toYaml .Values.configAwsOrGcp | indent 4 }} +{{ tpl (toYaml .Values.configAwsOrGcp) . | indent 4 }} logical_backup: -{{ toYaml .Values.configLogicalBackup | indent 4 }} +{{ tpl (toYaml .Values.configLogicalBackup) . | indent 4 }} debug: -{{ toYaml .Values.configDebug | indent 4 }} +{{ tpl (toYaml .Values.configDebug) . | indent 4 }} teams_api: {{ tpl (toYaml .Values.configTeamsApi) . | indent 4 }} logging_rest_api: -{{ toYaml .Values.configLoggingRestApi | indent 4 }} +{{ tpl (toYaml .Values.configLoggingRestApi) . | indent 4 }} connection_pooler: -{{ toYaml .Values.configConnectionPooler | indent 4 }} +{{ tpl (toYaml .Values.configConnectionPooler) . | indent 4 }} patroni: -{{ toYaml .Values.configPatroni | indent 4 }} +{{ tpl (toYaml .Values.configPatroni) . | indent 4 }} {{- end }} diff --git a/postgres-operator/values.yaml b/postgres-operator/values.yaml index 498efcb..acbda6b 100644 --- a/postgres-operator/values.yaml +++ b/postgres-operator/values.yaml @@ -1,7 +1,7 @@ image: - registry: registry.opensource.zalan.do - repository: acid/postgres-operator - tag: v1.11.0 + registry: ghcr.io + repository: zalando/postgres-operator + tag: v1.12.0 pullPolicy: "IfNotPresent" # Optionally specify an array of imagePullSecrets. @@ -38,7 +38,7 @@ configGeneral: # etcd connection string for Patroni. Empty uses K8s-native DCS. etcd_host: "" # Spilo docker image - docker_image: ghcr.io/zalando/spilo-16:3.2-p2 + docker_image: ghcr.io/zalando/spilo-16:3.2-p3 # key name for annotation to ignore globally configured instance limits # ignore_instance_limits_annotation_key: "" @@ -129,6 +129,8 @@ configKubernetes: enable_finalizers: false # enables initContainers to run actions before Spilo is started enable_init_containers: true + # toggles if operator should delete secrets on cluster deletion + enable_secrets_deletion: true # toggles if operator should delete PVCs on cluster deletion enable_persistent_volume_claim_deletion: true # toggles pod anti affinity on the Postgres pods @@ -169,7 +171,9 @@ configKubernetes: # namespaced name of the secret containing the OAuth2 token to pass to the teams API # oauth_token_secret_name: postgresql-operator - # defines the template for PDB (Pod Disruption Budget) names + # toggle if `spilo-role=master` selector should be added to the PDB (Pod Disruption Budget) + pdb_master_label_selector: true + # defines the template for PDB names pdb_name_format: "postgres-{cluster}-pdb" # specify the PVC retention policy when scaling down and/or deleting persistent_volume_claim_retention_policy: @@ -358,7 +362,7 @@ configLogicalBackup: # logical_backup_memory_request: "" # image for pods of the logical backup job (example runs pg_dumpall) - logical_backup_docker_image: "registry.opensource.zalan.do/acid/logical-backup:v1.11.0" + logical_backup_docker_image: "ghcr.io/zalando/postgres-operator/logical-backup:v1.12.0" # path of google cloud service account json file # logical_backup_google_application_credentials: "" @@ -370,6 +374,8 @@ configLogicalBackup: logical_backup_s3_access_key_id: "" # S3 bucket to store backup results logical_backup_s3_bucket: "my-bucket-url" + # S3 bucket prefix to use + logical_backup_s3_bucket_prefix: "spilo" # S3 region of bucket logical_backup_s3_region: "" # S3 endpoint url when not using AWS