Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[stable/kube-state-metrics] Add PodDisruptionBudget #21340

Merged
merged 1 commit into from
Mar 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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