From 28d5aa34d6f134feb7609ceec831b953a004c753 Mon Sep 17 00:00:00 2001 From: Mayank Shah Date: Tue, 29 Oct 2024 15:26:07 +0530 Subject: [PATCH 1/8] Openshift support Signed-off-by: Mayank Shah --- charts/everest/templates/_helpers.tpl | 6 +++++- .../{everest-olm => }/everest-catalogsource.yaml | 0 .../everest-olm/catalog-operator.deployment.yaml | 2 ++ .../everest/templates/everest-olm/certs.certmanager.yaml | 2 ++ charts/everest/templates/everest-olm/clusterrole.yaml | 2 ++ .../everest/templates/everest-olm/clusterrolebinding.yaml | 2 ++ charts/everest/templates/everest-olm/namespace.yaml | 2 ++ .../templates/everest-olm/olm-operator.deployment.yaml | 2 ++ charts/everest/templates/everest-olm/olmconfig.yaml | 2 ++ charts/everest/templates/everest-olm/operatorgroup.yaml | 8 -------- .../templates/everest-olm/packageserver.apiservice.yaml | 2 ++ .../templates/everest-olm/packageserver.deployment.yaml | 2 ++ .../everest/templates/everest-olm/packageserver.rbac.yaml | 2 ++ .../templates/everest-olm/packageserver.service.yaml | 2 ++ charts/everest/templates/everest-olm/serviceaccount.yaml | 2 ++ charts/everest/values.yaml | 5 +++++ 16 files changed, 34 insertions(+), 9 deletions(-) rename charts/everest/templates/{everest-olm => }/everest-catalogsource.yaml (100%) delete mode 100644 charts/everest/templates/everest-olm/operatorgroup.yaml diff --git a/charts/everest/templates/_helpers.tpl b/charts/everest/templates/_helpers.tpl index 1cf6b2a7..99b49a0f 100644 --- a/charts/everest/templates/_helpers.tpl +++ b/charts/everest/templates/_helpers.tpl @@ -16,9 +16,13 @@ Allows overriding the install namespace in combined charts. Allow overriding OLM namespace */}} {{- define "everest.olmNamespace"}} +{{- if .Values.compatibility.openshift }} +{{- "openshift-marketplace" }} +{{- else }} {{- .Values.olm.namespace }} {{- end }} - +{{- end }} + {{/* Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). diff --git a/charts/everest/templates/everest-olm/everest-catalogsource.yaml b/charts/everest/templates/everest-catalogsource.yaml similarity index 100% rename from charts/everest/templates/everest-olm/everest-catalogsource.yaml rename to charts/everest/templates/everest-catalogsource.yaml diff --git a/charts/everest/templates/everest-olm/catalog-operator.deployment.yaml b/charts/everest/templates/everest-olm/catalog-operator.deployment.yaml index de84975b..fd11ad9d 100644 --- a/charts/everest/templates/everest-olm/catalog-operator.deployment.yaml +++ b/charts/everest/templates/everest-olm/catalog-operator.deployment.yaml @@ -1,3 +1,4 @@ +{{- if (and (not .Values.compatibility.openshift) .Values.olm.enabled) }} apiVersion: apps/v1 kind: Deployment metadata: @@ -59,3 +60,4 @@ spec: memory: 80Mi nodeSelector: kubernetes.io/os: linux +{{- end }} diff --git a/charts/everest/templates/everest-olm/certs.certmanager.yaml b/charts/everest/templates/everest-olm/certs.certmanager.yaml index d979b73c..21b3d73c 100644 --- a/charts/everest/templates/everest-olm/certs.certmanager.yaml +++ b/charts/everest/templates/everest-olm/certs.certmanager.yaml @@ -1,3 +1,4 @@ +{{- if (and (not .Values.compatibility.openshift) .Values.olm.enabled) }} {{- if eq .Values.olm.packageserver.tls.type "cert-manager"}} {{- $tls := fromYaml (include "olm.certs" .) }} --- @@ -48,3 +49,4 @@ spec: kind: Issuer --- {{- end }} +{{- end }} diff --git a/charts/everest/templates/everest-olm/clusterrole.yaml b/charts/everest/templates/everest-olm/clusterrole.yaml index 13c7abdb..ed4f35ea 100644 --- a/charts/everest/templates/everest-olm/clusterrole.yaml +++ b/charts/everest/templates/everest-olm/clusterrole.yaml @@ -1,3 +1,4 @@ +{{- if (and (not .Values.compatibility.openshift) .Values.olm.enabled) }} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: @@ -39,3 +40,4 @@ rules: - apiGroups: ["packages.operators.coreos.com"] resources: ["packagemanifests", "packagemanifests/icon"] verbs: ["get", "list", "watch"] +{{- end }} diff --git a/charts/everest/templates/everest-olm/clusterrolebinding.yaml b/charts/everest/templates/everest-olm/clusterrolebinding.yaml index 782afb89..554333b0 100644 --- a/charts/everest/templates/everest-olm/clusterrolebinding.yaml +++ b/charts/everest/templates/everest-olm/clusterrolebinding.yaml @@ -1,3 +1,4 @@ +{{- if (and (not .Values.compatibility.openshift) .Values.olm.enabled) }} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: @@ -10,3 +11,4 @@ subjects: - kind: ServiceAccount namespace: {{ include "everest.olmNamespace" . }} name: olm-operator-serviceaccount +{{- end }} diff --git a/charts/everest/templates/everest-olm/namespace.yaml b/charts/everest/templates/everest-olm/namespace.yaml index a7101de6..f480a018 100644 --- a/charts/everest/templates/everest-olm/namespace.yaml +++ b/charts/everest/templates/everest-olm/namespace.yaml @@ -1,4 +1,6 @@ +{{- if (and (not .Values.compatibility.openshift) .Values.olm.enabled) }} apiVersion: v1 kind: Namespace metadata: name: {{ include "everest.olmNamespace" . }} +{{- end }} diff --git a/charts/everest/templates/everest-olm/olm-operator.deployment.yaml b/charts/everest/templates/everest-olm/olm-operator.deployment.yaml index 51e80976..5dfcbf07 100644 --- a/charts/everest/templates/everest-olm/olm-operator.deployment.yaml +++ b/charts/everest/templates/everest-olm/olm-operator.deployment.yaml @@ -1,3 +1,4 @@ +{{- if (and (not .Values.compatibility.openshift) .Values.olm.enabled) }} apiVersion: apps/v1 kind: Deployment metadata: @@ -64,3 +65,4 @@ spec: memory: 160Mi nodeSelector: kubernetes.io/os: linux +{{- end }} diff --git a/charts/everest/templates/everest-olm/olmconfig.yaml b/charts/everest/templates/everest-olm/olmconfig.yaml index ad881b7b..48e2015d 100644 --- a/charts/everest/templates/everest-olm/olmconfig.yaml +++ b/charts/everest/templates/everest-olm/olmconfig.yaml @@ -1,4 +1,6 @@ +{{- if (and (not .Values.compatibility.openshift) .Values.olm.enabled) }} apiVersion: operators.coreos.com/v1 kind: OLMConfig metadata: name: cluster +{{- end }} diff --git a/charts/everest/templates/everest-olm/operatorgroup.yaml b/charts/everest/templates/everest-olm/operatorgroup.yaml deleted file mode 100644 index 3ec436ee..00000000 --- a/charts/everest/templates/everest-olm/operatorgroup.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: operators.coreos.com/v1 -kind: OperatorGroup -metadata: - name: olm-operators - namespace: {{ include "everest.olmNamespace" . }} -spec: - targetNamespaces: - - {{ include "everest.olmNamespace" . }} diff --git a/charts/everest/templates/everest-olm/packageserver.apiservice.yaml b/charts/everest/templates/everest-olm/packageserver.apiservice.yaml index bbdca1a3..e1946feb 100644 --- a/charts/everest/templates/everest-olm/packageserver.apiservice.yaml +++ b/charts/everest/templates/everest-olm/packageserver.apiservice.yaml @@ -1,3 +1,4 @@ +{{- if (and (not .Values.compatibility.openshift) .Values.olm.enabled) }} {{- $tls := fromYaml (include "olm.certs" .) }} {{- $apiService := (lookup "apiregistration.k8s.io/v1" "APIService" "" "v1.packages.operators.coreos.com") -}} {{- $secret := (lookup "v1" "Secret" (include "everest.olmNamespace" .) "packageserver-service-cert") -}} @@ -44,3 +45,4 @@ metadata: namespace: {{ include "everest.olmNamespace" . }} type: kubernetes.io/tls {{- end }} +{{- end }} diff --git a/charts/everest/templates/everest-olm/packageserver.deployment.yaml b/charts/everest/templates/everest-olm/packageserver.deployment.yaml index 72bd3594..147e899e 100644 --- a/charts/everest/templates/everest-olm/packageserver.deployment.yaml +++ b/charts/everest/templates/everest-olm/packageserver.deployment.yaml @@ -1,3 +1,4 @@ +{{- if (and (not .Values.compatibility.openshift) .Values.olm.enabled) }} apiVersion: apps/v1 kind: Deployment metadata: @@ -107,3 +108,4 @@ spec: - key: tls.key path: tls.key secretName: packageserver-service-cert +{{- end }} diff --git a/charts/everest/templates/everest-olm/packageserver.rbac.yaml b/charts/everest/templates/everest-olm/packageserver.rbac.yaml index bd23a1ec..8bbe8bf0 100644 --- a/charts/everest/templates/everest-olm/packageserver.rbac.yaml +++ b/charts/everest/templates/everest-olm/packageserver.rbac.yaml @@ -1,3 +1,4 @@ +{{- if (and (not .Values.compatibility.openshift) .Values.olm.enabled) }} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: @@ -44,3 +45,4 @@ subjects: - kind: ServiceAccount name: olm-operator-serviceaccount namespace: {{ include "everest.olmNamespace" . }} +{{- end }} diff --git a/charts/everest/templates/everest-olm/packageserver.service.yaml b/charts/everest/templates/everest-olm/packageserver.service.yaml index 669f9b8b..f7342f5a 100644 --- a/charts/everest/templates/everest-olm/packageserver.service.yaml +++ b/charts/everest/templates/everest-olm/packageserver.service.yaml @@ -1,3 +1,4 @@ +{{- if (and (not .Values.compatibility.openshift) .Values.olm.enabled) }} apiVersion: v1 kind: Service metadata: @@ -13,3 +14,4 @@ spec: selector: app: packageserver type: ClusterIP +{{- end }} diff --git a/charts/everest/templates/everest-olm/serviceaccount.yaml b/charts/everest/templates/everest-olm/serviceaccount.yaml index 90d16ead..e4bfe737 100644 --- a/charts/everest/templates/everest-olm/serviceaccount.yaml +++ b/charts/everest/templates/everest-olm/serviceaccount.yaml @@ -1,5 +1,7 @@ +{{- if (and (not .Values.compatibility.openshift) .Values.olm.enabled) }} kind: ServiceAccount apiVersion: v1 metadata: name: olm-operator-serviceaccount namespace: {{ include "everest.olmNamespace" . }} +{{- end }} diff --git a/charts/everest/values.yaml b/charts/everest/values.yaml index da785e75..2caadafc 100644 --- a/charts/everest/values.yaml +++ b/charts/everest/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. @@ -44,6 +47,8 @@ upgrade: # It is strongly recommended to enable this setting. preflightChecks: true olm: + # -- If set, installs OLM in the provided namespace. + enabled: false # -- Namespace where OLM is installed. Do no change unless you know what you are doing. namespace: everest-olm # -- Image to use for Everest CatalogSource. From b4d314f5150dbc68ac5514bdfff6e2928320d25d Mon Sep 17 00:00:00 2001 From: Mayank Shah Date: Tue, 29 Oct 2024 16:28:29 +0530 Subject: [PATCH 2/8] Update docs Signed-off-by: Mayank Shah --- charts/everest/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/charts/everest/README.md b/charts/everest/README.md index 1ef463fe..d19c8d0c 100644 --- a/charts/everest/README.md +++ b/charts/everest/README.md @@ -63,10 +63,12 @@ The following table shows the configurable parameters of the Percona Everest cha | Key | Type | Default | Description | |-----|------|---------|-------------| +| compatibility.openshift | bool | `false` | If set, enable OpenShift compatibility. | | everest-db-namespace.enabled | bool | `false` | Do not enable. | | monitoring.namespace | string | `"everest-monitoring"` | Namespace where monitoring is installed. Do no change unless you know what you are doing. | | namespaceOverride | string | `""` | Namespace override. Defaults to the value of .Release.Namespace. | | olm.catalogSourceImage | string | `"perconalab/everest-catalog"` | Image to use for Everest CatalogSource. | +| olm.enabled | bool | `false` | If set, installs OLM in the provided namespace. | | olm.image | string | `"quay.io/operator-framework/olm@sha256:1b6002156f568d722c29138575733591037c24b4bfabc67946f268ce4752c3e6"` | Image to use for the OLM components. | | olm.namespace | string | `"everest-olm"` | Namespace where OLM is installed. Do no change unless you know what you are doing. | | olm.packageserver.tls.caCert | string | `""` | CA certificate for the PackageServer APIService. Overrides the tls.type setting. | From b30697a9bfac46a54fda66fa45eaa66426ed5494 Mon Sep 17 00:00:00 2001 From: Mayank Shah Date: Wed, 30 Oct 2024 10:51:29 +0530 Subject: [PATCH 3/8] update flag Signed-off-by: Mayank Shah --- charts/everest/README.md | 2 +- .../templates/everest-olm/catalog-operator.deployment.yaml | 2 +- charts/everest/templates/everest-olm/certs.certmanager.yaml | 2 +- charts/everest/templates/everest-olm/clusterrole.yaml | 2 +- charts/everest/templates/everest-olm/clusterrolebinding.yaml | 2 +- charts/everest/templates/everest-olm/namespace.yaml | 2 +- .../everest/templates/everest-olm/olm-operator.deployment.yaml | 2 +- charts/everest/templates/everest-olm/olmconfig.yaml | 2 +- .../everest/templates/everest-olm/packageserver.apiservice.yaml | 2 +- .../everest/templates/everest-olm/packageserver.deployment.yaml | 2 +- charts/everest/templates/everest-olm/packageserver.rbac.yaml | 2 +- charts/everest/templates/everest-olm/packageserver.service.yaml | 2 +- charts/everest/templates/everest-olm/serviceaccount.yaml | 2 +- charts/everest/values.yaml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/charts/everest/README.md b/charts/everest/README.md index d19c8d0c..79ed9cf6 100644 --- a/charts/everest/README.md +++ b/charts/everest/README.md @@ -68,8 +68,8 @@ The following table shows the configurable parameters of the Percona Everest cha | monitoring.namespace | string | `"everest-monitoring"` | Namespace where monitoring is installed. Do no change unless you know what you are doing. | | namespaceOverride | string | `""` | Namespace override. Defaults to the value of .Release.Namespace. | | olm.catalogSourceImage | string | `"perconalab/everest-catalog"` | Image to use for Everest CatalogSource. | -| olm.enabled | bool | `false` | If set, installs OLM in the provided namespace. | | olm.image | string | `"quay.io/operator-framework/olm@sha256:1b6002156f568d722c29138575733591037c24b4bfabc67946f268ce4752c3e6"` | Image to use for the OLM components. | +| olm.install | bool | `true` | If set, installs OLM in the provided namespace. | | olm.namespace | string | `"everest-olm"` | Namespace where OLM is installed. Do no change unless you know what you are doing. | | olm.packageserver.tls.caCert | string | `""` | CA certificate for the PackageServer APIService. Overrides the tls.type setting. | | olm.packageserver.tls.tlsCert | string | `""` | Client certificate for the PackageServer APIService. Overrides the tls.type setting. | diff --git a/charts/everest/templates/everest-olm/catalog-operator.deployment.yaml b/charts/everest/templates/everest-olm/catalog-operator.deployment.yaml index fd11ad9d..12fb69d8 100644 --- a/charts/everest/templates/everest-olm/catalog-operator.deployment.yaml +++ b/charts/everest/templates/everest-olm/catalog-operator.deployment.yaml @@ -1,4 +1,4 @@ -{{- if (and (not .Values.compatibility.openshift) .Values.olm.enabled) }} +{{- if (and (not .Values.compatibility.openshift) .Values.olm.install) }} apiVersion: apps/v1 kind: Deployment metadata: diff --git a/charts/everest/templates/everest-olm/certs.certmanager.yaml b/charts/everest/templates/everest-olm/certs.certmanager.yaml index 21b3d73c..f1d00482 100644 --- a/charts/everest/templates/everest-olm/certs.certmanager.yaml +++ b/charts/everest/templates/everest-olm/certs.certmanager.yaml @@ -1,4 +1,4 @@ -{{- if (and (not .Values.compatibility.openshift) .Values.olm.enabled) }} +{{- if (and (not .Values.compatibility.openshift) .Values.olm.install) }} {{- if eq .Values.olm.packageserver.tls.type "cert-manager"}} {{- $tls := fromYaml (include "olm.certs" .) }} --- diff --git a/charts/everest/templates/everest-olm/clusterrole.yaml b/charts/everest/templates/everest-olm/clusterrole.yaml index ed4f35ea..9fda73aa 100644 --- a/charts/everest/templates/everest-olm/clusterrole.yaml +++ b/charts/everest/templates/everest-olm/clusterrole.yaml @@ -1,4 +1,4 @@ -{{- if (and (not .Values.compatibility.openshift) .Values.olm.enabled) }} +{{- if (and (not .Values.compatibility.openshift) .Values.olm.install) }} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: diff --git a/charts/everest/templates/everest-olm/clusterrolebinding.yaml b/charts/everest/templates/everest-olm/clusterrolebinding.yaml index 554333b0..352465cd 100644 --- a/charts/everest/templates/everest-olm/clusterrolebinding.yaml +++ b/charts/everest/templates/everest-olm/clusterrolebinding.yaml @@ -1,4 +1,4 @@ -{{- if (and (not .Values.compatibility.openshift) .Values.olm.enabled) }} +{{- if (and (not .Values.compatibility.openshift) .Values.olm.install) }} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: diff --git a/charts/everest/templates/everest-olm/namespace.yaml b/charts/everest/templates/everest-olm/namespace.yaml index f480a018..ee97d0ad 100644 --- a/charts/everest/templates/everest-olm/namespace.yaml +++ b/charts/everest/templates/everest-olm/namespace.yaml @@ -1,4 +1,4 @@ -{{- if (and (not .Values.compatibility.openshift) .Values.olm.enabled) }} +{{- if (and (not .Values.compatibility.openshift) .Values.olm.install) }} apiVersion: v1 kind: Namespace metadata: diff --git a/charts/everest/templates/everest-olm/olm-operator.deployment.yaml b/charts/everest/templates/everest-olm/olm-operator.deployment.yaml index 5dfcbf07..64f026d2 100644 --- a/charts/everest/templates/everest-olm/olm-operator.deployment.yaml +++ b/charts/everest/templates/everest-olm/olm-operator.deployment.yaml @@ -1,4 +1,4 @@ -{{- if (and (not .Values.compatibility.openshift) .Values.olm.enabled) }} +{{- if (and (not .Values.compatibility.openshift) .Values.olm.install) }} apiVersion: apps/v1 kind: Deployment metadata: diff --git a/charts/everest/templates/everest-olm/olmconfig.yaml b/charts/everest/templates/everest-olm/olmconfig.yaml index 48e2015d..c74a427d 100644 --- a/charts/everest/templates/everest-olm/olmconfig.yaml +++ b/charts/everest/templates/everest-olm/olmconfig.yaml @@ -1,4 +1,4 @@ -{{- if (and (not .Values.compatibility.openshift) .Values.olm.enabled) }} +{{- if (and (not .Values.compatibility.openshift) .Values.olm.install) }} apiVersion: operators.coreos.com/v1 kind: OLMConfig metadata: diff --git a/charts/everest/templates/everest-olm/packageserver.apiservice.yaml b/charts/everest/templates/everest-olm/packageserver.apiservice.yaml index e1946feb..0594365a 100644 --- a/charts/everest/templates/everest-olm/packageserver.apiservice.yaml +++ b/charts/everest/templates/everest-olm/packageserver.apiservice.yaml @@ -1,4 +1,4 @@ -{{- if (and (not .Values.compatibility.openshift) .Values.olm.enabled) }} +{{- if (and (not .Values.compatibility.openshift) .Values.olm.install) }} {{- $tls := fromYaml (include "olm.certs" .) }} {{- $apiService := (lookup "apiregistration.k8s.io/v1" "APIService" "" "v1.packages.operators.coreos.com") -}} {{- $secret := (lookup "v1" "Secret" (include "everest.olmNamespace" .) "packageserver-service-cert") -}} diff --git a/charts/everest/templates/everest-olm/packageserver.deployment.yaml b/charts/everest/templates/everest-olm/packageserver.deployment.yaml index 147e899e..5f4885dc 100644 --- a/charts/everest/templates/everest-olm/packageserver.deployment.yaml +++ b/charts/everest/templates/everest-olm/packageserver.deployment.yaml @@ -1,4 +1,4 @@ -{{- if (and (not .Values.compatibility.openshift) .Values.olm.enabled) }} +{{- if (and (not .Values.compatibility.openshift) .Values.olm.install) }} apiVersion: apps/v1 kind: Deployment metadata: diff --git a/charts/everest/templates/everest-olm/packageserver.rbac.yaml b/charts/everest/templates/everest-olm/packageserver.rbac.yaml index 8bbe8bf0..cee123a1 100644 --- a/charts/everest/templates/everest-olm/packageserver.rbac.yaml +++ b/charts/everest/templates/everest-olm/packageserver.rbac.yaml @@ -1,4 +1,4 @@ -{{- if (and (not .Values.compatibility.openshift) .Values.olm.enabled) }} +{{- if (and (not .Values.compatibility.openshift) .Values.olm.install) }} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: diff --git a/charts/everest/templates/everest-olm/packageserver.service.yaml b/charts/everest/templates/everest-olm/packageserver.service.yaml index f7342f5a..da415889 100644 --- a/charts/everest/templates/everest-olm/packageserver.service.yaml +++ b/charts/everest/templates/everest-olm/packageserver.service.yaml @@ -1,4 +1,4 @@ -{{- if (and (not .Values.compatibility.openshift) .Values.olm.enabled) }} +{{- if (and (not .Values.compatibility.openshift) .Values.olm.install) }} apiVersion: v1 kind: Service metadata: diff --git a/charts/everest/templates/everest-olm/serviceaccount.yaml b/charts/everest/templates/everest-olm/serviceaccount.yaml index e4bfe737..7b8a508b 100644 --- a/charts/everest/templates/everest-olm/serviceaccount.yaml +++ b/charts/everest/templates/everest-olm/serviceaccount.yaml @@ -1,4 +1,4 @@ -{{- if (and (not .Values.compatibility.openshift) .Values.olm.enabled) }} +{{- if (and (not .Values.compatibility.openshift) .Values.olm.install) }} kind: ServiceAccount apiVersion: v1 metadata: diff --git a/charts/everest/values.yaml b/charts/everest/values.yaml index 2caadafc..9fdb3ca4 100644 --- a/charts/everest/values.yaml +++ b/charts/everest/values.yaml @@ -48,7 +48,7 @@ upgrade: preflightChecks: true olm: # -- If set, installs OLM in the provided namespace. - enabled: false + install: true # -- Namespace where OLM is installed. Do no change unless you know what you are doing. namespace: everest-olm # -- Image to use for Everest CatalogSource. From 476fec553a012c7b3727c4cddc4a13fdc0dab7b3 Mon Sep 17 00:00:00 2001 From: Mayank Shah Date: Wed, 30 Oct 2024 10:54:36 +0530 Subject: [PATCH 4/8] 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 b8fddbb4..f18f5de3 100644 --- a/charts/everest/charts/everest-db-namespace/README.md +++ b/charts/everest/charts/everest-db-namespace/README.md @@ -26,6 +26,7 @@ Kubernetes: `>= 1.27.0` | 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. From 323d65861a9d2d868a0dd6a5553b841ab01aba13 Mon Sep 17 00:00:00 2001 From: Mayank Shah Date: Thu, 31 Oct 2024 16:14:22 +0530 Subject: [PATCH 5/8] update param and docs Signed-off-by: Mayank Shah --- .../everest/charts/everest-db-namespace/templates/_helpers.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/everest/charts/everest-db-namespace/templates/_helpers.tpl b/charts/everest/charts/everest-db-namespace/templates/_helpers.tpl index 7931c0e2..6c57a710 100644 --- a/charts/everest/charts/everest-db-namespace/templates/_helpers.tpl +++ b/charts/everest/charts/everest-db-namespace/templates/_helpers.tpl @@ -8,7 +8,7 @@ Allows overriding the install namespace in combined charts. {{/* Allow overriding OLM namespace */}} -{{- define "everest.olmNamespace"}} +{{- define "db.olmNamespace"}} {{- if .Values.compatibility.openshift }} {{- "openshift-marketplace" }} {{- else }} From ae40fa4afe2b4f6cfb6ba1f811f54e7cf86f10a8 Mon Sep 17 00:00:00 2001 From: Mayank Shah Date: Tue, 5 Nov 2024 15:38:51 +0530 Subject: [PATCH 6/8] Update deps Signed-off-by: Mayank Shah --- charts/everest/Chart.lock | 6 +++--- charts/everest/charts/common/Chart.yaml | 2 +- charts/everest/charts/common/README.md | 2 +- charts/everest/charts/everest-db-namespace/Chart.lock | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/charts/everest/Chart.lock b/charts/everest/Chart.lock index c99e196e..585b74e8 100644 --- a/charts/everest/Chart.lock +++ b/charts/everest/Chart.lock @@ -1,9 +1,9 @@ dependencies: - name: common repository: file://charts/common - version: 0.0.4 + version: 0.0.5 - name: everest-db-namespace repository: file://charts/everest-db-namespace version: 0.0.0 -digest: sha256:2b5ec4cba791a9062cafe0a4eced850516b1f28b53b32a2f4a6787e9c941cbee -generated: "2024-11-05T14:31:28.077684+05:30" +digest: sha256:de45f56b3032db8bc6e21fc0858bc56d1b8701e7c1edfcc18c61285945235826 +generated: "2024-11-05T15:38:39.638426+05:30" diff --git a/charts/everest/charts/common/Chart.yaml b/charts/everest/charts/common/Chart.yaml index c2d5f526..2c6394c0 100644 --- a/charts/everest/charts/common/Chart.yaml +++ b/charts/everest/charts/common/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: common description: A library chart for Everest containing common resources. type: library -version: 0.0.4 +version: 0.0.5 appVersion: "0.0.3" maintainers: - name: mayankshah1607 diff --git a/charts/everest/charts/common/README.md b/charts/everest/charts/common/README.md index e41150f9..39c30912 100644 --- a/charts/everest/charts/common/README.md +++ b/charts/everest/charts/common/README.md @@ -1,6 +1,6 @@ # common -![Version: 0.0.4](https://img.shields.io/badge/Version-0.0.4-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) ![AppVersion: 0.0.3](https://img.shields.io/badge/AppVersion-0.0.3-informational?style=flat-square) +![Version: 0.0.5](https://img.shields.io/badge/Version-0.0.5-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) ![AppVersion: 0.0.3](https://img.shields.io/badge/AppVersion-0.0.3-informational?style=flat-square) A library chart for Everest containing common resources. diff --git a/charts/everest/charts/everest-db-namespace/Chart.lock b/charts/everest/charts/everest-db-namespace/Chart.lock index 48f447d1..ee6a3496 100644 --- a/charts/everest/charts/everest-db-namespace/Chart.lock +++ b/charts/everest/charts/everest-db-namespace/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: common repository: file://../common - version: 0.0.4 -digest: sha256:d4b492b530b0ae0b3234a3d287a2d3873c99d3dd273c569e82e6eeb83380abc9 -generated: "2024-11-05T14:31:44.457971+05:30" + version: 0.0.5 +digest: sha256:48e19e8a98645cb1215743e87c55cf6ef5bdd8f126cbc498034d98c1770bbb8c +generated: "2024-11-05T15:38:39.892141+05:30" From d870372d865eeaf7176b5cf2bd54ee67fd42d473 Mon Sep 17 00:00:00 2001 From: Mayank Shah Date: Wed, 6 Nov 2024 10:41:12 +0530 Subject: [PATCH 7/8] Update comment Signed-off-by: Mayank Shah --- charts/everest/values.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/charts/everest/values.yaml b/charts/everest/values.yaml index 9fdb3ca4..fab2d2c7 100644 --- a/charts/everest/values.yaml +++ b/charts/everest/values.yaml @@ -1,5 +1,6 @@ compatibility: - # -- If set, enable OpenShift compatibility. + # -- Enable OpenShift compatibility. + # If set, ignores olm.install and olm.namespace settings. openshift: false # -- Namespace override. Defaults to the value of .Release.Namespace. namespaceOverride: "" From 6e8d3c9aceff57f547d159e36c38cb1aff61ce8d Mon Sep 17 00:00:00 2001 From: Mayank Shah Date: Wed, 6 Nov 2024 10:41:34 +0530 Subject: [PATCH 8/8] docs gen Signed-off-by: Mayank Shah --- charts/everest/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/everest/README.md b/charts/everest/README.md index 79ed9cf6..3b0922c2 100644 --- a/charts/everest/README.md +++ b/charts/everest/README.md @@ -63,7 +63,7 @@ The following table shows the configurable parameters of the Percona Everest cha | Key | Type | Default | Description | |-----|------|---------|-------------| -| compatibility.openshift | bool | `false` | If set, enable OpenShift compatibility. | +| compatibility.openshift | bool | `false` | Enable OpenShift compatibility. If set, ignores olm.install and olm.namespace settings. | | everest-db-namespace.enabled | bool | `false` | Do not enable. | | monitoring.namespace | string | `"everest-monitoring"` | Namespace where monitoring is installed. Do no change unless you know what you are doing. | | namespaceOverride | string | `""` | Namespace override. Defaults to the value of .Release.Namespace. |