Skip to content

Commit

Permalink
Merge pull request #18 from WyriHaximusNet/add-pod-disruption-budget-…
Browse files Browse the repository at this point in the history
…to-docker-hub-exporter-when-there-is-more-than-one-replica

Add pod disruption budget to docker-hub-exporter when there is more than one replica
  • Loading branch information
WyriHaximus authored Jul 10, 2020
2 parents 0207f9c + 1131171 commit ae67871
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/docker-hub-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Docker Hub exporter
home: https://github.com/jessestuart/docker-hub-exporter
icon: https://helm.wyrihaximus.net/images/charts/docker-hub-exporter.png
type: application
version: 0.3.0
version: 0.4.0
appVersion: d05df48
maintainers:
- name: WyriHaximus
Expand Down
12 changes: 12 additions & 0 deletions charts/docker-hub-exporter/templates/pod-disruption-budget.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{- if gt (.Values.replicas | int) 1 -}}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: {{ include ".helm.fullname" . }}
spec:
minAvailable: 1
selector:
matchLabels:
app: {{ include ".helm.fullname" . }}
release: {{ include ".helm.fullname" . }}
{{ end }}

0 comments on commit ae67871

Please sign in to comment.