Skip to content

Commit 974e775

Browse files
committed
chore(helm): Remove "with" directive because Deployment/DaemonSet containers are not optional
NOTE: These were incorrectly introduced in 463592a while trying to hash out the structure of the values.
1 parent 7193a1f commit 974e775

File tree

2 files changed

+50
-54
lines changed

2 files changed

+50
-54
lines changed
Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,40 @@
11
---
2-
{{- with .Values.csiNodeDriver }}
32
apiVersion: apps/v1
43
kind: DaemonSet
54
metadata:
6-
name: {{ include "operator.fullname" $ }}-csi-node-driver
5+
name: {{ include "operator.fullname" . }}-csi-node-driver
76
labels:
8-
{{- include "operator.labels" $ | nindent 4 }}
7+
{{- include "operator.labels" . | nindent 4 }}
98
spec:
109
selector:
1110
matchLabels:
1211
app.kubernetes.io/role: node-driver
13-
{{- include "operator.selectorLabels" $ | nindent 6 }}
12+
{{- include "operator.selectorLabels" . | nindent 6 }}
1413
template:
1514
metadata:
16-
{{- with .podAnnotations }}
15+
{{- with .Values.csiNodeDriver.podAnnotations }}
1716
annotations:
1817
{{- toYaml . | nindent 8 }}
1918
{{- end }}
2019
labels:
2120
app.kubernetes.io/role: node-driver
22-
{{- include "operator.selectorLabels" $ | nindent 8 }}
21+
{{- include "operator.selectorLabels" . | nindent 8 }}
2322
spec:
24-
{{- with $.Values.image.pullSecrets }}
23+
{{- with .Values.image.pullSecrets }}
2524
imagePullSecrets:
2625
{{- toYaml . | nindent 8 }}
2726
{{- end }}
28-
serviceAccountName: {{ include "operator.fullname" $ }}-serviceaccount
27+
serviceAccountName: {{ include "operator.fullname" . }}-serviceaccount
2928
securityContext:
30-
{{- toYaml .podSecurityContext | nindent 8 }}
29+
{{- toYaml .Values.csiNodeDriver.podSecurityContext | nindent 8 }}
3130
containers:
3231
- name: csi-node-service
3332
securityContext:
34-
{{- toYaml .nodeService.securityContext | nindent 12 }}
35-
image: "{{ $.Values.image.repository }}:{{ $.Values.image.tag | default $.Chart.AppVersion }}"
36-
imagePullPolicy: {{ $.Values.image.pullPolicy }}
33+
{{- toYaml .Values.csiNodeDriver.nodeService.securityContext | nindent 12 }}
34+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
35+
imagePullPolicy: {{ .Values.image.pullPolicy }}
3736
resources:
38-
{{ .nodeService.resources | toYaml | nindent 12 }}
37+
{{ .Values.csiNodeDriver.nodeService.resources | toYaml | nindent 12 }}
3938
args:
4039
- run
4140
- node
@@ -66,7 +65,7 @@ spec:
6665
# The name of the Kubernetes Service that point to the operator Pod, e.g. used to
6766
# construct the conversion webhook endpoint.
6867
- name: OPERATOR_SERVICE_NAME
69-
value: {{ include "operator.fullname" $ }}
68+
value: {{ include "operator.fullname" . }}
7069

7170
# Operators need to know the node name they are running on, to e.g. discover the
7271
# Kubernetes domain name from the kubelet API.
@@ -75,24 +74,24 @@ spec:
7574
fieldRef:
7675
fieldPath: spec.nodeName
7776

