From 56d7b063bda7f605a7b8576d7020a5d7ff27f8ce Mon Sep 17 00:00:00 2001 From: Alex Lebens Date: Tue, 13 May 2025 20:29:07 -0500 Subject: [PATCH] change helpers --- charts/postgres-cluster/Chart.yaml | 2 +- charts/postgres-cluster/README.md | 2 +- .../postgres-cluster/templates/_helpers.tpl | 22 +++++++++---------- .../templates/scheduled-backup.yaml | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/charts/postgres-cluster/Chart.yaml b/charts/postgres-cluster/Chart.yaml index be6e772..d34b72e 100644 --- a/charts/postgres-cluster/Chart.yaml +++ b/charts/postgres-cluster/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: postgres-cluster -version: 5.0.0 +version: 5.0.1 description: Cloudnative-pg Cluster keywords: - database diff --git a/charts/postgres-cluster/README.md b/charts/postgres-cluster/README.md index dc5c8e2..550e858 100644 --- a/charts/postgres-cluster/README.md +++ b/charts/postgres-cluster/README.md @@ -1,6 +1,6 @@ # postgres-cluster -![Version: 5.0.0](https://img.shields.io/badge/Version-5.0.0-informational?style=flat-square) ![AppVersion: v1.25.1](https://img.shields.io/badge/AppVersion-v1.25.1-informational?style=flat-square) +![Version: 5.0.1](https://img.shields.io/badge/Version-5.0.1-informational?style=flat-square) ![AppVersion: v1.25.1](https://img.shields.io/badge/AppVersion-v1.25.1-informational?style=flat-square) Cloudnative-pg Cluster diff --git a/charts/postgres-cluster/templates/_helpers.tpl b/charts/postgres-cluster/templates/_helpers.tpl index 3d379ef..a50ac7d 100644 --- a/charts/postgres-cluster/templates/_helpers.tpl +++ b/charts/postgres-cluster/templates/_helpers.tpl @@ -9,17 +9,6 @@ Expand the name of the chart. {{- end }} {{- end }} -{{/* -Allow the release namespace to be overridden for multi-namespace deployments in combined charts -*/}} -{{- define "cluster.namespace" -}} - {{- if .Values.namespaceOverride -}} - {{- .Values.namespaceOverride -}} - {{- else -}} - {{- .Release.Namespace -}} - {{- end -}} -{{- end -}} - {{/* Create chart name and version as used by the chart label. */}} @@ -48,6 +37,17 @@ app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/part-of: cloudnative-pg {{- end }} +{{/* +Allow the release namespace to be overridden for multi-namespace deployments in combined charts +*/}} +{{- define "cluster.namespace" -}} + {{- if .Values.namespaceOverride -}} + {{- .Values.namespaceOverride -}} + {{- else -}} + {{- .Release.Namespace -}} + {{- end -}} +{{- end -}} + {{/* Whether we need to use TimescaleDB defaults */}} diff --git a/charts/postgres-cluster/templates/scheduled-backup.yaml b/charts/postgres-cluster/templates/scheduled-backup.yaml index 7b53241..c46cf37 100644 --- a/charts/postgres-cluster/templates/scheduled-backup.yaml +++ b/charts/postgres-cluster/templates/scheduled-backup.yaml @@ -5,7 +5,7 @@ apiVersion: postgresql.cnpg.io/v1 kind: ScheduledBackup metadata: - name: {{ include "cluster.name" $context }}-{{ .name }}-scheduled-backup + name: {{ include "cluster.name" $context }}-{{ .name }}-scheduled-backup namespace: {{ include "cluster.namespace" $ }} labels: {{- include "cluster.labels" . | nindent 4 }}