[bitnami/template] Update PDB defintion in our scaffolding template (#26544)

Signed-off-by: Fran Mulero <fmulero@vmware.com>
This commit is contained in:
Fran Mulero
2024-05-30 10:18:30 +02:00
committed by GitHub
parent 4329401ca7
commit d617f2cc4c
2 changed files with 7 additions and 7 deletions
+4 -4
View File
@@ -3,7 +3,7 @@ Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.%%MAIN_OBJECT_BLOCK%%.pdb.create }}
{{- if .Values.%%MAIN_OBJECT_BLOCK%%.pdb.create }}
apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
@@ -18,10 +18,10 @@ spec:
{{- if .Values.%%MAIN_OBJECT_BLOCK%%.pdb.minAvailable }}
minAvailable: {{ .Values.%%MAIN_OBJECT_BLOCK%%.pdb.minAvailable }}
{{- end }}
{{- if .Values.%%MAIN_OBJECT_BLOCK%%.pdb.maxUnavailable }}
maxUnavailable: {{ .Values.%%MAIN_OBJECT_BLOCK%%.pdb.maxUnavailable }}
{{- if or .Values.%%MAIN_OBJECT_BLOCK%%.pdb.maxUnavailable ( not .Values.%%MAIN_OBJECT_BLOCK%%.pdb.minAvailable ) }}
maxUnavailable: {{ .Values.%%MAIN_OBJECT_BLOCK%%.pdb.maxUnavailable | default 1 }}
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.%%MAIN_OBJECT_BLOCK%%.podLabels .Values.commonLabels) "context" .) }}
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.%%MAIN_OBJECT_BLOCK%%.podLabels .Values.commonLabels ) "context" . ) }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/component: %%COMPONENT_NAME%%
+3 -3
View File
@@ -379,11 +379,11 @@ diagnosticMode:
## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb
## @param %%MAIN_OBJECT_BLOCK%%.pdb.create Enable/disable a Pod Disruption Budget creation
## @param %%MAIN_OBJECT_BLOCK%%.pdb.minAvailable Minimum number/percentage of pods that should remain scheduled
## @param %%MAIN_OBJECT_BLOCK%%.pdb.maxUnavailable Maximum number/percentage of pods that may be made unavailable
## @param %%MAIN_OBJECT_BLOCK%%.pdb.maxUnavailable Maximum number/percentage of pods that may be made unavailable. Defaults to `1` if both `%%MAIN_OBJECT_BLOCK%%.pdb.minAvailable` and `%%MAIN_OBJECT_BLOCK%%.pdb.maxUnavailable` are empty.
##
pdb:
create: false
minAvailable: 1
create: true
minAvailable: ""
maxUnavailable: ""
## Autoscaling configuration
## ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/