Skip to content

Commit 38081cc

Browse files
chore: Update templated files (bcf54b7) (#749)
* chore: Generated commit to update templated files since the last template run up to stackabletech/operator-templating@bcf54b7 Reference-to: stackabletech/operator-templating@bcf54b7 (Namespace the Helm defined templates with the chart name) * 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. stackabletech/issues#882 --------- Co-authored-by: Lars Francke <lars.francke@stackable.tech>
1 parent c8b0fdb commit 38081cc

11 files changed

Lines changed: 52 additions & 52 deletions

File tree

.github/workflows/integration-test-profile.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
PROFILE_INPUT: ${{ inputs.test-profile }}
3333
shell: bash
3434
run: |
35-
if [ "$EVENT_NAME" == "schedule" ]; then
35+
if [ "$GITHUB_EVENT_NAME" == "schedule" ]; then
3636
echo "PROFILE=schedule" | tee -a "$GITHUB_OUTPUT"
3737
else
3838
echo "PROFILE=${PROFILE_INPUT}" | tee -a "$GITHUB_OUTPUT"
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{{/*
22
Expand the name of the chart.
33
*/}}
4-
{{- define "operator.name" -}}
4+
{{- define "secret-operator.name" -}}
55
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-operator" }}
66
{{- end }}
77

88
{{/*
99
Expand the name of the chart.
1010
*/}}
11-
{{- define "operator.appname" -}}
11+
{{- define "secret-operator.appname" -}}
1212
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
1313
{{- end }}
1414

@@ -17,7 +17,7 @@ Create a default fully qualified app name.
1717
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
1818
If release name contains chart name it will be used as a full name.
1919
*/}}
20-
{{- define "operator.fullname" -}}
20+
{{- define "secret-operator.fullname" -}}
2121
{{- if .Values.fullnameOverride }}
2222
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
2323
{{- else }}
@@ -33,16 +33,16 @@ If release name contains chart name it will be used as a full name.
3333
{{/*
3434
Create chart name and version as used by the chart label.
3535
*/}}
36-
{{- define "operator.chart" -}}
36+
{{- define "secret-operator.chart" -}}
3737
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
3838
{{- end }}
3939

4040
{{/*
4141
Common labels
4242
*/}}
43-
{{- define "operator.labels" -}}
44-
helm.sh/chart: {{ include "operator.chart" . }}
45-
{{ include "operator.selectorLabels" . }}
43+
{{- define "secret-operator.labels" -}}
44+
helm.sh/chart: {{ include "secret-operator.chart" . }}
45+
{{ include "secret-operator.selectorLabels" . }}
4646
{{- if .Chart.AppVersion }}
4747
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
4848
{{- end }}
@@ -52,8 +52,8 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
5252
{{/*
5353
Selector labels
5454
*/}}
55-
{{- define "operator.selectorLabels" -}}
56-
app.kubernetes.io/name: {{ include "operator.appname" . }}
55+
{{- define "secret-operator.selectorLabels" -}}
56+
app.kubernetes.io/name: {{ include "secret-operator.appname" . }}
5757
app.kubernetes.io/instance: {{ .Release.Name }}
5858
{{- with .Values.labels }}
5959
{{ toYaml . }}
@@ -63,9 +63,9 @@ app.kubernetes.io/instance: {{ .Release.Name }}
6363
{{/*
6464
Create the name of the service account to use
6565
*/}}
66-
{{- define "operator.serviceAccountName" -}}
66+
{{- define "secret-operator.serviceAccountName" -}}
6767
{{- if .Values.serviceAccount.create }}
68-
{{- default (printf "%s-serviceaccount" (include "operator.fullname" .)) .Values.serviceAccount.name }}
68+
{{- default (printf "%s-serviceaccount" (include "secret-operator.fullname" .)) .Values.serviceAccount.name }}
6969
{{- else }}
7070
{{- 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 }}
7171
{{- end }}
@@ -74,13 +74,13 @@ Create the name of the service account to use
7474
{{/*
7575
Labels for Kubernetes objects created by helm test
7676
*/}}
77-
{{- define "operator.testLabels" -}}
78-
helm.sh/test: {{ include "operator.chart" . }}
77+
{{- define "secret-operator.testLabels" -}}
78+
helm.sh/test: {{ include "secret-operator.chart" . }}
7979
{{- end }}
8080

