From afd61fd076b202ea8147cb5e5ef42db70da7dabc Mon Sep 17 00:00:00 2001 From: Stacky McStackface Date: Thu, 3 Sep 2026 07:58:13 +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 +- .../superset-operator/templates/_helpers.tpl | 28 +++++++++---------- .../templates/_maintenance.tpl | 2 +- .../templates/_telemetry.tpl | 4 +-- .../templates/deployment.yaml | 22 +++++++-------- .../superset-operator/templates/service.yaml | 6 ++-- .../templates/serviceaccount.yaml | 12 ++++---- 7 files changed, 38 insertions(+), 38 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/superset-operator/templates/_helpers.tpl b/deploy/helm/superset-operator/templates/_helpers.tpl index e5354470..2aea158a 100644 --- a/deploy/helm/superset-operator/templates/_helpers.tpl +++ b/deploy/helm/superset-operator/templates/_helpers.tpl @@ -1,14 +1,14 @@ {{/* Expand the name of the chart. */}} -{{- define "operator.name" -}} +{{- define "superset-operator.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-operator" }} {{- end }} {{/* Expand the name of the chart. */}} -{{- define "operator.appname" -}} +{{- define "superset-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 "superset-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 "superset-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 "superset-operator.labels" -}} +helm.sh/chart: {{ include "superset-operator.chart" . }} +{{ include "superset-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 "superset-operator.selectorLabels" -}} +app.kubernetes.io/name: {{ include "superset-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 "superset-operator.serviceAccountName" -}} {{- if .Values.serviceAccount.create }} -{{- default (printf "%s-serviceaccount" (include "operator.fullname" .)) .Values.serviceAccount.name }} +{{- default (printf "%s-serviceaccount" (include "superset-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 "superset-operator.testLabels" -}} +helm.sh/test: {{ include "superset-operator.chart" . }} {{- end }} {{/* Build the full operator container image reference. */}} -{{- define "operator.image" -}} +{{- define "superset-operator.image" -}} {{- printf "%s/%s:%s" .Values.image.repository .Chart.Name (.Values.image.tag | default .Chart.AppVersion) -}} {{- end }} diff --git a/deploy/helm/superset-operator/templates/_maintenance.tpl b/deploy/helm/superset-operator/templates/_maintenance.tpl index 85afd7f2..d7619f09 100644 --- a/deploy/helm/superset-operator/templates/_maintenance.tpl +++ b/deploy/helm/superset-operator/templates/_maintenance.tpl @@ -1,7 +1,7 @@ {{/* Create a list of maintenance related env vars. */}} -{{- define "maintenance.envVars" -}} +{{- define "superset-operator.maintenance.envVars" -}} {{- with .Values.maintenance }} {{- if not .endOfSupportCheck.enabled }} - name: EOS_DISABLED diff --git a/deploy/helm/superset-operator/templates/_telemetry.tpl b/deploy/helm/superset-operator/templates/_telemetry.tpl index 8ef99bbf..47a46497 100644 --- a/deploy/helm/superset-operator/templates/_telemetry.tpl +++ b/deploy/helm/superset-operator/templates/_telemetry.tpl @@ -1,7 +1,7 @@ {{/* Create a list of telemetry related env vars. */}} -{{- define "telemetry.envVars" -}} +{{- define "superset-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 "superset-operator.appname" $ }} {{- end }} {{- if and .fileLog.enabled .fileLog.level }} - name: FILE_LOG_LEVEL diff --git a/deploy/helm/superset-operator/templates/deployment.yaml b/deploy/helm/superset-operator/templates/deployment.yaml index 86be9ad2..b59d5d55 100644 --- a/deploy/helm/superset-operator/templates/deployment.yaml +++ b/deploy/helm/superset-operator/templates/deployment.yaml @@ -2,20 +2,20 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "operator.fullname" . }}-deployment + name: {{ include "superset-operator.fullname" . }}-deployment labels: - {{- include "operator.labels" . | nindent 4 }} + {{- include "superset-operator.labels" . | nindent 4 }} spec: replicas: 1 strategy: type: Recreate selector: matchLabels: - {{- include "operator.selectorLabels" . | nindent 6 }} + {{- include "superset-operator.selectorLabels" . | nindent 6 }} template: metadata: annotations: - internal.stackable.tech/image: {{ include "operator.image" . }} + internal.stackable.tech/image: {{ include "superset-operator.image" . }} {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} @@ -23,20 +23,20 @@ spec: {{- if .Values.maintenance.customResourceDefinitions.maintain }} webhook.stackable.tech/conversion: enabled {{- end }} - {{- include "operator.selectorLabels" . | nindent 8 }} + {{- include "superset-operator.selectorLabels" . | nindent 8 }} spec: {{- with .Values.image.pullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} - serviceAccountName: {{ include "operator.serviceAccountName" . }} + serviceAccountName: {{ include "superset-operator.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - - name: {{ include "operator.appname" . }} + - name: {{ include "superset-operator.appname" . }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} - image: {{ include "operator.image" . }} + image: {{ include "superset-operator.image" . }} imagePullPolicy: {{ .Values.image.pullPolicy }} resources: {{- toYaml .Values.resources | nindent 12 }} @@ -64,7 +64,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 "superset-operator.fullname" . }} # The product image repository, like "oci.stackable.tech/sdp". - name: IMAGE_REPOSITORY @@ -82,8 +82,8 @@ spec: value: {{ .Values.kubernetesClusterDomain | quote }} {{- end }} - {{- include "telemetry.envVars" . | nindent 12 }} - {{- include "maintenance.envVars" . | nindent 12 }} + {{- include "superset-operator.telemetry.envVars" . | nindent 12 }} + {{- include "superset-operator.maintenance.envVars" . | nindent 12 }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/deploy/helm/superset-operator/templates/service.yaml b/deploy/helm/superset-operator/templates/service.yaml index 978f914d..9454f7a3 100644 --- a/deploy/helm/superset-operator/templates/service.yaml +++ b/deploy/helm/superset-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 "superset-operator.fullname" . }} labels: - {{- include "operator.labels" . | nindent 4 }} + {{- include "superset-operator.labels" . | nindent 4 }} spec: selector: {{- if .Values.maintenance.customResourceDefinitions.maintain }} webhook.stackable.tech/conversion: enabled {{- end }} - {{- include "operator.selectorLabels" . | nindent 4 }} + {{- include "superset-operator.selectorLabels" . | nindent 4 }} ports: - name: conversion-webhook protocol: TCP diff --git a/deploy/helm/superset-operator/templates/serviceaccount.yaml b/deploy/helm/superset-operator/templates/serviceaccount.yaml index e0d959e2..4fc05c5a 100644 --- a/deploy/helm/superset-operator/templates/serviceaccount.yaml +++ b/deploy/helm/superset-operator/templates/serviceaccount.yaml @@ -3,9 +3,9 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ include "operator.serviceAccountName" . }} + name: {{ include "superset-operator.serviceAccountName" . }} labels: - {{- include "operator.labels" . | nindent 4 }} + {{- include "superset-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 "superset-operator.fullname" . }}-clusterrolebinding labels: - {{- include "operator.labels" . | nindent 4 }} + {{- include "superset-operator.labels" . | nindent 4 }} subjects: - kind: ServiceAccount - name: {{ include "operator.serviceAccountName" . }} + name: {{ include "superset-operator.serviceAccountName" . }} namespace: {{ .Release.Namespace }} roleRef: kind: ClusterRole - name: {{ include "operator.fullname" . }}-clusterrole + name: {{ include "superset-operator.fullname" . }}-clusterrole apiGroup: rbac.authorization.k8s.io From 6ccb0dffa026b17214fdc79a9010c3d4a81f7b8b Mon Sep 17 00:00:00 2001 From: Lars Francke Date: Thu, 3 Sep 2026 10:19:37 +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/clusterrole-operator.yaml | 16 ++++++++-------- .../templates/clusterrole-product.yaml | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/deploy/helm/superset-operator/templates/clusterrole-operator.yaml b/deploy/helm/superset-operator/templates/clusterrole-operator.yaml index 42a1ab6e..d90177f1 100644 --- a/deploy/helm/superset-operator/templates/clusterrole-operator.yaml +++ b/deploy/helm/superset-operator/templates/clusterrole-operator.yaml @@ -2,9 +2,9 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: {{ include "operator.fullname" . }}-clusterrole + name: {{ include "superset-operator.fullname" . }}-clusterrole labels: - {{- include "operator.labels" . | nindent 4 }} + {{- include "superset-operator.labels" . | nindent 4 }} rules: # For automatic cluster domain detection - apiGroups: @@ -54,7 +54,7 @@ rules: verbs: - bind resourceNames: - - {{ include "operator.name" . }}-clusterrole + - {{ include "superset-operator.name" . }}-clusterrole # StatefulSet created per role group. Applied via SSA and tracked for orphan cleanup. - apiGroups: - apps @@ -129,9 +129,9 @@ rules: - patch # Primary CRDs: SupersetCluster and DruidConnection. - apiGroups: - - {{ include "operator.name" . }}.stackable.tech + - {{ include "superset-operator.name" . }}.stackable.tech resources: - - {{ include "operator.name" . }}clusters + - {{ include "superset-operator.name" . }}clusters - druidconnections verbs: - get @@ -139,14 +139,14 @@ rules: - watch # Patch status for SupersetCluster (reports conditions such as Available/Degraded). - apiGroups: - - {{ include "operator.name" . }}.stackable.tech + - {{ include "superset-operator.name" . }}.stackable.tech resources: - - {{ include "operator.name" . }}clusters/status + - {{ include "superset-operator.name" . }}clusters/status verbs: - patch # Patch status for DruidConnection (tracks import job progress: Pending/Importing/Ready/Failed). - apiGroups: - - {{ include "operator.name" . }}.stackable.tech + - {{ include "superset-operator.name" . }}.stackable.tech resources: - druidconnections/status verbs: diff --git a/deploy/helm/superset-operator/templates/clusterrole-product.yaml b/deploy/helm/superset-operator/templates/clusterrole-product.yaml index ebabcd19..9650db77 100644 --- a/deploy/helm/superset-operator/templates/clusterrole-product.yaml +++ b/deploy/helm/superset-operator/templates/clusterrole-product.yaml @@ -4,9 +4,9 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: {{ include "operator.name" . }}-clusterrole + name: {{ include "superset-operator.name" . }}-clusterrole labels: - {{- include "operator.labels" . | nindent 4 }} + {{- include "superset-operator.labels" . | nindent 4 }} rules: {{ if .Capabilities.APIVersions.Has "security.openshift.io/v1" }} # Required on OpenShift to allow Superset pods to run as a non-root user.