From 67d0dbcf7154d8e0a05d3610956e9e6e2bdb1795 Mon Sep 17 00:00:00 2001 From: Alex Lebens Date: Sun, 26 Apr 2026 15:15:36 -0500 Subject: [PATCH] feat: change helper --- charts/rclone-bucket/Chart.yaml | 2 +- charts/rclone-bucket/README.md | 2 +- charts/rclone-bucket/templates/_helpers.tpl | 20 ++++++++-------- charts/rclone-bucket/templates/common.yaml | 24 +++++++++---------- .../templates/external-secret.yaml | 20 ++++++++-------- 5 files changed, 34 insertions(+), 34 deletions(-) diff --git a/charts/rclone-bucket/Chart.yaml b/charts/rclone-bucket/Chart.yaml index 0f63dad..5b200b1 100644 --- a/charts/rclone-bucket/Chart.yaml +++ b/charts/rclone-bucket/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: rclone-bucket -version: 0.4.1 +version: 0.4.2 description: Rclone CronJob to replicate buckets keywords: - rclone-bucket diff --git a/charts/rclone-bucket/README.md b/charts/rclone-bucket/README.md index 0256f97..6f07e1c 100644 --- a/charts/rclone-bucket/README.md +++ b/charts/rclone-bucket/README.md @@ -1,6 +1,6 @@ # rclone-bucket -![Version: 0.4.1](https://img.shields.io/badge/Version-0.4.1-informational?style=flat-square) ![AppVersion: v1.73.5](https://img.shields.io/badge/AppVersion-v1.73.5-informational?style=flat-square) +![Version: 0.4.2](https://img.shields.io/badge/Version-0.4.2-informational?style=flat-square) ![AppVersion: v1.73.5](https://img.shields.io/badge/AppVersion-v1.73.5-informational?style=flat-square) Rclone CronJob to replicate buckets diff --git a/charts/rclone-bucket/templates/_helpers.tpl b/charts/rclone-bucket/templates/_helpers.tpl index 9a31ae7..3d3e72a 100644 --- a/charts/rclone-bucket/templates/_helpers.tpl +++ b/charts/rclone-bucket/templates/_helpers.tpl @@ -43,35 +43,35 @@ Generate the secret name {{/* Common env names */}} -{{- define "secret.envAccessKey" -}} +{{- define "secretRclone.envAccessKey" -}} ACCESS_KEY_ID {{- end }} -{{- define "secret.envSecretKey" -}} +{{- define "secretRclone.envSecretKey" -}} ACCESS_SECRET_KEY {{- end }} -{{- define "secret.envRegion" -}} +{{- define "secretRclone.envRegion" -}} ACCESS_REGION {{- end }} -{{- define "secret.envSrcEndpoint" -}} +{{- define "secretRclone.envSrcEndpoint" -}} SRC_ENDPOINT {{- end }} -{{- define "secret.envDestEndpoint" -}} +{{- define "secretRclone.envDestEndpoint" -}} DEST_ENDPOINT {{- end }} {{/* Create chart name and version as used by the chart label. */}} -{{- define "secret.chart" -}} +{{- define "secretRclone.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} {{/* Common labels */}} -{{- define "secret.labels" -}} -helm.sh/chart: {{ include "secret.chart" $ }} -{{ include "secret.selectorLabels" $ }} +{{- define "secretRclone.labels" -}} +helm.sh/chart: {{ include "secretRclone.chart" $ }} +{{ include "secretRclone.selectorLabels" $ }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.Version | quote }} {{- end }} @@ -84,7 +84,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} {{/* Selector labels */}} -{{- define "secret.selectorLabels" -}} +{{- define "secretRclone.selectorLabels" -}} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/part-of: {{ .Release.Name }} {{- end }} diff --git a/charts/rclone-bucket/templates/common.yaml b/charts/rclone-bucket/templates/common.yaml index 6e9bcb8..287c403 100644 --- a/charts/rclone-bucket/templates/common.yaml +++ b/charts/rclone-bucket/templates/common.yaml @@ -48,22 +48,22 @@ controllers: valueFrom: secretKeyRef: name: {{ include "rclone.sourceSecretName" . }} - key: {{ include "secret.envAccessKey" . }} + key: {{ include "secretRclone.envAccessKey" . }} - name: RCLONE_CONFIG_SRC_SECRET_ACCESS_KEY valueFrom: secretKeyRef: name: {{ include "rclone.sourceSecretName" . }} - key: {{ include "secret.envSecretKey" . }} + key: {{ include "secretRclone.envSecretKey" . }} - name: RCLONE_CONFIG_SRC_REGION valueFrom: secretKeyRef: name: {{ include "rclone.sourceSecretName" . }} - key: {{ include "secret.envRegion" . }} + key: {{ include "secretRclone.envRegion" . }} - name: RCLONE_CONFIG_SRC_ENDPOINT valueFrom: secretKeyRef: name: {{ include "rclone.sourceSecretName" . }} - key: {{ include "secret.envSrcEndpoint" . }} + key: {{ include "secretRclone.envSrcEndpoint" . }} - name: RCLONE_CONFIG_SRC_S3_FORCE_PATH_STYLE value: {{ .Values.rclone.source.forcePathStyle }} - name: RCLONE_CONFIG_DEST_TYPE @@ -76,22 +76,22 @@ controllers: valueFrom: secretKeyRef: name: {{ include "rclone.destinationSecretName" . }} - key: {{ include "secret.envAccessKey" . }} + key: {{ include "secretRclone.envAccessKey" . }} - name: RCLONE_CONFIG_DEST_SECRET_ACCESS_KEY valueFrom: secretKeyRef: name: {{ include "rclone.destinationSecretName" . }} - key: {{ include "secret.envSecretKey" . }} + key: {{ include "secretRclone.envSecretKey" . }} - name: RCLONE_CONFIG_DEST_REGION valueFrom: secretKeyRef: name: {{ include "rclone.destinationSecretName" . }} - key: {{ include "secret.envRegion" . }} + key: {{ include "secretRclone.envRegion" . }} - name: RCLONE_CONFIG_DEST_ENDPOINT valueFrom: secretKeyRef: name: {{ include "rclone.destinationSecretName" . }} - key: {{ include "secret.envDestEndpoint" . }} + key: {{ include "secretRclone.envDestEndpoint" . }} - name: RCLONE_CONFIG_SRC_DEST_FORCE_PATH_STYLE value: {{ .Values.rclone.destination.forcePathStyle }} {{- if .Values.prune.enabled }} @@ -117,22 +117,22 @@ controllers: valueFrom: secretKeyRef: name: {{ include "rclone.destinationSecretName" . }} - key: {{ include "secret.envAccessKey" . }} + key: {{ include "secretRclone.envAccessKey" . }} - name: RCLONE_CONFIG_DEST_SECRET_ACCESS_KEY valueFrom: secretKeyRef: name: {{ include "rclone.destinationSecretName" . }} - key: {{ include "secret.envSecretKey" . }} + key: {{ include "secretRclone.envSecretKey" . }} - name: RCLONE_CONFIG_DEST_REGION valueFrom: secretKeyRef: name: {{ include "rclone.destinationSecretName" . }} - key: {{ include "secret.envRegion" . }} + key: {{ include "secretRclone.envRegion" . }} - name: RCLONE_CONFIG_DEST_ENDPOINT valueFrom: secretKeyRef: name: {{ include "rclone.destinationSecretName" . }} - key: {{ include "secret.envDestEndpoint" . }} + key: {{ include "secretRclone.envDestEndpoint" . }} - name: RCLONE_CONFIG_SRC_S3_FORCE_PATH_STYLE value: {{ .Values.rclone.destination.forcePathStyle }} {{- end }} diff --git a/charts/rclone-bucket/templates/external-secret.yaml b/charts/rclone-bucket/templates/external-secret.yaml index 2c50a50..d4cd129 100644 --- a/charts/rclone-bucket/templates/external-secret.yaml +++ b/charts/rclone-bucket/templates/external-secret.yaml @@ -6,7 +6,7 @@ metadata: name: {{ include "rclone.sourceSecretName" . }} namespace: {{ .Release.Namespace }} labels: - {{- include "secret.labels" . | nindent 4 }} + {{- include "secretRclone.labels" . | nindent 4 }} app.kubernetes.io/name: {{ include "rclone.sourceSecretName" . }} {{- with .Values.additionalLabels }} {{- toYaml . | nindent 4 }} @@ -16,19 +16,19 @@ spec: kind: ClusterSecretStore name: {{ .Values.secret.externalSecret.storeName | required "External Secret store name is required" }} data: - - secretKey: {{ include "secret.envAccessKey" . }} + - secretKey: {{ include "secretRclone.envAccessKey" . }} remoteRef: key: {{ .Values.secret.externalSecret.source.credentials.path }} property: {{ .Values.secret.externalSecret.source.credentials.keyIdProperty }} - - secretKey: {{ include "secret.envSecretKey" . }} + - secretKey: {{ include "secretRclone.envSecretKey" . }} remoteRef: key: {{ .Values.secret.externalSecret.source.credentials.path }} property: {{ .Values.secret.externalSecret.source.credentials.secretKeyProperty }} - - secretKey: {{ include "secret.envRegion" . }} + - secretKey: {{ include "secretRclone.envRegion" . }} remoteRef: key: {{ .Values.secret.externalSecret.source.credentials.path }} property: {{ .Values.secret.externalSecret.source.credentials.regionProperty }} - - secretKey: {{ include "secret.envSrcEndpoint" . }} + - secretKey: {{ include "secretRclone.envSrcEndpoint" . }} remoteRef: key: {{ .Values.secret.externalSecret.source.config.path }} property: {{ .Values.secret.externalSecret.source.config.endpointProperty }} @@ -40,7 +40,7 @@ metadata: name: {{ include "rclone.destinationSecretName" . }} namespace: {{ .Release.Namespace }} labels: - {{- include "secret.labels" . | nindent 4 }} + {{- include "secretRclone.labels" . | nindent 4 }} app.kubernetes.io/name: {{ include "rclone.destinationSecretName" . }} {{- with .Values.additionalLabels }} {{- toYaml . | nindent 4 }} @@ -50,19 +50,19 @@ spec: kind: ClusterSecretStore name: {{ .Values.secret.externalSecret.storeName | required "External Secret store name is required" }} data: - - secretKey: {{ include "secret.envAccessKey" . }} + - secretKey: {{ include "secretRclone.envAccessKey" . }} remoteRef: key: {{ .Values.secret.externalSecret.destination.credentials.path }} property: {{ .Values.secret.externalSecret.destination.credentials.keyIdProperty }} - - secretKey: {{ include "secret.envSecretKey" . }} + - secretKey: {{ include "secretRclone.envSecretKey" . }} remoteRef: key: {{ .Values.secret.externalSecret.destination.credentials.path }} property: {{ .Values.secret.externalSecret.destination.credentials.secretKeyProperty }} - - secretKey: {{ include "secret.envRegion" . }} + - secretKey: {{ include "secretRclone.envRegion" . }} remoteRef: key: {{ .Values.secret.externalSecret.destination.credentials.path }} property: {{ .Values.secret.externalSecret.destination.credentials.regionProperty }} - - secretKey: {{ include "secret.envDestEndpoint" . }} + - secretKey: {{ include "secretRclone.envDestEndpoint" . }} remoteRef: key: {{ .Values.secret.externalSecret.destination.config.path }} property: {{ .Values.secret.externalSecret.destination.config.endpointProperty }}