Skip to content

Commit

Permalink
add arch, os, and provisioner anti-affinities for the karpenter deplo…
Browse files Browse the repository at this point in the history
…yment (#468)

* add arch, os, and provisioner anti-affinities for the karpenter deployment

* remove provisioner anti-affinity

* remove arch affinity
  • Loading branch information
bwagner5 authored Jun 23, 2021
1 parent 1e1ffc8 commit 72dfd56
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
15 changes: 12 additions & 3 deletions charts/karpenter/templates/controller/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,19 @@ spec:
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.controller.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.controller.affinity }}
{{- toYaml .Values.controller.affinity | nindent 8 }}
{{- else }}
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/os
operator: In
values:
- linux
{{- end }}
{{- with .Values.controller.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
Expand Down
15 changes: 12 additions & 3 deletions charts/karpenter/templates/webhook/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,19 @@ spec:
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.webhook.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.webhook.affinity }}
{{- toYaml .Values.webhook.affinity | nindent 8 }}
{{- else }}
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/os
operator: In
values:
- linux
{{- end }}
{{- with .Values.webhook.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
Expand Down

0 comments on commit 72dfd56

Please sign in to comment.