Skip to content

Commit

Permalink
Add pdb
Browse files Browse the repository at this point in the history
  • Loading branch information
maruina committed May 31, 2022
1 parent 8c69a22 commit 125c69e
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
2 changes: 2 additions & 0 deletions charts/kms-issuer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ A Helm chart to install kms-issuer
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| podDisruptionBudget.enable | bool | `false` | |
| podDisruptionBudget.minAvailable | int | `1` | |
| replicaCount | int | `1` | |
| resources | object | `{}` | |
| serviceAccount.annotations | object | `{}` | |
Expand Down
3 changes: 3 additions & 0 deletions charts/kms-issuer/ci/dev-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ image:
env:
- name: AWS_REGION
value: test-region

podDisruptionBudget:
enable: true
22 changes: 22 additions & 0 deletions charts/kms-issuer/templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

{{- if .Values.podDisruptionBudget.enable }}
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "kms-issuer.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
control-plane: {{ include "kms-issuer.fullname" . }}-controller-manager
{{- include "kms-issuer.labels" . | nindent 4 }}
spec:
{{- if .Values.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
{{- end }}
{{- if .Values.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
{{- end }}
selector:
matchLabels:
control-plane: {{ include "kms-issuer.fullname" . }}-controller-manager
{{- end }}
4 changes: 4 additions & 0 deletions charts/kms-issuer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,7 @@ nodeSelector: {}
tolerations: []

affinity: {}

podDisruptionBudget:
enable: false
minAvailable: 1

0 comments on commit 125c69e

Please sign in to comment.