Skip to content

Commit 2ec54d1

Browse files
chore: Update templated files (bcf54b7) (#825)
* 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 6c95861 commit 2ec54d1

9 files changed

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

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

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

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

‎deploy/helm/hdfs-operator/templates/clusterrole-operator.yaml‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
apiVersion: rbac.authorization.k8s.io/v1
33
kind: ClusterRole
44
metadata:
5-
name: {{ include "operator.fullname" . }}-clusterrole
5+
name: {{ include "hdfs-operator.fullname" . }}-clusterrole
66
labels:
7-
{{- include "operator.labels" . | nindent 4 }}
7+
{{- include "hdfs-operator.labels" . | nindent 4 }}
88
rules:
99
# For automatic cluster domain detection (reads kubelet config via the nodes/proxy API).
1010
- apiGroups:
@@ -104,18 +104,18 @@ rules:
104104
- watch
105105
# Watch HdfsClusters for reconciliation
106106
- apiGroups:
107-
- {{ include "operator.name" . }}.stackable.tech
107+
- {{ include "hdfs-operator.name" . }}.stackable.tech
108108
resources:
109-
- {{ include "operator.name" . }}clusters
109+
- {{ include "hdfs-operator.name" . }}clusters
110110
verbs:
111111
- get
112112
- list
113113
- watch
114114
# Status subresource: updated at the end of every reconciliation.
115115
- apiGroups:
116-
- {{ include "operator.name" . }}.stackable.tech
116+
- {{ include "hdfs-operator.name" . }}.stackable.tech
117117
resources:
118-
- {{ include "operator.name" . }}clusters/status
118+
- {{ include "hdfs-operator.name" . }}clusters/status
119119
verbs:
120120
- patch
121121
# Manage the hdfs-clusterrolebinding-nodes ClusterRoleBinding via Server-Side Apply.
@@ -126,7 +126,7 @@ rules:
126126
resources:
127127
- clusterrolebindings
128128
resourceNames:
129-
- {{ include "operator.name" . }}-clusterrolebinding-nodes
129+
- {{ include "hdfs-operator.name" . }}-clusterrolebinding-nodes
130130
verbs:
131131
- create
132132
- patch
@@ -144,5 +144,5 @@ rules:
144144
verbs:
145145
- bind
146146
resourceNames:
147-
- {{ include "operator.name" . }}-clusterrole
148-
- {{ include "operator.name" . }}-clusterrole-nodes
147+
- {{ include "hdfs-operator.name" . }}-clusterrole
148+
- {{ include "hdfs-operator.name" . }}-clusterrole-nodes

‎deploy/helm/hdfs-operator/templates/clusterrole-product.yaml‎

Lines changed: 4 additions & 4 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 "hdfs-operator.name" . }}-clusterrole
88
labels:
9-
{{- include "operator.labels" . | nindent 4 }}
9+
{{- include "hdfs-operator.labels" . | nindent 4 }}
1010
rules:
1111
# List and get pods for peer discovery (e.g. format-namenodes discovering namenode peers).
1212
# These must live here in the product ClusterRole (not just in the nodes ClusterRole) because
@@ -38,9 +38,9 @@ rules:
3838
apiVersion: rbac.authorization.k8s.io/v1
3939
kind: ClusterRole
4040
metadata:
41-
name: {{ include "operator.name" . }}-clusterrole-nodes
41+
name: {{ include "hdfs-operator.name" . }}-clusterrole-nodes
4242
labels:
43-
{{- include "operator.labels" . | nindent 4 }}
43+
{{- include "hdfs-operator.labels" . | nindent 4 }}
4444
rules:
4545
# The topology provider (rack awareness) running inside HDFS pods queries pod, node, and
4646
# endpoint information to compute rack labels for DataNodes.

‎deploy/helm/hdfs-operator/templates/deployment.yaml‎

Lines changed: 11 additions & 11 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 "hdfs-operator.fullname" . }}-deployment
66
labels:
7-
{{- include "operator.labels" . | nindent 4 }}
7+
{{- include "hdfs-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 "hdfs-operator.selectorLabels" . | nindent 6 }}
1515
template:
1616
metadata:
1717
annotations:
18-
internal.stackable.tech/image: {{ include "operator.image" . }}
18+
internal.stackable.tech/image: {{ include "hdfs-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 "hdfs-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 "hdfs-operator.serviceAccountName" . }}
3333
securityContext:
3434
{{- toYaml .Values.podSecurityContext | nindent 8 }}
3535
containers:
36-
- name: {{ include "operator.appname" . }}
36+
- name: {{ include "hdfs-operator.appname" . }}
3737
securityContext:
3838
{{- toYaml .Values.securityContext | nindent 12 }}
39-
image: {{ include "operator.image" . }}
39+
image: {{ include "hdfs-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 "hdfs-operator.fullname" . }}
6868

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

85-
{{- include "telemetry.envVars" . | nindent 12 }}
86-
{{- include "maintenance.envVars" . | nindent 12 }}
85+
{{- include "hdfs-operator.telemetry.envVars" . | nindent 12 }}
86+
{{- include "hdfs-operator.maintenance.envVars" . | nindent 12 }}
8787
{{- with .Values.nodeSelector }}
8888
nodeSelector:
8989
{{- toYaml . | nindent 8 }}

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

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

0 commit comments

Comments
 (0)