Skip to content

Commit 0847ffe

Browse files
RoshickRieb, Elias
and
Rieb, Elias
authored
feat: add topologySpreadConstraints, nodeSelector and tolerations to … (#46)
* feat: add topologySpreadConstraints, nodeSelector and tolerations to controller deployment * feat: allow pod annotations of controller deployment to be set --------- Co-authored-by: Rieb, Elias <[email protected]>
1 parent 5c8ebd8 commit 0847ffe

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

spacelift-workerpool-controller/templates/deployment.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ spec:
2121
{{- include "spacelift-workerpool-controller.selectorLabels" . | nindent 8 }}
2222
annotations:
2323
kubectl.kubernetes.io/default-container: manager
24+
{{- with .Values.controllerManager.podAnnotations }}
25+
{{- toYaml . | nindent 8}}
26+
{{- end }}
2427
spec:
2528
affinity:
2629
nodeAffinity:
@@ -96,3 +99,15 @@ spec:
9699
type: RuntimeDefault
97100
serviceAccountName: {{ include "spacelift-workerpool-controller.fullname" . }}-controller-manager
98101
terminationGracePeriodSeconds: 10
102+
{{- with .Values.controllerManager.topologySpreadConstraints }}
103+
topologySpreadConstraints:
104+
{{- toYaml . | nindent 8}}
105+
{{- end }}
106+
{{- with .Values.controllerManager.nodeSelector }}
107+
nodeSelector:
108+
{{- toYaml . | nindent 8 }}
109+
{{- end }}
110+
{{- with .Values.controllerManager.tolerations }}
111+
tolerations:
112+
{{- toYaml . | nindent 8 }}
113+
{{- end }}

spacelift-workerpool-controller/values.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,12 @@ controllerManager:
4646
cpu: 100m
4747
memory: 128Mi
4848
replicas: 1
49+
podAnnotations: {}
4950
serviceAccount:
5051
annotations: {}
52+
nodeSelector: {}
53+
tolerations: []
54+
topologySpreadConstraints: []
5155
kubernetesClusterDomain: cluster.local
5256
# The metric service will expose a metrics endpoint that can be scraped by a prometheus instance.
5357
# This is disabled by default, enable this if you want to enable controller observability.

0 commit comments

Comments
 (0)