diff --git a/charts/connect/templates/connect-pdb.yaml b/charts/connect/templates/connect-pdb.yaml index c5cf9cc..2720dd5 100644 --- a/charts/connect/templates/connect-pdb.yaml +++ b/charts/connect/templates/connect-pdb.yaml @@ -9,12 +9,11 @@ metadata: {{- include "onepassword-connect.labels" . | nindent 4 }} {{- include "onepassword-connect.extraAnnotations" .Values.connect.pdb }} spec: - {{- if .Values.connect.pdb.minAvailable }} + {{- with .Values.connect.pdb.maxUnavailable }} + maxUnavailable: {{ . }} + {{- else }} minAvailable: {{ .Values.connect.pdb.minAvailable }} {{- end }} - {{- if and .Values.connect.pdb.maxUnavailable (not .Values.connect.pdb.minAvailable)}} - maxUnavailable: {{ .Values.connect.pdb.maxUnavailable }} - {{- end }} selector: matchLabels: app.kubernetes.io/component: connect diff --git a/charts/connect/templates/operator-pdb.yaml b/charts/connect/templates/operator-pdb.yaml index abd1ae6..8f602ee 100644 --- a/charts/connect/templates/operator-pdb.yaml +++ b/charts/connect/templates/operator-pdb.yaml @@ -9,12 +9,11 @@ metadata: {{- include "onepassword-connect.labels" . | nindent 4 }} {{- include "onepassword-connect.extraAnnotations" .Values.operator.pdb }} spec: - {{- if .Values.operator.pdb.minAvailable }} + {{- with .Values.operator.pdb.maxUnavailable }} + maxUnavailable: {{ . }} + {{- else }} minAvailable: {{ .Values.operator.pdb.minAvailable }} {{- end }} - {{- if and .Values.operator.pdb.maxUnavailable (not .Values.operator.pdb.minAvailable)}} - maxUnavailable: {{ .Values.operator.pdb.maxUnavailable }} - {{- end }} selector: matchLabels: app.kubernetes.io/component: operator diff --git a/charts/connect/values.yaml b/charts/connect/values.yaml index c885083..691e2bd 100644 --- a/charts/connect/values.yaml +++ b/charts/connect/values.yaml @@ -131,10 +131,10 @@ connect: enabled: false # Additional annotations to be added to the PDB Connect annotations: {} - # Number of pods that are available after eviction as number or percentage (eg.: 50%) - # minAvailable: 1 # Number of pods that are unavailble after eviction as number or percentage (eg.: 50%) - # maxUnavailable: 1 + maxUnavailable: 1 + # Number of pods that are available after eviction as number or percentage (eg.: 50%) + minAvailable: 0 # 1Password Connect API and Sync Service probes: @@ -295,10 +295,10 @@ operator: enabled: false # Additional annotations to be added to the PDB Operator annotations: {} - # Number of pods that are available after eviction as number or percentage (eg.: 50%) - # minAvailable: 1 # Number of pods that are unavailble after eviction as number or percentage (eg.: 50%) - # maxUnavailable: 1 + maxUnavailable: 1 + # Number of pods that are available after eviction as number or percentage (eg.: 50%) + minAvailable: 0 # Additional annotations to be added to the Operator pods. annotations: {}