Skip to content

Commit

Permalink
add optional resource PodDisruptionBudget
Browse files Browse the repository at this point in the history
  • Loading branch information
voigt authored and JAORMX committed Nov 10, 2023
1 parent f54d1a4 commit c2ccb37
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
21 changes: 21 additions & 0 deletions templates/poddistruptionbudget.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{- if .Values.podDisruptionBudget.enabled -}}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "krakend.fullname" . }}
labels:
{{- include "krakend.labels" . | nindent 4 }}
spec:
{{- if .Values.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
{{- end }}
{{- if .Values.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
{{- end }}
{{- if not (eq .Values.podDisruptionBudget.unhealthyPodEvictionPolicy "") }}
unhealthyPodEvictionPolicy: {{ .Values.podDisruptionBudget.unhealthyPodEvictionPolicy }}
{{- end }}
selector:
matchLabels:
{{- include "krakend.selectorLabels" . | nindent 6 }}
{{- end }}
11 changes: 11 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,17 @@ readinessProbe:
path: /__health
port: http

# -- (object) podDisruptionBudget allows you to define minumum and maximum available pods
podDisruptionBudget:
# -- (bool) Set to true to create a default ServiceMonitor for your application
enabled: false
# -- minimum available pods
minAvailable: 1
# -- maximum available pods
maxUnavailable: ""
# -- UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods should be considered for eviction
unhealthyPodEvictionPolicy: ""

# -- (object) The serviceMonitor configures a ServiceMonitor for your application
serviceMonitor:
# -- (bool) Set to true to create a default ServiceMonitor for your application
Expand Down

0 comments on commit c2ccb37

Please sign in to comment.