Skip to content

Commit

Permalink
feat: add ability to configure node tolerations for controller
Browse files Browse the repository at this point in the history
  • Loading branch information
mentlak0 committed Jul 17, 2023
1 parent 85181cd commit 67d7309
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,19 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end}}
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- helmTemplateRemoveMe: |
{{- with .Values.controllerDeploymentTolerations.nodeSelectorTerms }}
{{- toYaml . | nindent 12 }}
{{- end}}
- matchExpressions:
- key: kubernetes.io/os
operator: NotIn
values:
- windows
containers:
- name: tekton-pipelines-controller
envFrom:
Expand All @@ -30,3 +43,13 @@ spec:
optional: true
helmTemplateRemoveMe: |
image: {{ .Values.controller.deployment.image }}
nodeSelector:
helmTemplateRemoveMe: |
{{- with .Values.controllerDeploymentTolerations.nodeSelector }}
{{- toYaml . | nindent 8 }}
{{- end}}
tolerations:
- helmTemplateRemoveMe: |
{{- with .Values.controllerDeploymentTolerations.tolerations }}
{{- toYaml . | nindent 6 }}
{{- end}}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ spec:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
{{- with .Values.controllerDeploymentTolerations.nodeSelectorTerms }}
{{- toYaml . | nindent 12 }}
{{- end}}
- matchExpressions:
- key: kubernetes.io/os
operator: NotIn
Expand Down Expand Up @@ -147,7 +150,15 @@ spec:
name: verification-secrets
readOnly: true
image: {{ .Values.controller.deployment.image }}
nodeSelector:
{{- with .Values.controllerDeploymentTolerations.nodeSelector }}
{{- toYaml . | nindent 8 }}
{{- end}}
serviceAccountName: tekton-pipelines-controller
tolerations:
{{- with .Values.controllerDeploymentTolerations.tolerations }}
{{- toYaml . | nindent 6 }}
{{- end}}
volumes:
- configMap:
name: config-logging
Expand Down
7 changes: 6 additions & 1 deletion charts/tekton-pipeline/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,16 @@ remoteResolversPod:
requests:
cpu: 100m
memory: 100Mi
# Add tolerations for tekton-remote-resolvers
# Add node affinity tolerations for tekton-remote-resolvers
resolverDeploymentTolerations:
nodeAffinity: []
nodeSelector: []
tolerations: []
# Add node affinity tolerations for tekton-pipeline-controller
controllerDeploymentTolerations:
nodeSelectorTerms: []
nodeSelector: []
tolerations:
gitResolverConfig:
# The maximum amount of time a single anonymous cloning resolution may take.
fetch-timeout: "1m"
Expand Down

0 comments on commit 67d7309

Please sign in to comment.