8181
{{/*
8282
Build the full operator container image reference.
8383
*/}}
84-
{{- define "operator.image" -}}
84+
{{- define "secret-operator.image" -}}
8585
{{- printf "%s/%s:%s" .Values.image.repository .Chart.Name (.Values.image.tag | default .Chart.AppVersion) -}}
8686
{{- end }}

deploy/helm/secret-operator/templates/_maintenance.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{{/*
22
Create a list of maintenance related env vars.
33
*/}}
4-
{{- define "maintenance.envVars" -}}
4+
{{- define "secret-operator.maintenance.envVars" -}}
55
{{- with .Values.maintenance }}
66
{{- if not .endOfSupportCheck.enabled }}
77
- name: EOS_DISABLED

deploy/helm/secret-operator/templates/_telemetry.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{{/*
22
Create a list of telemetry related env vars.
33
*/}}
4-
{{- define "telemetry.envVars" -}}
4+
{{- define "secret-operator.telemetry.envVars" -}}
55
{{- with .Values.telemetry }}
66
{{- if not .consoleLog.enabled }}
77
- name: CONSOLE_LOG_DISABLED
@@ -17,7 +17,7 @@ Create a list of telemetry related env vars.
1717
{{ end }}
1818
{{- if .fileLog.enabled }}
1919
- name: FILE_LOG_DIRECTORY
20-
value: /stackable/logs/{{ include "operator.appname" $ }}
20+
value: /stackable/logs/{{ include "secret-operator.appname" $ }}
2121
{{- end }}
2222
{{- if and .fileLog.enabled .fileLog.level }}
2323
- name: FILE_LOG_LEVEL

deploy/helm/secret-operator/templates/controller-deployment.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,39 @@
22
apiVersion: apps/v1
33
kind: Deployment
44
metadata:
5-
name: {{ include "operator.fullname" . }}
5+
name: {{ include "secret-operator.fullname" . }}
66
labels:
7-
{{- include "operator.labels" . | nindent 4 }}
7+
{{- include "secret-operator.labels" . | nindent 4 }}
88
spec:
99
selector:
1010
matchLabels:
11-
{{- include "operator.selectorLabels" . | nindent 6 }}
11+
{{- include "secret-operator.selectorLabels" . | nindent 6 }}
1212
template:
1313
metadata:
1414
annotations:
15-
internal.stackable.tech/image: "{{ include "operator.image" . }}"
15+
internal.stackable.tech/image: "{{ include "secret-operator.image" . }}"
1616
{{- with .Values.controllerService.podAnnotations }}
1717
{{- toYaml . | nindent 8 }}
1818
{{- end }}
1919
labels:
2020
{{- if .Values.maintenance.customResourceDefinitions.maintain }}
2121
webhook.stackable.tech/conversion: enabled
2222
{{- end }}
23-
{{- include "operator.selectorLabels" . | nindent 8 }}
23+
{{- include "secret-operator.selectorLabels" . | nindent 8 }}
2424
spec:
2525
{{- with .Values.image.pullSecrets }}
2626
imagePullSecrets:
2727
{{- toYaml . | nindent 8 }}
2828
{{- end }}
2929
# NOTE (@Techassi): Does it maybe make sense to have two different service accounts?
30-
serviceAccountName: {{ include "operator.serviceAccountName" . }}
30+
serviceAccountName: {{ include "secret-operator.serviceAccountName" . }}
3131
securityContext:
3232
{{- toYaml .Values.controllerService.podSecurityContext | nindent 8 }}
3333
containers:
34-
- name: {{ include "operator.appname" . }}
34+
- name: {{ include "secret-operator.appname" . }}
3535
securityContext:
3636
{{- toYaml .Values.controllerService.securityContext | nindent 12 }}
37-
image: "{{ include "operator.image" . }}"
37+
image: "{{ include "secret-operator.image" . }}"
3838
imagePullPolicy: {{ .Values.image.pullPolicy }}
3939
resources:
4040
{{ .Values.controllerService.resources | toYaml | nindent 12 }}
@@ -69,7 +69,7 @@ spec:
6969
# The name of the Kubernetes Service that point to the operator Pod, e.g. used to
7070
# construct the conversion webhook endpoint.
7171
- name: OPERATOR_SERVICE_NAME
72-
value: {{ include "operator.fullname" . }}
72+
value: {{ include "secret-operator.fullname" . }}
7373

