Skip to content

Commit

Permalink
add optional PodDisruptionBudget to helm chart (grafana#515)
Browse files Browse the repository at this point in the history
* add optional PodDisruptionBudget to helm chart

* address comments

* add back new line - no change to helpers template

* fix silly typo in loki-stack version
  • Loading branch information
victoriaalee authored and cyriltovena committed May 9, 2019
1 parent 5f68884 commit d92d4e2
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 3 deletions.
2 changes: 1 addition & 1 deletion production/helm/loki-stack/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: loki-stack
version: 0.8.1
version: 0.9.0
appVersion: 0.0.1
kubeVersion: "^1.10.0-0"
description: "Loki: like Prometheus, but for logs."
Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: loki
version: 0.7.2
version: 0.8.0
appVersion: 0.0.1
kubeVersion: "^1.10.0-0"
description: "Loki: like Prometheus, but for logs."
Expand Down
1 change: 0 additions & 1 deletion production/helm/loki/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,3 @@ Create the name of the service account
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

15 changes: 15 additions & 0 deletions production/helm/loki/templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- if .Values.podDisruptionBudget -}}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: {{ template "loki.fullname" . }}
app: {{ template "loki.name" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
chart: {{ template "loki.chart" . }}
spec:
selector:
matchLabels:
app: {{ template "loki.name" . }}
{{ toYaml .Values.podDisruptionBudget | indent 2 }}
{{- end -}}
6 changes: 6 additions & 0 deletions production/helm/loki/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,9 @@ terminationGracePeriodSeconds: 30
## Tolerations for pod assignment
## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
tolerations: []

# The values to set in the PodDisruptionBudget spec
# If not set then a PodDisruptionBudget will not be created
podDisruptionBudget: {}
# minAvailable: 1
# maxUnavailable: 1

0 comments on commit d92d4e2

Please sign in to comment.