78-
{{- if $.Values.kubernetesClusterDomain }}
77+
{{- if .Values.kubernetesClusterDomain }}
7978
- name: KUBERNETES_CLUSTER_DOMAIN
80-
value: {{ $.Values.kubernetesClusterDomain | quote }}
79+
value: {{ .Values.kubernetesClusterDomain | quote }}
8180
{{- end }}
82-
{{- include "telemetry.envVars" $ | nindent 12 }}
81+
{{- include "telemetry.envVars" . | nindent 12 }}
8382
volumeMounts:
8483
- name: csi
8584
mountPath: /csi
8685
- name: mountpoint
87-
mountPath: {{ $.Values.kubeletDir }}/pods
86+
mountPath: {{ .Values.kubeletDir }}/pods
8887
- name: node-driver-registrar
89-
image: "{{ .nodeRegistrar.image.repository }}:{{ .nodeRegistrar.image.tag }}"
90-
imagePullPolicy: {{ .nodeRegistrar.image.pullPolicy }}
88+
image: "{{ .Values.csiNodeDriver.nodeRegistrar.image.repository }}:{{ .Values.csiNodeDriver.nodeRegistrar.image.tag }}"
89+
imagePullPolicy: {{ .Values.csiNodeDriver.nodeRegistrar.image.pullPolicy }}
9190
resources:
92-
{{ .nodeRegistrar.resources | toYaml | nindent 12 }}
91+
{{ .Values.csiNodeDriver.nodeRegistrar.resources | toYaml | nindent 12 }}
9392
args:
9493
- --csi-address=/csi/csi.sock
95-
- --kubelet-registration-path={{ $.Values.kubeletDir }}/plugins/listeners.stackable.tech/csi.sock
94+
- --kubelet-registration-path={{ .Values.kubeletDir }}/plugins/listeners.stackable.tech/csi.sock
9695
volumeMounts:
9796
- name: registration-sock
9897
mountPath: /registration
@@ -103,23 +102,22 @@ spec:
103102
hostPath:
104103
# node-driver-registrar appends a driver-unique filename to this path to avoid conflicts
105104
# see https://github.com/stackabletech/secret-operator/issues/229 for why this path should not be too long
106-
path: {{ $.Values.kubeletDir }}/plugins_registry
105+
path: {{ .Values.kubeletDir }}/plugins_registry
107106
- name: csi
108107
hostPath:
109-
path: {{ $.Values.kubeletDir }}/plugins/listeners.stackable.tech/
108+
path: {{ .Values.kubeletDir }}/plugins/listeners.stackable.tech/
110109
- name: mountpoint
111110
hostPath:
112-
path: {{ $.Values.kubeletDir }}/pods/
113-
{{- with .nodeSelector }}
111+
path: {{ .Values.kubeletDir }}/pods/
112+
{{- with .Values.csiNodeDriver.nodeSelector }}
114113
nodeSelector:
115114
{{- toYaml . | nindent 8 }}
116115
{{- end }}
117-
{{- with .affinity }}
116+
{{- with .Values.csiNodeDriver.affinity }}
118117
affinity:
119118
{{- toYaml . | nindent 8 }}
120119
{{- end }}
121-
{{- with .tolerations }}
120+
{{- with .Values.csiNodeDriver.tolerations }}
122121
tolerations:
123122
{{- toYaml . | nindent 8 }}
124123
{{- end }}
125-
{{- end }}