7474
# The image repository, like "oci.stackable.tech/sdp"
7575
- name: IMAGE_REPOSITORY
@@ -86,8 +86,8 @@ spec:
8686
- name: KUBERNETES_CLUSTER_DOMAIN
8787
value: {{ .Values.kubernetesClusterDomain | quote }}
8888
{{- end }}
89-
{{- include "telemetry.envVars" . | nindent 12 }}
90-
{{- include "maintenance.envVars" . | nindent 12 }}
89+
{{- include "secret-operator.telemetry.envVars" . | nindent 12 }}
90+
{{- include "secret-operator.maintenance.envVars" . | nindent 12 }}
9191
{{- with .Values.controllerService.nodeSelector }}
9292
nodeSelector:
9393
{{- toYaml . | nindent 8 }}

deploy/helm/secret-operator/templates/csi-node-driver-daemonset.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,36 @@
22
apiVersion: apps/v1
33
kind: DaemonSet
44
metadata:
5-
name: {{ include "operator.fullname" . }}-csi-node-driver
5+
name: {{ include "secret-operator.fullname" . }}-csi-node-driver
66
labels:
7-
{{- include "operator.labels" . | nindent 4 }}
7+
{{- include "secret-operator.labels" . | nindent 4 }}
88
spec:
99
selector:
1010
matchLabels:
11-
{{- include "operator.selectorLabels" . | nindent 6 }}
11+
{{- include "secret-operator.selectorLabels" . | nindent 6 }}
1212
template:
1313
metadata:
1414
annotations:
15-
internal.stackable.tech/image: "{{ include "operator.image" . }}"
15+
internal.stackable.tech/image: "{{ include "secret-operator.image" . }}"
1616
{{- with .Values.csiNodeDriver.podAnnotations }}
1717
{{- toYaml . | nindent 8 }}
1818
{{- end }}
1919
labels:
20-
{{- include "operator.selectorLabels" . | nindent 8 }}
20+
{{- include "secret-operator.selectorLabels" . | nindent 8 }}
2121
spec:
2222
{{- with .Values.image.pullSecrets }}
2323
imagePullSecrets:
2424
{{- toYaml . | nindent 8 }}
2525
{{- end }}
2626
# NOTE (@Techassi): Does it maybe make sense to have two different service accounts?
27-
serviceAccountName: {{ include "operator.serviceAccountName" . }}
27+
serviceAccountName: {{ include "secret-operator.serviceAccountName" . }}
2828
securityContext:
2929
{{- toYaml .Values.csiNodeDriver.podSecurityContext | nindent 8 }}
3030
containers:
3131
- name: csi-node-service
3232
securityContext:
3333
{{- toYaml .Values.csiNodeDriver.nodeService.securityContext | nindent 12 }}
34-
image: "{{ include "operator.image" . }}"
34+
image: "{{ include "secret-operator.image" . }}"
3535
imagePullPolicy: {{ .Values.image.pullPolicy }}
3636
resources:
3737
{{ .Values.csiNodeDriver.nodeService.resources | toYaml | nindent 12 }}
@@ -70,7 +70,7 @@ spec:
7070
# The name of the Kubernetes Service that point to the operator Pod, e.g. used to
7171
# construct the conversion webhook endpoint.
7272
- name: OPERATOR_SERVICE_NAME
73-
value: {{ include "operator.fullname" . }}
73+
value: {{ include "secret-operator.fullname" . }}
7474

