Skip to content

Commit 09b3d8d

Browse files
chore: Update templated files (bcf54b7) (#884)
* 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 a225df3 commit 09b3d8d

9 files changed

Lines changed: 48 additions & 48 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 "opa-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 "opa-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 "opa-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 "opa-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 "opa-operator.labels" -}}
44+
helm.sh/chart: {{ include "opa-operator.chart" . }}
45+
{{ include "opa-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 "opa-operator.selectorLabels" -}}
56+
app.kubernetes.io/name: {{ include "opa-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 "opa-operator.serviceAccountName" -}}
6767
{{- if .Values.serviceAccount.create }}
68-
{{- default (printf "%s-serviceaccount" (include "operator.fullname" .)) .Values.serviceAccount.name }}
68+
{{- default (printf "%s-serviceaccount" (include "opa-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 "opa-operator.testLabels" -}}
78+
helm.sh/test: {{ include "opa-operator.chart" . }}
7979
{{- end }}
8080

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

deploy/helm/opa-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 "opa-operator.maintenance.envVars" -}}
55
{{- with .Values.maintenance }}
66
{{- if not .endOfSupportCheck.enabled }}
77
- name: EOS_DISABLED

deploy/helm/opa-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 "opa-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 "opa-operator.appname" $ }}
2121
{{- end }}
2222
{{- if and .fileLog.enabled .fileLog.level }}
2323
- name: FILE_LOG_LEVEL

deploy/helm/opa-operator/templates/clusterrole-operator.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
apiVersion: rbac.authorization.k8s.io/v1
55
kind: ClusterRole
66
metadata:
7-
name: {{ include "operator.fullname" . }}-clusterrole
7+
name: {{ include "opa-operator.fullname" . }}-clusterrole
88
labels:
9-
{{- include "operator.labels" . | nindent 4 }}
9+
{{- include "opa-operator.labels" . | nindent 4 }}
1010
rules:
1111
# For automatic cluster domain detection
1212
- apiGroups:
@@ -54,7 +54,7 @@ rules:
5454
verbs:
5555
- bind
5656
resourceNames:
57-
- {{ include "operator.name" . }}-clusterrole
57+
- {{ include "opa-operator.name" . }}-clusterrole
5858
# DaemonSet created per role group. Applied via SSA, tracked for orphan cleanup, and
5959
# owned by the controller.
6060
- apiGroups:
@@ -94,17 +94,17 @@ rules:
9494
- patch
9595
# Primary CRD: watched by the controller and read during reconciliation.
9696
- apiGroups:
97-
- {{ include "operator.name" . }}.stackable.tech
97+
- {{ include "opa-operator.name" . }}.stackable.tech
9898
resources:
99-
- {{ include "operator.name" . }}clusters
99+
- {{ include "opa-operator.name" . }}clusters
100100
verbs:
101101
- get
102102
- list
103103
- watch
104104
# Status subresource: updated at the end of every reconciliation.
105105
- apiGroups:
106-
- {{ include "operator.name" . }}.stackable.tech
106+
- {{ include "opa-operator.name" . }}.stackable.tech
107107
resources:
108-
- {{ include "operator.name" . }}clusters/status
108+
- {{ include "opa-operator.name" . }}clusters/status
109109
verbs:
110110
- patch

deploy/helm/opa-operator/templates/clusterrole-product.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
apiVersion: rbac.authorization.k8s.io/v1
55
kind: ClusterRole
66
metadata:
7-
name: {{ include "operator.name" . }}-clusterrole
7+
name: {{ include "opa-operator.name" . }}-clusterrole
88
labels:
9-
{{- include "operator.labels" . | nindent 4 }}
9+
{{- include "opa-operator.labels" . | nindent 4 }}
1010
rules:
1111
# The bundle-builder sidecar lists and watches ConfigMaps labeled opa.stackable.tech/bundle
1212
# to compile Rego rules into bundles. It shares this ServiceAccount because the bundle-builder

deploy/helm/opa-operator/templates/deployment.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,41 @@
22
apiVersion: apps/v1
33
kind: Deployment
44
metadata:
5-
name: {{ include "operator.fullname" . }}-deployment
5+
name: {{ include "opa-operator.fullname" . }}-deployment
66
labels:
7-
{{- include "operator.labels" . | nindent 4 }}
7+
{{- include "opa-operator.labels" . | nindent 4 }}
88
spec:
99
replicas: 1
1010
strategy:
1111
type: Recreate
1212
selector:
1313
matchLabels:
14-
{{- include "operator.selectorLabels" . | nindent 6 }}
14+
{{- include "opa-operator.selectorLabels" . | nindent 6 }}
1515
template:
1616
metadata:
1717
annotations:
18-
internal.stackable.tech/image: {{ include "operator.image" . }}
18+
internal.stackable.tech/image: {{ include "opa-operator.image" . }}
1919
{{- with .Values.podAnnotations }}
2020
{{- toYaml . | nindent 8 }}
2121
{{- end }}
2222
labels:
2323
{{- if .Values.maintenance.customResourceDefinitions.maintain }}
2424
webhook.stackable.tech/conversion: enabled
2525
{{- end }}
26-
{{- include "operator.selectorLabels" . | nindent 8 }}
26+
{{- include "opa-operator.selectorLabels" . | nindent 8 }}
2727
spec:
2828
{{- with .Values.image.pullSecrets }}
2929
imagePullSecrets:
3030
{{- toYaml . | nindent 8 }}
3131
{{- end }}
32-
serviceAccountName: {{ include "operator.serviceAccountName" . }}
32+
serviceAccountName: {{ include "opa-operator.serviceAccountName" . }}
3333
securityContext:
3434
{{- toYaml .Values.podSecurityContext | nindent 8 }}
3535
containers:
36-
- name: {{ include "operator.appname" . }}
36+
- name: {{ include "opa-operator.appname" . }}
3737
securityContext:
3838
{{- toYaml .Values.securityContext | nindent 12 }}
39-
image: {{ include "operator.image" . }}
39+
image: {{ include "opa-operator.image" . }}
4040
imagePullPolicy: {{ .Values.image.pullPolicy }}
4141
resources:
4242
{{- toYaml .Values.resources | nindent 12 }}
@@ -64,7 +64,7 @@ spec:
6464
# The name of the Kubernetes Service that point to the operator Pod, e.g. used to
6565
# construct the conversion webhook endpoint.
6666
- name: OPERATOR_SERVICE_NAME
67-
value: {{ include "operator.fullname" . }}
67+
value: {{ include "opa-operator.fullname" . }}
6868

6969
# The product image repository, like "oci.stackable.tech/sdp".
7070
- name: IMAGE_REPOSITORY
@@ -82,10 +82,10 @@ spec:
8282
value: {{ .Values.kubernetesClusterDomain | quote }}
8383
{{- end }}
8484

85-
{{- include "telemetry.envVars" . | nindent 12 }}
86-
{{- include "maintenance.envVars" . | nindent 12 }}
85+
{{- include "opa-operator.telemetry.envVars" . | nindent 12 }}
86+
{{- include "opa-operator.maintenance.envVars" . | nindent 12 }}
8787
- name: OPA_BUNDLE_BUILDER_CLUSTERROLE
88-
value: {{ include "operator.fullname" . }}-opa-bundle-builder-clusterrole
88+
value: {{ include "opa-operator.fullname" . }}-opa-bundle-builder-clusterrole
8989
{{- with .Values.nodeSelector }}
9090
nodeSelector:
9191
{{- toYaml . | nindent 8 }}

deploy/helm/opa-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 "opa-operator.fullname" . }}
1010
labels:
11-
{{- include "operator.labels" . | nindent 4 }}
11+
{{- include "opa-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 "opa-operator.selectorLabels" . | nindent 4 }}
1818
ports:
1919
- name: conversion-webhook
2020
protocol: TCP

deploy/helm/opa-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 "opa-operator.serviceAccountName" . }}
77
labels:
8-
{{- include "operator.labels" . | nindent 4 }}
8+
{{- include "opa-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 "opa-operator.fullname" . }}-clusterrolebinding
2121
labels:
22-
{{- include "operator.labels" . | nindent 4 }}
22+
{{- include "opa-operator.labels" . | nindent 4 }}
2323
subjects:
2424
- kind: ServiceAccount
25-
name: {{ include "operator.serviceAccountName" . }}
25+
name: {{ include "opa-operator.serviceAccountName" . }}
2626
namespace: {{ .Release.Namespace }}
2727
roleRef:
2828
kind: ClusterRole
29-
name: {{ include "operator.fullname" . }}-clusterrole
29+
name: {{ include "opa-operator.fullname" . }}-clusterrole
3030
apiGroup: rbac.authorization.k8s.io

0 commit comments

Comments
 (0)