Skip to content

Commit

Permalink
Expose webhook affinity via values.yaml
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Shearn <[email protected]>
  • Loading branch information
shearn89 committed Jan 6, 2025
1 parent 6c2fe80 commit 6d62852
Show file tree
Hide file tree
Showing 5 changed files with 582 additions and 237 deletions.
2 changes: 1 addition & 1 deletion charts/policy-controller/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sources:
type: application

name: policy-controller
version: 0.8.0
version: 0.8.1
appVersion: 0.11.0

maintainers:
Expand Down
1 change: 1 addition & 0 deletions charts/policy-controller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ helm uninstall [RELEASE_NAME]
| leasescleanup.image.version | string | `"latest-dev"` | |
| loglevel | string | `"info"` | |
| serviceMonitor.enabled | bool | `false` | |
| webhook.affinity | object | `{}` | |
| webhook.configData | object | `{}` | |
| webhook.customLabels | object | `{}` | |
| webhook.env | object | `{}` | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ spec:
serviceAccountName: {{ include "webhook.serviceAccountName" . }}
# To avoid node becoming SPOF, spread our replicas to different nodes.
affinity:
{{- if .Values.webhook.affinity }}
{{- toYaml .Values.webhook.affinity | nindent 8 }}
{{- else }}
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
Expand All @@ -41,6 +44,7 @@ spec:
control-plane: {{ template "policy-controller.fullname" . }}-webhook
topologyKey: kubernetes.io/hostname
weight: 100
{{- end }}
containers:
- name: {{ template "policy-controller.name" . }}-{{ .Values.webhook.name }}
image: "{{ template "policy-controller.image" .Values.webhook.image }}"
Expand Down
Loading

0 comments on commit 6d62852

Please sign in to comment.