From 2213a547e991e2c16e441d69209e58c5748c5c03 Mon Sep 17 00:00:00 2001 From: Kody B Date: Tue, 21 Oct 2025 16:39:59 -0500 Subject: [PATCH 1/3] fix(helm/curator): add optional siteIdentifier for multi-site deployments Add siteIdentifier value to support multiple Curator sites in the same namespace. When set, it's included in ExternalSecret and Job secret reference names to prevent resource conflicts. Backward compatible: if not set, behavior remains unchanged with existing {environment}-admin naming pattern. --- charts/curator/templates/externalsecrets-admin.yaml | 2 +- charts/curator/templates/job-create-admin.yaml | 4 ++-- charts/curator/values.yaml | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/charts/curator/templates/externalsecrets-admin.yaml b/charts/curator/templates/externalsecrets-admin.yaml index 5f03b75..fdbdbe4 100644 --- a/charts/curator/templates/externalsecrets-admin.yaml +++ b/charts/curator/templates/externalsecrets-admin.yaml @@ -1,7 +1,7 @@ apiVersion: external-secrets.io/v1 kind: ExternalSecret metadata: - name: {{ .Values.environment }}-admin + name: {{ .Values.environment }}{{- if .Values.siteIdentifier }}-{{ .Values.siteIdentifier }}{{- end }}-admin namespace: {{ .Release.Namespace }} spec: secretStoreRef: diff --git a/charts/curator/templates/job-create-admin.yaml b/charts/curator/templates/job-create-admin.yaml index ab01bba..41338e7 100644 --- a/charts/curator/templates/job-create-admin.yaml +++ b/charts/curator/templates/job-create-admin.yaml @@ -49,12 +49,12 @@ spec: - name: WEBADMIN_PASSWORD valueFrom: secretKeyRef: - name: {{ printf "%s-%s" .Values.environment "admin" }} + name: {{ .Values.environment }}{{- if .Values.siteIdentifier }}-{{ .Values.siteIdentifier }}{{- end }}-admin key: admin-password - name: WEBADMIN_USER valueFrom: secretKeyRef: - name: {{ printf "%s-%s" .Values.environment "admin" }} + name: {{ .Values.environment }}{{- if .Values.siteIdentifier }}-{{ .Values.siteIdentifier }}{{- end }}-admin key: admin-user {{ range $key, $value := .Values.curator.env }} - name: "{{ $key }}" diff --git a/charts/curator/values.yaml b/charts/curator/values.yaml index 9084e36..623b7c8 100644 --- a/charts/curator/values.yaml +++ b/charts/curator/values.yaml @@ -5,6 +5,11 @@ replicaCount: ~ # -- Required to be either prod, qa, or dev environment: prod # needs to be either dev, qa, or prod +# -- Site identifier for multi-site deployments in the same namespace +# -- This is used to create unique ExternalSecret names to avoid conflicts +# -- If not set, defaults to the release name +siteIdentifier: "" + # -- Image configuration image: # -- Repository name From cc41dcf5c7bc77c98138c0d2b155114616070e74 Mon Sep 17 00:00:00 2001 From: Kody B Date: Wed, 22 Oct 2025 10:56:10 -0500 Subject: [PATCH 2/3] docs(helm/curator): clarify siteIdentifier default behavior in values.yaml --- charts/curator/values.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/charts/curator/values.yaml b/charts/curator/values.yaml index 623b7c8..2c43c74 100644 --- a/charts/curator/values.yaml +++ b/charts/curator/values.yaml @@ -7,7 +7,8 @@ environment: prod # needs to be either dev, qa, or prod # -- Site identifier for multi-site deployments in the same namespace # -- This is used to create unique ExternalSecret names to avoid conflicts -# -- If not set, defaults to the release name +# -- When set, creates {environment}-{siteIdentifier}-admin naming pattern +# -- When not set (default), uses existing {environment}-admin naming pattern siteIdentifier: "" # -- Image configuration From 988ab0e0d8fae52a8acd7f87504ca8a44ae57b16 Mon Sep 17 00:00:00 2001 From: Kody B Date: Wed, 22 Oct 2025 19:41:16 -0500 Subject: [PATCH 3/3] refactor(helm/curator): use helper template and update docs Extract admin secret name logic into curator.adminSecretName helper to improve maintainability and reduce duplication across templates. Regenerate README.md via helm-docs. --- charts/curator/README.md | 3 ++- charts/curator/templates/_helpers.tpl | 7 +++++++ charts/curator/templates/externalsecrets-admin.yaml | 2 +- charts/curator/templates/job-create-admin.yaml | 4 ++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/charts/curator/README.md b/charts/curator/README.md index 58175f0..e631027 100644 --- a/charts/curator/README.md +++ b/charts/curator/README.md @@ -1,6 +1,6 @@ # curator -![Version: 2.0.0](https://img.shields.io/badge/Version-2.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2025.08-03](https://img.shields.io/badge/AppVersion-2025.08--03-informational?style=flat-square) +![Version: 2.1.0](https://img.shields.io/badge/Version-2.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2025.08-03](https://img.shields.io/badge/AppVersion-2025.08--03-informational?style=flat-square) A Helm chart for Curator in a Container in Kubernetes @@ -85,6 +85,7 @@ A Helm chart for Curator in a Container in Kubernetes | serviceAccount.imagePullSecrets | list | `[]` | Image pull secrets for the service account | | serviceAccount.labels | object | `{}` | Labels for the service account | | serviceAccount.name | string | `nil` | The name of the ServiceAccount to use. If not set and create is true, a name is generated using the fullname template | +| siteIdentifier | string | `""` | When not set (default), uses existing {environment}-admin naming pattern | | tolerations | list | `[]` | | | topologySpreadConstraints | list | `[]` | Pod Topology Spread Constraints | diff --git a/charts/curator/templates/_helpers.tpl b/charts/curator/templates/_helpers.tpl index dbb0a45..a5f2408 100644 --- a/charts/curator/templates/_helpers.tpl +++ b/charts/curator/templates/_helpers.tpl @@ -133,4 +133,11 @@ limits: memory: 512Mi {{- end -}} {{- end -}} +{{- end -}} + +{{/* +Create the admin secret name based on environment and optional siteIdentifier +*/}} +{{- define "curator.adminSecretName" -}} +{{- .Values.environment }}{{- if .Values.siteIdentifier }}-{{ .Values.siteIdentifier }}{{- end }}-admin {{- end -}} \ No newline at end of file diff --git a/charts/curator/templates/externalsecrets-admin.yaml b/charts/curator/templates/externalsecrets-admin.yaml index fdbdbe4..b37f334 100644 --- a/charts/curator/templates/externalsecrets-admin.yaml +++ b/charts/curator/templates/externalsecrets-admin.yaml @@ -1,7 +1,7 @@ apiVersion: external-secrets.io/v1 kind: ExternalSecret metadata: - name: {{ .Values.environment }}{{- if .Values.siteIdentifier }}-{{ .Values.siteIdentifier }}{{- end }}-admin + name: {{ include "curator.adminSecretName" . }} namespace: {{ .Release.Namespace }} spec: secretStoreRef: diff --git a/charts/curator/templates/job-create-admin.yaml b/charts/curator/templates/job-create-admin.yaml index 41338e7..28238e1 100644 --- a/charts/curator/templates/job-create-admin.yaml +++ b/charts/curator/templates/job-create-admin.yaml @@ -49,12 +49,12 @@ spec: - name: WEBADMIN_PASSWORD valueFrom: secretKeyRef: - name: {{ .Values.environment }}{{- if .Values.siteIdentifier }}-{{ .Values.siteIdentifier }}{{- end }}-admin + name: {{ include "curator.adminSecretName" . }} key: admin-password - name: WEBADMIN_USER valueFrom: secretKeyRef: - name: {{ .Values.environment }}{{- if .Values.siteIdentifier }}-{{ .Values.siteIdentifier }}{{- end }}-admin + name: {{ include "curator.adminSecretName" . }} key: admin-user {{ range $key, $value := .Values.curator.env }} - name: "{{ $key }}"