From db3ea20da21379d51fc733b85053614cfee96e7f Mon Sep 17 00:00:00 2001 From: Nurlan Moldomurov Date: Fri, 25 Oct 2024 15:07:53 +0300 Subject: [PATCH 1/4] PMM-7 Fix PMM Helm chart caused by recent changes --- charts/pmm/Chart.yaml | 2 +- charts/pmm/templates/statefulset.yaml | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/charts/pmm/Chart.yaml b/charts/pmm/Chart.yaml index 28c72a6a..410eac38 100644 --- a/charts/pmm/Chart.yaml +++ b/charts/pmm/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: pmm description: A Helm chart for Percona Monitoring and Management (PMM) type: application -version: 1.3.17 +version: 1.3.18 appVersion: "2.43.1" home: https://github.com/percona/pmm maintainers: diff --git a/charts/pmm/templates/statefulset.yaml b/charts/pmm/templates/statefulset.yaml index 36bd5143..2df1e16f 100644 --- a/charts/pmm/templates/statefulset.yaml +++ b/charts/pmm/templates/statefulset.yaml @@ -62,9 +62,13 @@ spec: - secretRef: name: {{ .Values.secret.name }} {{ end }} - # additional secrets that could be used for Grafana iDP - {{ if .Values.secret.create }} env: + - name: PMM_INSTALL_METHOD + valueFrom: + fieldRef: + fieldPath: metadata.annotations['app.kubernetes.io/managed-by'] + {{ if .Values.secret.create }} + # additional secrets that could be used for Grafana iDP - name: GF_AUTH_GENERIC_OAUTH_CLIENT_ID valueFrom: secretKeyRef: @@ -83,11 +87,7 @@ spec: name: {{ .Values.secret.name }} key: PMM_ADMIN_PASSWORD optional: true - {{ end }} - - name: PMM_INSTALL_METHOD - valueFrom: - fieldRef: - fieldPath: metadata.annotations['app.kubernetes.io/managed-by'] + {{ end }} ports: - name: http containerPort: 80 From ef6641c6261e56d0bacde90a3e7965a498d27e84 Mon Sep 17 00:00:00 2001 From: Nurlan Moldomurov Date: Fri, 25 Oct 2024 15:38:07 +0300 Subject: [PATCH 2/4] PMM-7 Update PMM version to 2.43.2 --- charts/pmm/Chart.yaml | 4 ++-- charts/pmm/README.md | 2 +- charts/pmm/values.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/pmm/Chart.yaml b/charts/pmm/Chart.yaml index 410eac38..e92d2bec 100644 --- a/charts/pmm/Chart.yaml +++ b/charts/pmm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: pmm description: A Helm chart for Percona Monitoring and Management (PMM) type: application -version: 1.3.18 -appVersion: "2.43.1" +version: 1.3.19 +appVersion: "2.43.2" home: https://github.com/percona/pmm maintainers: - name: tplavcic diff --git a/charts/pmm/README.md b/charts/pmm/README.md index 46f46367..565da290 100644 --- a/charts/pmm/README.md +++ b/charts/pmm/README.md @@ -45,7 +45,7 @@ It removes all of the resources associated with the last release of the chart as | ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |----------------------| | `image.repository` | PMM image repository | `percona/pmm-server` | | `image.pullPolicy` | PMM image pull policy | `IfNotPresent` | -| `image.tag` | PMM image tag (immutable tags are recommended) | `2.43.1` | +| `image.tag` | PMM image tag (immutable tags are recommended) | `2.43.2` | | `image.imagePullSecrets` | Global Docker registry secret names as an array | `[]` | | `pmmEnv.DISABLE_UPDATES` | Disables a periodic check for new PMM versions as well as ability to apply upgrades using the UI (need to be disabled in k8s environment as updates rolled with helm/container update) | `1` | | `pmmResources` | optional [Resources](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) requested for [PMM container](https://docs.percona.com/percona-monitoring-and-management/setting-up/server/index.html#set-up-pmm-server) | `{}` | diff --git a/charts/pmm/values.yaml b/charts/pmm/values.yaml index 1d1b033f..0c6912cc 100644 --- a/charts/pmm/values.yaml +++ b/charts/pmm/values.yaml @@ -14,7 +14,7 @@ image: repository: percona/pmm-server pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: "2.43.1" + tag: "2.43.2" imagePullSecrets: [] ## PMM environment variables From 5fdda0b01c1b5b1b6d8d84d0ec5303153f1db0cb Mon Sep 17 00:00:00 2001 From: Nurlan Moldomurov Date: Fri, 25 Oct 2024 20:52:10 +0300 Subject: [PATCH 3/4] PMM-7 Don't mount secret if secret name isn't passed --- charts/pmm/templates/statefulset.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/pmm/templates/statefulset.yaml b/charts/pmm/templates/statefulset.yaml index 2df1e16f..38abbdf2 100644 --- a/charts/pmm/templates/statefulset.yaml +++ b/charts/pmm/templates/statefulset.yaml @@ -58,7 +58,7 @@ spec: - configMapRef: name: {{ include "pmm.fullname" . }} optional: true - {{ if not .Values.secret.create }} + {{ if not .Values.secret.create and .Values.secret.name }} - secretRef: name: {{ .Values.secret.name }} {{ end }} From 675266a55c401e21f6ceac4b4932e0675400dfc3 Mon Sep 17 00:00:00 2001 From: Nurlan Moldomurov Date: Thu, 31 Oct 2024 13:40:18 +0300 Subject: [PATCH 4/4] PMM-7 Fix linter --- charts/pmm/templates/statefulset.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/pmm/templates/statefulset.yaml b/charts/pmm/templates/statefulset.yaml index 38abbdf2..b54ef312 100644 --- a/charts/pmm/templates/statefulset.yaml +++ b/charts/pmm/templates/statefulset.yaml @@ -58,7 +58,7 @@ spec: - configMapRef: name: {{ include "pmm.fullname" . }} optional: true - {{ if not .Values.secret.create and .Values.secret.name }} + {{ if and (not .Values.secret.create) .Values.secret.name }} - secretRef: name: {{ .Values.secret.name }} {{ end }}