deploy/helm/listener-operator/templates/csi-provisioner-deployment.yaml

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,41 @@
11
---
2-
{{- with .Values.csiProvisioner }}
32
apiVersion: apps/v1
43
kind: Deployment
54
metadata:
6-
name: {{ include "operator.fullname" $ }}-csi-provisioner
5+
name: {{ include "operator.fullname" . }}-csi-provisioner
76
labels:
8-
{{- include "operator.labels" $ | nindent 4 }}
7+
{{- include "operator.labels" . | nindent 4 }}
98
spec:
109
selector:
1110
matchLabels:
1211
app.kubernetes.io/role: provisioner
13-
{{- include "operator.selectorLabels" $ | nindent 6 }}
12+
{{- include "operator.selectorLabels" . | nindent 6 }}
1413
template:
1514
metadata:
1615
annotations:
17-
internal.stackable.tech/image: "{{ $.Values.image.repository }}:{{ $.Values.image.tag | default $.Chart.AppVersion }}"
18-
{{- with .podAnnotations }}
16+
internal.stackable.tech/image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
17+
{{- with .Values.csiProvisioner.podAnnotations }}
1918
{{- toYaml . | nindent 8 }}
2019
{{- end }}
2120
labels:
2221
app.kubernetes.io/role: provisioner
23-
{{- include "operator.selectorLabels" $ | nindent 8 }}
22+
{{- include "operator.selectorLabels" . | nindent 8 }}
2423
spec:
25-
{{- with $.Values.imagePullSecrets }}
24+
{{- with .Values.imagePullSecrets }}
2625
imagePullSecrets:
2726
{{- toYaml . | nindent 8 }}
2827
{{- end }}
29-
serviceAccountName: {{ include "operator.fullname" $ }}-serviceaccount
28+
serviceAccountName: {{ include "operator.fullname" . }}-serviceaccount
3029
securityContext:
31-
{{- toYaml .podSecurityContext | nindent 8 }}
30+
{{- toYaml .Values.csiProvisioner.podSecurityContext | nindent 8 }}
3231
containers:
3332
- name: csi-controller-service
3433
securityContext:
35-
{{- toYaml .controllerService.securityContext | nindent 12 }}
36-
image: "{{ $.Values.image.repository }}:{{ $.Values.image.tag | default $.Chart.AppVersion }}"
37-
imagePullPolicy: {{ $.Values.image.pullPolicy }}
34+
{{- toYaml .Values.csiProvisioner.controllerService.securityContext | nindent 12 }}
35+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
36+
imagePullPolicy: {{ .Values.image.pullPolicy }}
3837
resources:
39-
{{- .controllerService.resources | toYaml | nindent 12 }}
38+
{{- .Values.csiProvisioner.controllerService.resources | toYaml | nindent 12 }}
4039
args:
4140
- run
4241
- controller
@@ -67,7 +66,7 @@ spec:
6766
# The name of the Kubernetes Service that point to the operator Pod, e.g. used to
6867
# construct the conversion webhook endpoint.
6968
- name: OPERATOR_SERVICE_NAME
70-
value: {{ include "operator.fullname" $ }}
69+
value: {{ include "operator.fullname" . }}
7170

7271
# Operators need to know the node name they are running on, to e.g. discover the
7372
# Kubernetes domain name from the kubelet API.
@@ -76,19 +75,19 @@ spec:
7675
fieldRef:
7776
fieldPath: spec.nodeName
7877

79-
{{- if $.Values.kubernetesClusterDomain }}
78+
{{- if .Values.kubernetesClusterDomain }}
8079
- name: KUBERNETES_CLUSTER_DOMAIN
81-
value: {{ $.Values.kubernetesClusterDomain | quote }}
80+
value: {{ .Values.kubernetesClusterDomain | quote }}
8281
{{- end }}
83-
{{- include "telemetry.envVars" $ | nindent 12 }}
82+
{{- include "telemetry.envVars" . | nindent 12 }}
8483
volumeMounts:
8584
- name: csi
8685
mountPath: /csi
8786
- name: external-provisioner
88-
image: "{{ .externalProvisioner.image.repository }}:{{ .externalProvisioner.image.tag }}"
89-
imagePullPolicy: {{ .externalProvisioner.image.pullPolicy }}
87+
image: "{{ .Values.csiProvisioner.externalProvisioner.image.repository }}:{{ .Values.csiProvisioner.externalProvisioner.image.tag }}"
88+
imagePullPolicy: {{ .Values.csiProvisioner.externalProvisioner.image.pullPolicy }}
9089
resources:
91-
{{ .externalProvisioner.resources | toYaml | nindent 12 }}
90+
{{ .Values.csiProvisioner.externalProvisioner.resources | toYaml | nindent 12 }}
9291
args:
9392
- --csi-address=/csi/csi.sock
9493
- --feature-gates=Topology=true
@@ -99,16 +98,15 @@ spec:
9998
volumes:
10099
- name: csi
101100
emptyDir: {}
102-
{{- with .nodeSelector }}
101+
{{- with .Values.csiProvisioner.nodeSelector }}
103102
nodeSelector:
104103
{{- toYaml . | nindent 8 }}
105104
{{- end }}
106-
{{- with .affinity }}
105+
{{- with .Values.csiProvisioner.affinity }}
107106
affinity:
108107
{{- toYaml . | nindent 8 }}
109108
{{- end }}
110-
{{- with .tolerations }}
109+
{{- with .Values.csiProvisioner.tolerations }}
111110
tolerations:
112111
{{- toYaml . | nindent 8 }}
113112
{{- end }}
114-
{{- end }}

0 commit comments

Comments
 (0)