Skip to content

Commit

Permalink
podDisruptionBudget added (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
bitte-ein-bit authored Aug 3, 2022
1 parent f9dfc6f commit 4f7eb2d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charts/k8s-sizing-webhook/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: k8s-sizing-webhook
description: A Helm chart for Kubernetes
description: Deploys a admission webhook to fix common problems
maintainers:
- name: bitte-ein-bit
url: https://github.com/bitte-ein-bit
Expand All @@ -18,7 +18,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.0
version: 0.3.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
11 changes: 11 additions & 0 deletions charts/k8s-sizing-webhook/templates/poddisruptionbudget.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{- if .Values.podDisruptionBudget.create -}}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "k8s-sizing-webhook.fullname" . }}
spec:
minAvailable: {{ .Values.podDisruptionBudget.minAvailable | default 1 }}
selector:
matchLabels:
{{- include "k8s-sizing-webhook.selectorLabels" . | nindent 6 }}
{{- end -}}
4 changes: 4 additions & 0 deletions charts/k8s-sizing-webhook/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ webhook:
serviceMonitor:
create: false

podDisruptionBudget:
create: true
minAvailable: 1

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
Expand Down

0 comments on commit 4f7eb2d

Please sign in to comment.