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

feat(helm): Add pdb in helm chart #616

Merged
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
1 change: 1 addition & 0 deletions charts/kubernetes-external-secrets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ The following table lists the configurable parameters of the `kubernetes-externa
| `resources` | Pod resource requests & limits | `{}` |
| `dnsConfig` | Dns Config for pod. | `{}` |
| `imagePullSecrets` | Reference to one or more secrets to be used when pulling images | `[]` |
| `podDisruptionBudget` | PodDisruptionBudget for pod. | `{}` |
| `serviceMonitor.enabled` | Enable the creation of a serviceMonitor object for the Prometheus operator | `false` |
| `serviceMonitor.interval` | The interval the Prometheus endpoint is scraped | `30s` |
| `serviceMonitor.namespace` | The namespace where the serviceMonitor object has to be created | `nil` |
Expand Down
17 changes: 17 additions & 0 deletions charts/kubernetes-external-secrets/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 "kubernetes-external-secrets.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels:
app.kubernetes.io/name: {{ template "kubernetes-external-secrets.name" . }}
helm.sh/chart: {{ include "kubernetes-external-secrets.chart" . }}
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/managed-by: "{{ .Release.Service }}"
spec:
selector:
matchLabels:
app.kubernetes.io/name: {{ include "kubernetes-external-secrets.name" . }}
{{ toYaml .Values.podDisruptionBudget | indent 2 }}
{{- end -}}
2 changes: 2 additions & 0 deletions charts/kubernetes-external-secrets/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ tolerations: []

affinity: {}

podDisruptionBudget: {}

serviceMonitor:
enabled: false
interval: "30s"
Expand Down