Skip to content

Commit

Permalink
make manifests
Browse files Browse the repository at this point in the history
Signed-off-by: kahirokunn <[email protected]>
  • Loading branch information
kahirokunn committed Sep 9, 2024
1 parent d79a20b commit 86b502e
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,17 @@ metadata:
name: gatekeeper-controller-manager
namespace: '{{ .Release.Namespace }}'
spec:
minAvailable: {{ .Values.pdb.controllerManager.minAvailable }}
minAvailable: {{- if and .Values.maxAvailable .Values.maxUnavailable }}
{{ fail "Only one of 'maxAvailable' or 'maxUnavailable' can be set, but not both" }}
{{- else if not (or .Values.maxAvailable .Values.maxUnavailable) }}
{{ fail "One of 'maxAvailable' or 'maxUnavailable' must be set" }}
{{- else }}
{{ if .Values.maxAvailable }}
maxAvailable: {{ .Values.maxAvailable }}
{{ else if .Values.maxUnavailable }}
maxUnavailable: {{ .Values.maxUnavailable }}
{{ end }}
{{- end }}
selector:
matchLabels:
app: '{{ template "gatekeeper.name" . }}'
Expand Down

0 comments on commit 86b502e

Please sign in to comment.