Skip to content

Commit 2547b97

Browse files
committed
Allow extra containers, volumes, ... in the deployment
This allows anyone to add side cares, like one to parse logs written to disk and index these logs in an internal system. fix tolerations as is supposed to be an array.
1 parent 7afb9ba commit 2547b97

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

chart/templates/deployment.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,14 @@ spec:
1919
labels:
2020
control-plane: controller-manager
2121
{{- include "chart.selectorLabels" . | nindent 8 }}
22+
{{- with .Values.controllerManager.labels }}
23+
{{- toYaml . | nindent 8 }}
24+
{{- end }}
2225
annotations:
2326
kubectl.kubernetes.io/default-container: manager
27+
{{- with .Values.controllerManager.annotations }}
28+
{{- toYaml . | nindent 8 }}
29+
{{- end }}
2430
spec:
2531
containers:
2632
- args: {{- toYaml .Values.controllerManager.kubeRbacProxy.args | nindent 8 }}
@@ -64,10 +70,21 @@ spec:
6470
port: 8081
6571
initialDelaySeconds: 5
6672
periodSeconds: 10
73+
{{- with .Values.controllerManager.manager.volumeMounts }}
74+
volumeMounts:
75+
{{- toYaml . | nindent 8 }}
76+
{{- end }}
6777
resources: {{- toYaml .Values.controllerManager.manager.resources | nindent 10
6878
}}
6979
securityContext: {{- toYaml .Values.controllerManager.manager.containerSecurityContext
7080
| nindent 10 }}
81+
{{- with .Values.controllerManager.extraContainers }}
82+
{{- toYaml . | nindent 6 }}
83+
{{- end }}
84+
{{- with .Values.controllerManager.volumes }}
85+
volumes:
86+
{{- toYaml . | nindent 6 }}
87+
{{- end }}
7188
securityContext:
7289
runAsNonRoot: true
7390
serviceAccountName: {{ include "chart.fullname" . }}-controller-manager

chart/values.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
controllerManager:
2+
annotations: {}
3+
labels: {}
24
serviceMonitor:
35
enabled: false
46
kubeRbacProxy:
@@ -43,10 +45,13 @@ controllerManager:
4345
requests:
4446
cpu: 10m
4547
memory: 64Mi
48+
volumeMounts: []
49+
extraContainers: []
50+
volumes: []
4651
replicas: 1
4752
serviceAccount:
4853
annotations: {}
49-
tolerations: {}
54+
tolerations: []
5055
kubernetesClusterDomain: cluster.local
5156
metricsService:
5257
ports:

0 commit comments

Comments
 (0)