From c7007a65f8d0573aec6d277a70c56b31b6c36eb1 Mon Sep 17 00:00:00 2001 From: Daniel Loader Date: Tue, 11 Jun 2024 18:29:00 +0100 Subject: [PATCH 1/2] feat: add extraObjects --- charts/openfga/templates/extra-manifests.yaml | 8 ++++++++ charts/openfga/values.yaml | 13 +++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 charts/openfga/templates/extra-manifests.yaml diff --git a/charts/openfga/templates/extra-manifests.yaml b/charts/openfga/templates/extra-manifests.yaml new file mode 100644 index 0000000..d824dc5 --- /dev/null +++ b/charts/openfga/templates/extra-manifests.yaml @@ -0,0 +1,8 @@ +{{ range .Values.extraObjects }} +--- +{{ if typeIs "string" . }} + {{- tpl . $ }} +{{- else }} + {{- tpl (toYaml .) $ }} +{{- end }} +{{ end }} \ No newline at end of file diff --git a/charts/openfga/values.yaml b/charts/openfga/values.yaml index 5222fe7..a844b28 100644 --- a/charts/openfga/values.yaml +++ b/charts/openfga/values.yaml @@ -326,3 +326,16 @@ migrate: helm.sh/hook-delete-policy: "before-hook-creation" labels: {} timeout: + +# -- Array of extra K8s manifests to deploy +## Note: Supports use of custom Helm templates +extraObjects: [] +## Example: Deploying a CloudnativePG Postgres cluster for use with OpenFGA: +# - apiVersion: postgresql.cnpg.io/v1 +# kind: Cluster +# metadata: +# name: openfga +# spec: +# instances: 3 +# storage: +# size: 10Gi From 20c4b5e496d79a77903b88c9bdec7ccf0435f269 Mon Sep 17 00:00:00 2001 From: Daniel Loader Date: Wed, 7 Aug 2024 12:49:55 +0100 Subject: [PATCH 2/2] fix: add schema entry for extra objects --- charts/openfga/values.schema.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/charts/openfga/values.schema.json b/charts/openfga/values.schema.json index 19f5c9b..ce102c8 100644 --- a/charts/openfga/values.schema.json +++ b/charts/openfga/values.schema.json @@ -997,7 +997,14 @@ } } }, - "common": {} + "common": {}, + "extraObjects": { + "type": "array", + "items": { + "type": "object" + }, + "default": [] + } }, "additionalProperties": false }