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

Commit

Permalink
feat(helm): add pdb in helm chart (#616)
Browse files Browse the repository at this point in the history
  • Loading branch information
SatoruItaya authored Feb 5, 2021
1 parent 03f5c65 commit 3be641f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
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

0 comments on commit 3be641f

Please sign in to comment.