From c59a5df23e06740e37d553e77a771040deedfe1e Mon Sep 17 00:00:00 2001 From: Anes Belfodil Date: Sat, 12 Apr 2025 23:23:47 -0400 Subject: [PATCH] Add support for extra objects --- .../postgres-operator/templates/extra-objects.yaml | 8 ++++++++ charts/postgres-operator/values.yaml | 14 ++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 charts/postgres-operator/templates/extra-objects.yaml diff --git a/charts/postgres-operator/templates/extra-objects.yaml b/charts/postgres-operator/templates/extra-objects.yaml new file mode 100644 index 000000000..fc9a76b88 --- /dev/null +++ b/charts/postgres-operator/templates/extra-objects.yaml @@ -0,0 +1,8 @@ +{{ range .Values.extraObjects }} +--- +{{ if typeIs "string" . }} + {{- tpl . $ }} +{{- else }} + {{- tpl (toYaml .) $ }} +{{- end }} +{{ end }} diff --git a/charts/postgres-operator/values.yaml b/charts/postgres-operator/values.yaml index bf94b63d0..febe7dc9a 100644 --- a/charts/postgres-operator/values.yaml +++ b/charts/postgres-operator/values.yaml @@ -544,3 +544,17 @@ controllerID: # The name of the controller ID to use. # If not set and create is true, a name is generated using the fullname template name: + +# -- Array of extra K8s manifests to deploy +## Note: Supports use of custom Helm templates +extraObjects: [] + # - apiVersion: acid.zalan.do/v1 + # kind: postgresql + # metadata: + # name: my-db-cluster + # namespace: default + # spec: + # teamId: my-team + # numberOfInstances: 3 + # preparedDatabases: + # myfirstdb: {}