From 113117101c23f4ca94ce365c04f2be31057a7710 Mon Sep 17 00:00:00 2001 From: Cees-Jan Kiewiet Date: Fri, 10 Jul 2020 22:01:17 +0200 Subject: [PATCH] Add pod disruption budget to docker-hub-exporter when there is more than one replica --- charts/docker-hub-exporter/Chart.yaml | 2 +- .../templates/pod-disruption-budget.yaml | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 charts/docker-hub-exporter/templates/pod-disruption-budget.yaml diff --git a/charts/docker-hub-exporter/Chart.yaml b/charts/docker-hub-exporter/Chart.yaml index 5e2d0c6..ed6acc4 100644 --- a/charts/docker-hub-exporter/Chart.yaml +++ b/charts/docker-hub-exporter/Chart.yaml @@ -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 diff --git a/charts/docker-hub-exporter/templates/pod-disruption-budget.yaml b/charts/docker-hub-exporter/templates/pod-disruption-budget.yaml new file mode 100644 index 0000000..d26a726 --- /dev/null +++ b/charts/docker-hub-exporter/templates/pod-disruption-budget.yaml @@ -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 }} \ No newline at end of file