Skip to content

Commit

Permalink
[stable/kube-state-metrics] Add PodDisruptionBudget (helm#21340)
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Rifel <pgrifel@gmail.com>
  • Loading branch information
rifelpet authored and Mats Faugli committed Mar 20, 2020
1 parent efac9b3 commit f7b76d3
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/kube-state-metrics/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ keywords:
- monitoring
- prometheus
- kubernetes
version: 2.8.1
version: 2.8.2
appVersion: 1.9.5
home: https://github.com/kubernetes/kube-state-metrics/
sources:
Expand Down
1 change: 1 addition & 0 deletions stable/kube-state-metrics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ $ helm install stable/kube-state-metrics
| `affinity` | Affinity settings for pod assignment | {} |
| `tolerations` | Tolerations for pod assignment | [] |
| `podAnnotations` | Annotations to be added to the pod | {} |
| `podDisruptionBudget` | Optional PodDisruptionBudget | {} |
| `resources` | kube-state-metrics resource requests and limits | {} |
| `collectors.certificatesigningrequests` | Enable the certificatesigningrequests collector. | `true` |
| `collectors.configmaps` | Enable the configmaps collector. | `true` |
Expand Down
17 changes: 17 additions & 0 deletions stable/kube-state-metrics/templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- if .Values.podDisruptionBudget -}}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: {{ template "kube-state-metrics.fullname" . }}
namespace: {{ template "kube-state-metrics.namespace" . }}
labels:
app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/managed-by: "{{ .Release.Service }}"
spec:
selector:
matchLabels:
app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
{{ toYaml .Values.podDisruptionBudget | indent 2 }}
{{- end -}}
3 changes: 3 additions & 0 deletions stable/kube-state-metrics/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ podAnnotations: {}
## Assign a PriorityClassName to pods if set
# priorityClassName: ""

# Ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/
podDisruptionBudget: {}

# Available collectors for kube-state-metrics. By default all available
# collectors are enabled.
collectors:
Expand Down

0 comments on commit f7b76d3

Please sign in to comment.