From 7156445dc28838c8b01f5baf88b9b33058d64caf Mon Sep 17 00:00:00 2001 From: Mayank Shah Date: Wed, 30 Oct 2024 10:54:36 +0530 Subject: [PATCH] update db subchart Signed-off-by: Mayank Shah --- charts/everest/charts/everest-db-namespace/README.md | 1 + .../charts/everest-db-namespace/templates/_helpers.tpl | 9 +++++++-- charts/everest/charts/everest-db-namespace/values.yaml | 3 +++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/charts/everest/charts/everest-db-namespace/README.md b/charts/everest/charts/everest-db-namespace/README.md index f3261bf9..54dc8b8c 100644 --- a/charts/everest/charts/everest-db-namespace/README.md +++ b/charts/everest/charts/everest-db-namespace/README.md @@ -15,6 +15,7 @@ A sub-chart for provisioning Everest DB namespaces. | Key | Type | Default | Description | |-----|------|---------|-------------| | cleanupOnUninstall | bool | `true` | If set, cleans up the DB resources on uninstall. | +| compatibility.openshift | bool | `false` | If set, enable OpenShift compatibility. | | namespaceOverride | string | `""` | Namespace override. Defaults to the value of .Release.Namespace. | | olm.namespace | string | `"everest-olm"` | Namespace where OLM is installed in the cluster. | | pg | bool | `true` | If set, installs the Percona Postgresql Server operator. | diff --git a/charts/everest/charts/everest-db-namespace/templates/_helpers.tpl b/charts/everest/charts/everest-db-namespace/templates/_helpers.tpl index c355a5f5..7931c0e2 100644 --- a/charts/everest/charts/everest-db-namespace/templates/_helpers.tpl +++ b/charts/everest/charts/everest-db-namespace/templates/_helpers.tpl @@ -6,8 +6,13 @@ Allows overriding the install namespace in combined charts. {{- end }} {{/* -Allow overriding OLM namespacse +Allow overriding OLM namespace */}} -{{- define "db.olmNamespace"}} +{{- define "everest.olmNamespace"}} +{{- if .Values.compatibility.openshift }} +{{- "openshift-marketplace" }} +{{- else }} {{- .Values.olm.namespace }} {{- end }} +{{- end }} + diff --git a/charts/everest/charts/everest-db-namespace/values.yaml b/charts/everest/charts/everest-db-namespace/values.yaml index d1423609..56e84c3d 100644 --- a/charts/everest/charts/everest-db-namespace/values.yaml +++ b/charts/everest/charts/everest-db-namespace/values.yaml @@ -1,3 +1,6 @@ +compatibility: + # -- If set, enable OpenShift compatibility. + openshift: false # -- Namespace override. Defaults to the value of .Release.Namespace. namespaceOverride: "" # -- If set, enabled sending telemetry information.