diff --git a/charts/gitops/templates/pdb.yml b/charts/gitops/templates/pdb.yml new file mode 100644 index 0000000..484be13 --- /dev/null +++ b/charts/gitops/templates/pdb.yml @@ -0,0 +1,19 @@ +{{- if .Values.podDisruptionBudget.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ .Release.Name }}-pdb + namespace: {{ .Release.Namespace }} + labels: + app: {{ .Release.Name }} +spec: + {{- if .Values.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.podDisruptionBudget.minAvailable }} + {{- end }} + {{- if .Values.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} + {{- end }} + selector: + matchLabels: + app: {{ .Release.Name }} +{{- end }} \ No newline at end of file diff --git a/charts/gitops/values.yaml b/charts/gitops/values.yaml index 5a000ef..1863ad0 100644 --- a/charts/gitops/values.yaml +++ b/charts/gitops/values.yaml @@ -30,7 +30,18 @@ nodeSelector: {} tolerations: [] affinity: {} +podDisruptionBudget: + enabled: true + minAvailable: 1 + # maxUnavailable: 1 +resources: + limits: + cpu: 500m + memory: 512Mi + requests: + cpu: 100m + memory: 128Mi serviceAccount: # Specifies whether a service account should be created create: true