From 8bdd0212996b53f4233e87a91eb313f4187502f9 Mon Sep 17 00:00:00 2001 From: Stacky McStackface Date: Thu, 3 Sep 2026 07:58:54 +0000 Subject: [PATCH 1/2] chore: Generated commit to update templated files since the last template run up to stackabletech/operator-templating@bcf54b79d402c34fb2648140300f8bf0113ebddb Reference-to: stackabletech/operator-templating@bcf54b7 (Namespace the Helm defined templates with the chart name) --- .../workflows/integration-test-profile.yaml | 2 +- .../secret-operator/templates/_helpers.tpl | 28 +++++++++---------- .../templates/_maintenance.tpl | 2 +- .../secret-operator/templates/_telemetry.tpl | 4 +-- .../secret-operator/templates/service.yaml | 6 ++-- .../templates/serviceaccount.yaml | 12 ++++---- 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/integration-test-profile.yaml b/.github/workflows/integration-test-profile.yaml index 41891685..a4c55ca9 100644 --- a/.github/workflows/integration-test-profile.yaml +++ b/.github/workflows/integration-test-profile.yaml @@ -32,7 +32,7 @@ jobs: PROFILE_INPUT: ${{ inputs.test-profile }} shell: bash run: | - if [ "$EVENT_NAME" == "schedule" ]; then + if [ "$GITHUB_EVENT_NAME" == "schedule" ]; then echo "PROFILE=schedule" | tee -a "$GITHUB_OUTPUT" else echo "PROFILE=${PROFILE_INPUT}" | tee -a "$GITHUB_OUTPUT" diff --git a/deploy/helm/secret-operator/templates/_helpers.tpl b/deploy/helm/secret-operator/templates/_helpers.tpl index e5354470..d6935d31 100644 --- a/deploy/helm/secret-operator/templates/_helpers.tpl +++ b/deploy/helm/secret-operator/templates/_helpers.tpl @@ -1,14 +1,14 @@ {{/* Expand the name of the chart. */}} -{{- define "operator.name" -}} +{{- define "secret-operator.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-operator" }} {{- end }} {{/* Expand the name of the chart. */}} -{{- define "operator.appname" -}} +{{- define "secret-operator.appname" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- end }} @@ -17,7 +17,7 @@ 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). If release name contains chart name it will be used as a full name. */}} -{{- define "operator.fullname" -}} +{{- define "secret-operator.fullname" -}} {{- if .Values.fullnameOverride }} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} {{- else }} @@ -33,16 +33,16 @@ If release name contains chart name it will be used as a full name. {{/* Create chart name and version as used by the chart label. */}} -{{- define "operator.chart" -}} +{{- define "secret-operator.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} {{/* Common labels */}} -{{- define "operator.labels" -}} -helm.sh/chart: {{ include "operator.chart" . }} -{{ include "operator.selectorLabels" . }} +{{- define "secret-operator.labels" -}} +helm.sh/chart: {{ include "secret-operator.chart" . }} +{{ include "secret-operator.selectorLabels" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} @@ -52,8 +52,8 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} {{/* Selector labels */}} -{{- define "operator.selectorLabels" -}} -app.kubernetes.io/name: {{ include "operator.appname" . }} +{{- define "secret-operator.selectorLabels" -}} +app.kubernetes.io/name: {{ include "secret-operator.appname" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- with .Values.labels }} {{ toYaml . }} @@ -63,9 +63,9 @@ app.kubernetes.io/instance: {{ .Release.Name }} {{/* Create the name of the service account to use */}} -{{- define "operator.serviceAccountName" -}} +{{- define "secret-operator.serviceAccountName" -}} {{- if .Values.serviceAccount.create }} -{{- default (printf "%s-serviceaccount" (include "operator.fullname" .)) .Values.serviceAccount.name }} +{{- default (printf "%s-serviceaccount" (include "secret-operator.fullname" .)) .Values.serviceAccount.name }} {{- else }} {{- required "serviceAccount.name is required when serviceAccount.create is false, because the chart then does not create a ServiceAccount for the operator to run as." .Values.serviceAccount.name }} {{- end }} @@ -74,13 +74,13 @@ Create the name of the service account to use {{/* Labels for Kubernetes objects created by helm test */}} -{{- define "operator.testLabels" -}} -helm.sh/test: {{ include "operator.chart" . }} +{{- define "secret-operator.testLabels" -}} +helm.sh/test: {{ include "secret-operator.chart" . }} {{- end }} {{/* Build the full operator container image reference. */}} -{{- define "operator.image" -}} +{{- define "secret-operator.image" -}} {{- printf "%s/%s:%s" .Values.image.repository .Chart.Name (.Values.image.tag | default .Chart.AppVersion) -}} {{- end }} diff --git a/deploy/helm/secret-operator/templates/_maintenance.tpl b/deploy/helm/secret-operator/templates/_maintenance.tpl index 85afd7f2..6d023858 100644 --- a/deploy/helm/secret-operator/templates/_maintenance.tpl +++ b/deploy/helm/secret-operator/templates/_maintenance.tpl @@ -1,7 +1,7 @@ {{/* Create a list of maintenance related env vars. */}} -{{- define "maintenance.envVars" -}} +{{- define "secret-operator.maintenance.envVars" -}} {{- with .Values.maintenance }} {{- if not .endOfSupportCheck.enabled }} - name: EOS_DISABLED diff --git a/deploy/helm/secret-operator/templates/_telemetry.tpl b/deploy/helm/secret-operator/templates/_telemetry.tpl index 8ef99bbf..d1970867 100644 --- a/deploy/helm/secret-operator/templates/_telemetry.tpl +++ b/deploy/helm/secret-operator/templates/_telemetry.tpl @@ -1,7 +1,7 @@ {{/* Create a list of telemetry related env vars. */}} -{{- define "telemetry.envVars" -}} +{{- define "secret-operator.telemetry.envVars" -}} {{- with .Values.telemetry }} {{- if not .consoleLog.enabled }} - name: CONSOLE_LOG_DISABLED @@ -17,7 +17,7 @@ Create a list of telemetry related env vars. {{ end }} {{- if .fileLog.enabled }} - name: FILE_LOG_DIRECTORY - value: /stackable/logs/{{ include "operator.appname" $ }} + value: /stackable/logs/{{ include "secret-operator.appname" $ }} {{- end }} {{- if and .fileLog.enabled .fileLog.level }} - name: FILE_LOG_LEVEL diff --git a/deploy/helm/secret-operator/templates/service.yaml b/deploy/helm/secret-operator/templates/service.yaml index 978f914d..fd127873 100644 --- a/deploy/helm/secret-operator/templates/service.yaml +++ b/deploy/helm/secret-operator/templates/service.yaml @@ -6,15 +6,15 @@ metadata: # Note(@sbernauer): We could also call the Service something like # "product-operator-conversion-webhook". However, in the future we will have more webhooks, and # it seems like an overkill to have a dedicated Service per webhook. - name: {{ include "operator.fullname" . }} + name: {{ include "secret-operator.fullname" . }} labels: - {{- include "operator.labels" . | nindent 4 }} + {{- include "secret-operator.labels" . | nindent 4 }} spec: selector: {{- if .Values.maintenance.customResourceDefinitions.maintain }} webhook.stackable.tech/conversion: enabled {{- end }} - {{- include "operator.selectorLabels" . | nindent 4 }} + {{- include "secret-operator.selectorLabels" . | nindent 4 }} ports: - name: conversion-webhook protocol: TCP diff --git a/deploy/helm/secret-operator/templates/serviceaccount.yaml b/deploy/helm/secret-operator/templates/serviceaccount.yaml index e0d959e2..7836c87d 100644 --- a/deploy/helm/secret-operator/templates/serviceaccount.yaml +++ b/deploy/helm/secret-operator/templates/serviceaccount.yaml @@ -3,9 +3,9 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ include "operator.serviceAccountName" . }} + name: {{ include "secret-operator.serviceAccountName" . }} labels: - {{- include "operator.labels" . | nindent 4 }} + {{- include "secret-operator.labels" . | nindent 4 }} {{- with .Values.serviceAccount.annotations }} annotations: {{- toYaml . | nindent 4 }} @@ -17,14 +17,14 @@ apiVersion: rbac.authorization.k8s.io/v1 # operator watch and manage its custom resources across the cluster. kind: ClusterRoleBinding metadata: - name: {{ include "operator.fullname" . }}-clusterrolebinding + name: {{ include "secret-operator.fullname" . }}-clusterrolebinding labels: - {{- include "operator.labels" . | nindent 4 }} + {{- include "secret-operator.labels" . | nindent 4 }} subjects: - kind: ServiceAccount - name: {{ include "operator.serviceAccountName" . }} + name: {{ include "secret-operator.serviceAccountName" . }} namespace: {{ .Release.Namespace }} roleRef: kind: ClusterRole - name: {{ include "operator.fullname" . }}-clusterrole + name: {{ include "secret-operator.fullname" . }}-clusterrole apiGroup: rbac.authorization.k8s.io From 3e2584b2fa365b7d64bacc3f9a94253359e8b3f2 Mon Sep 17 00:00:00 2001 From: Lars Francke Date: Thu, 3 Sep 2026 10:20:01 +0200 Subject: [PATCH 2/2] chore: Namespace the calls to the Helm defined templates The definitions moved to the chart-name prefix with the templated helper files, but these files are not templated, so their call sites did not move with them and the chart no longer renders. https://github.com/stackabletech/issues/issues/882 --- .../templates/controller-deployment.yaml | 22 +++++++++---------- .../templates/csi-node-driver-daemonset.yaml | 20 ++++++++--------- .../secret-operator/templates/csidriver.yaml | 2 +- .../helm/secret-operator/templates/roles.yaml | 4 ++-- .../templates/storageclass.yaml | 2 +- 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/deploy/helm/secret-operator/templates/controller-deployment.yaml b/deploy/helm/secret-operator/templates/controller-deployment.yaml index 1ae22c27..d0b9d8bd 100644 --- a/deploy/helm/secret-operator/templates/controller-deployment.yaml +++ b/deploy/helm/secret-operator/templates/controller-deployment.yaml @@ -2,17 +2,17 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "operator.fullname" . }} + name: {{ include "secret-operator.fullname" . }} labels: - {{- include "operator.labels" . | nindent 4 }} + {{- include "secret-operator.labels" . | nindent 4 }} spec: selector: matchLabels: - {{- include "operator.selectorLabels" . | nindent 6 }} + {{- include "secret-operator.selectorLabels" . | nindent 6 }} template: metadata: annotations: - internal.stackable.tech/image: "{{ include "operator.image" . }}" + internal.stackable.tech/image: "{{ include "secret-operator.image" . }}" {{- with .Values.controllerService.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} @@ -20,21 +20,21 @@ spec: {{- if .Values.maintenance.customResourceDefinitions.maintain }} webhook.stackable.tech/conversion: enabled {{- end }} - {{- include "operator.selectorLabels" . | nindent 8 }} + {{- include "secret-operator.selectorLabels" . | nindent 8 }} spec: {{- with .Values.image.pullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} # NOTE (@Techassi): Does it maybe make sense to have two different service accounts? - serviceAccountName: {{ include "operator.serviceAccountName" . }} + serviceAccountName: {{ include "secret-operator.serviceAccountName" . }} securityContext: {{- toYaml .Values.controllerService.podSecurityContext | nindent 8 }} containers: - - name: {{ include "operator.appname" . }} + - name: {{ include "secret-operator.appname" . }} securityContext: {{- toYaml .Values.controllerService.securityContext | nindent 12 }} - image: "{{ include "operator.image" . }}" + image: "{{ include "secret-operator.image" . }}" imagePullPolicy: {{ .Values.image.pullPolicy }} resources: {{ .Values.controllerService.resources | toYaml | nindent 12 }} @@ -69,7 +69,7 @@ spec: # The name of the Kubernetes Service that point to the operator Pod, e.g. used to # construct the conversion webhook endpoint. - name: OPERATOR_SERVICE_NAME - value: {{ include "operator.fullname" . }} + value: {{ include "secret-operator.fullname" . }} # The image repository, like "oci.stackable.tech/sdp" - name: IMAGE_REPOSITORY @@ -86,8 +86,8 @@ spec: - name: KUBERNETES_CLUSTER_DOMAIN value: {{ .Values.kubernetesClusterDomain | quote }} {{- end }} - {{- include "telemetry.envVars" . | nindent 12 }} - {{- include "maintenance.envVars" . | nindent 12 }} + {{- include "secret-operator.telemetry.envVars" . | nindent 12 }} + {{- include "secret-operator.maintenance.envVars" . | nindent 12 }} {{- with .Values.controllerService.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/deploy/helm/secret-operator/templates/csi-node-driver-daemonset.yaml b/deploy/helm/secret-operator/templates/csi-node-driver-daemonset.yaml index dd9eee5c..82974918 100644 --- a/deploy/helm/secret-operator/templates/csi-node-driver-daemonset.yaml +++ b/deploy/helm/secret-operator/templates/csi-node-driver-daemonset.yaml @@ -2,36 +2,36 @@ apiVersion: apps/v1 kind: DaemonSet metadata: - name: {{ include "operator.fullname" . }}-csi-node-driver + name: {{ include "secret-operator.fullname" . }}-csi-node-driver labels: - {{- include "operator.labels" . | nindent 4 }} + {{- include "secret-operator.labels" . | nindent 4 }} spec: selector: matchLabels: - {{- include "operator.selectorLabels" . | nindent 6 }} + {{- include "secret-operator.selectorLabels" . | nindent 6 }} template: metadata: annotations: - internal.stackable.tech/image: "{{ include "operator.image" . }}" + internal.stackable.tech/image: "{{ include "secret-operator.image" . }}" {{- with .Values.csiNodeDriver.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} labels: - {{- include "operator.selectorLabels" . | nindent 8 }} + {{- include "secret-operator.selectorLabels" . | nindent 8 }} spec: {{- with .Values.image.pullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} # NOTE (@Techassi): Does it maybe make sense to have two different service accounts? - serviceAccountName: {{ include "operator.serviceAccountName" . }} + serviceAccountName: {{ include "secret-operator.serviceAccountName" . }} securityContext: {{- toYaml .Values.csiNodeDriver.podSecurityContext | nindent 8 }} containers: - name: csi-node-service securityContext: {{- toYaml .Values.csiNodeDriver.nodeService.securityContext | nindent 12 }} - image: "{{ include "operator.image" . }}" + image: "{{ include "secret-operator.image" . }}" imagePullPolicy: {{ .Values.image.pullPolicy }} resources: {{ .Values.csiNodeDriver.nodeService.resources | toYaml | nindent 12 }} @@ -70,7 +70,7 @@ spec: # The name of the Kubernetes Service that point to the operator Pod, e.g. used to # construct the conversion webhook endpoint. - name: OPERATOR_SERVICE_NAME - value: {{ include "operator.fullname" . }} + value: {{ include "secret-operator.fullname" . }} # The image repository, like "oci.stackable.tech/sdp" - name: IMAGE_REPOSITORY @@ -94,8 +94,8 @@ spec: - name: KUBERNETES_CLUSTER_DOMAIN value: {{ .Values.kubernetesClusterDomain | quote }} {{- end }} - {{- include "telemetry.envVars" . | nindent 12 }} - {{- include "maintenance.envVars" . | nindent 12 }} + {{- include "secret-operator.telemetry.envVars" . | nindent 12 }} + {{- include "secret-operator.maintenance.envVars" . | nindent 12 }} volumeMounts: - name: csi mountPath: /csi diff --git a/deploy/helm/secret-operator/templates/csidriver.yaml b/deploy/helm/secret-operator/templates/csidriver.yaml index c009edac..c8da0217 100644 --- a/deploy/helm/secret-operator/templates/csidriver.yaml +++ b/deploy/helm/secret-operator/templates/csidriver.yaml @@ -4,7 +4,7 @@ kind: CSIDriver metadata: name: secrets.stackable.tech labels: - {{- include "operator.labels" . | nindent 4 }} + {{- include "secret-operator.labels" . | nindent 4 }} spec: attachRequired: false podInfoOnMount: true diff --git a/deploy/helm/secret-operator/templates/roles.yaml b/deploy/helm/secret-operator/templates/roles.yaml index b43ec121..99b7aec8 100644 --- a/deploy/helm/secret-operator/templates/roles.yaml +++ b/deploy/helm/secret-operator/templates/roles.yaml @@ -39,9 +39,9 @@ volumes: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: {{ include "operator.fullname" . }}-clusterrole + name: {{ include "secret-operator.fullname" . }}-clusterrole labels: - {{- include "operator.labels" . | nindent 4 }} + {{- include "secret-operator.labels" . | nindent 4 }} rules: # Required for maintaining the CRDs (including the conversion webhook configuration) and # for the startup condition check. diff --git a/deploy/helm/secret-operator/templates/storageclass.yaml b/deploy/helm/secret-operator/templates/storageclass.yaml index 44f8e2b6..68e2552c 100644 --- a/deploy/helm/secret-operator/templates/storageclass.yaml +++ b/deploy/helm/secret-operator/templates/storageclass.yaml @@ -4,5 +4,5 @@ kind: StorageClass metadata: name: secrets.stackable.tech labels: - {{- include "operator.labels" . | nindent 4 }} + {{- include "secret-operator.labels" . | nindent 4 }} provisioner: secrets.stackable.tech