7575
# The image repository, like "oci.stackable.tech/sdp"
7676
- name: IMAGE_REPOSITORY
@@ -94,8 +94,8 @@ spec:
9494
- name: KUBERNETES_CLUSTER_DOMAIN
9595
value: {{ .Values.kubernetesClusterDomain | quote }}
9696
{{- end }}
97-
{{- include "telemetry.envVars" . | nindent 12 }}
98-
{{- include "maintenance.envVars" . | nindent 12 }}
97+
{{- include "secret-operator.telemetry.envVars" . | nindent 12 }}
98+
{{- include "secret-operator.maintenance.envVars" . | nindent 12 }}
9999
volumeMounts:
100100
- name: csi
101101
mountPath: /csi

deploy/helm/secret-operator/templates/csidriver.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ kind: CSIDriver
44
metadata:
55
name: secrets.stackable.tech
66
labels:
7-
{{- include "operator.labels" . | nindent 4 }}
7+
{{- include "secret-operator.labels" . | nindent 4 }}
88
spec:
99
attachRequired: false
1010
podInfoOnMount: true

deploy/helm/secret-operator/templates/roles.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ volumes:
3939
apiVersion: rbac.authorization.k8s.io/v1
4040
kind: ClusterRole
4141
metadata:
42-
name: {{ include "operator.fullname" . }}-clusterrole
42+
name: {{ include "secret-operator.fullname" . }}-clusterrole
4343
labels:
44-
{{- include "operator.labels" . | nindent 4 }}
44+
{{- include "secret-operator.labels" . | nindent 4 }}
4545
rules:
4646
# Required for maintaining the CRDs (including the conversion webhook configuration) and
4747
# for the startup condition check.

deploy/helm/secret-operator/templates/service.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ metadata:
66
# Note(@sbernauer): We could also call the Service something like
77
# "product-operator-conversion-webhook". However, in the future we will have more webhooks, and
88
# it seems like an overkill to have a dedicated Service per webhook.
9-
name: {{ include "operator.fullname" . }}
9+
name: {{ include "secret-operator.fullname" . }}
1010
labels:
11-
{{- include "operator.labels" . | nindent 4 }}
11+
{{- include "secret-operator.labels" . | nindent 4 }}
1212
spec:
1313
selector:
1414
{{- if .Values.maintenance.customResourceDefinitions.maintain }}
1515
webhook.stackable.tech/conversion: enabled
1616
{{- end }}
17-
{{- include "operator.selectorLabels" . | nindent 4 }}
17+
{{- include "secret-operator.selectorLabels" . | nindent 4 }}
1818
ports:
1919
- name: conversion-webhook
2020
protocol: TCP

deploy/helm/secret-operator/templates/serviceaccount.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
apiVersion: v1
44
kind: ServiceAccount
55
metadata:
6-
name: {{ include "operator.serviceAccountName" . }}
6+
name: {{ include "secret-operator.serviceAccountName" . }}
77
labels:
8-
{{- include "operator.labels" . | nindent 4 }}
8+
{{- include "secret-operator.labels" . | nindent 4 }}
99
{{- with .Values.serviceAccount.annotations }}
1010
annotations:
1111
{{- toYaml . | nindent 4 }}
@@ -17,14 +17,14 @@ apiVersion: rbac.authorization.k8s.io/v1
1717
# operator watch and manage its custom resources across the cluster.
1818
kind: ClusterRoleBinding
1919
metadata:
20-
name: {{ include "operator.fullname" . }}-clusterrolebinding
20+
name: {{ include "secret-operator.fullname" . }}-clusterrolebinding
2121
labels:
22-
{{- include "operator.labels" . | nindent 4 }}
22+
{{- include "secret-operator.labels" . | nindent 4 }}
2323
subjects:
2424
- kind: ServiceAccount
25-
name: {{ include "operator.serviceAccountName" . }}
25+
name: {{ include "secret-operator.serviceAccountName" . }}
2626
namespace: {{ .Release.Namespace }}
2727
roleRef:
2828
kind: ClusterRole
29-
name: {{ include "operator.fullname" . }}-clusterrole
29+
name: {{ include "secret-operator.fullname" . }}-clusterrole
3030
apiGroup: rbac.authorization.k8s.io

0 commit comments

Comments
 (0)