Skip to content

Commit

Permalink
Merge pull request #1404 from omerap12/issue_1397
Browse files Browse the repository at this point in the history
Add Pod Disruption Budget and configurable deployment name
  • Loading branch information
k8s-ci-robot authored Nov 26, 2024
2 parents c963295 + 92fdf69 commit e6a3ab9
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/aws-efs-csi-driver/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,4 +234,4 @@ for Controller deployment and Node daemonset
* Fixing Controller deployment using `podAnnotations` and `tolerations` values from Node daemonset
* Let the user define the whole `tolerations` array, default to `- operator: Exists`
* Default `logLevel` lowered from `5` to `2`
* Default `imagePullPolicy` everywhere set to `IfNotPresent`
* Default `imagePullPolicy` everywhere set to `IfNotPresent`
2 changes: 1 addition & 1 deletion charts/aws-efs-csi-driver/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ maintainers:
- name: leakingtapan
url: https://github.com/leakingtapan
- name: krmichel
url: https://github.com/krmichel
url: https://github.com/krmichel
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
kind: Deployment
apiVersion: apps/v1
metadata:
name: efs-csi-controller
name: {{ .Values.controller.name }}
labels:
app.kubernetes.io/name: {{ include "aws-efs-csi-driver.name" . }}
{{- with .Values.controller.additionalLabels }}
Expand All @@ -13,7 +13,7 @@ spec:
replicas: {{ .Values.controller.replicaCount }}
selector:
matchLabels:
app: efs-csi-controller
app: {{ .Values.controller.name }}
app.kubernetes.io/name: {{ include "aws-efs-csi-driver.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- with .Values.controller.updateStrategy }}
Expand All @@ -23,7 +23,7 @@ spec:
template:
metadata:
labels:
app: efs-csi-controller
app: {{ .Values.controller.name }}
app.kubernetes.io/name: {{ include "aws-efs-csi-driver.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- with .Values.controller.podLabels }}
Expand Down
24 changes: 24 additions & 0 deletions charts/aws-efs-csi-driver/templates/controller-pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{{- if .Values.controller.podDisruptionBudget.enabled -}}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ .Values.controller.name }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "aws-ebs-csi-driver.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
app: {{ .Values.controller.name }}
app.kubernetes.io/name: {{ include "aws-efs-csi-driver.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.controller.podDisruptionBudget.unhealthyPodEvictionPolicy }}
unhealthyPodEvictionPolicy: {{ .Values.controller.podDisruptionBudget.unhealthyPodEvictionPolicy }}
{{- end }}
{{- if .Values.controller.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ .Values.controller.podDisruptionBudget.maxUnavailable }}
{{- end }}
{{- if .Values.controller.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.controller.podDisruptionBudget.minAvailable }}
{{- end }}
{{- end -}}
8 changes: 8 additions & 0 deletions charts/aws-efs-csi-driver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ imagePullSecrets: []
controller:
# Specifies whether a deployment should be created
create: true
# Name of the CSI controller service
name: efs-csi-controller
# Number of replicas for the CSI controller service deployment
replicaCount: 2
# Number for the log level verbosity
Expand Down Expand Up @@ -104,6 +106,12 @@ controller:
# eks.amazonaws.com/role-arn: arn:aws:iam::111122223333:role/efs-csi-role
healthPort: 9909
regionalStsEndpoints: false
# Pod Disruption Budget
podDisruptionBudget:
enabled: false
# maxUnavailable: 1
minAvailable: 1
unhealthyPodEvictionPolicy: "Delete"
# securityContext on the controller pod
securityContext:
runAsNonRoot: false
Expand Down

0 comments on commit e6a3ab9

Please sign in to comment.