Skip to content

Commit

Permalink
Expose volumes and volumeMounts for the ebs-csi-controller deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
cnmcavoy committed Oct 28, 2022
1 parent 3edb878 commit 47b1d95
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 9 deletions.
35 changes: 28 additions & 7 deletions charts/aws-ebs-csi-driver/templates/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ spec:
{{- $constraints | toYaml | nindent 8 }}
{{- end }}
{{- with .Values.controller.securityContext }}
securityContext:
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.controller.initContainers }}
Expand Down Expand Up @@ -131,6 +131,9 @@ spec:
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
{{- with .Values.controller.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: healthz
containerPort: 9808
Expand Down Expand Up @@ -161,7 +164,7 @@ spec:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.controller.containerSecurityContext }}
securityContext:
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
- name: csi-provisioner
Expand Down Expand Up @@ -203,12 +206,15 @@ spec:
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
{{- with .Values.controller.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with default .Values.controller.resources .Values.sidecars.provisioner.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.sidecars.provisioner.securityContext }}
securityContext:
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
- name: csi-attacher
Expand Down Expand Up @@ -245,12 +251,15 @@ spec:
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
{{- with .Values.controller.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with default .Values.controller.resources .Values.sidecars.attacher.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.sidecars.attacher.securityContext }}
securityContext:
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if or .Values.sidecars.snapshotter.forceEnable (.Capabilities.APIVersions.Has "snapshot.storage.k8s.io/v1beta1") (.Capabilities.APIVersions.Has "snapshot.storage.k8s.io/v1") }}
Expand All @@ -276,12 +285,15 @@ spec:
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
{{- with .Values.controller.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with default .Values.controller.resources .Values.sidecars.snapshotter.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.sidecars.snapshotter.securityContext }}
securityContext:
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
Expand All @@ -308,12 +320,15 @@ spec:
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
{{- with .Values.controller.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with default .Values.controller.resources .Values.sidecars.resizer.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.sidecars.resizer.securityContext }}
securityContext:
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
- name: liveness-probe
Expand All @@ -328,12 +343,15 @@ spec:
volumeMounts:
- name: socket-dir
mountPath: /csi
{{- with .Values.controller.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with default .Values.controller.resources .Values.sidecars.livenessProbe.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.sidecars.livenessProbe.securityContext }}
securityContext:
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if .Values.imagePullSecrets }}
Expand All @@ -345,3 +363,6 @@ spec:
volumes:
- name: socket-dir
emptyDir: {}
{{- with .Values.controller.volumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
6 changes: 4 additions & 2 deletions charts/aws-ebs-csi-driver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ controller:
extraVolumeTags: {}
httpEndpoint:
# (deprecated) The TCP network address where the prometheus metrics endpoint
# will run (example: `:8080` which corresponds to port 8080 on local host).
# will run (example: `:8080` which corresponds to port 8080 on local host).
# The default is empty string, which means metrics endpoint is disabled.
# ---
enableMetrics: false
Expand All @@ -148,7 +148,7 @@ controller:
# Additional labels for ServiceMonitor object
labels:
release: prometheus
# If set to true, AWS API call metrics will be exported to the following
# If set to true, AWS API call metrics will be exported to the following
# TCP endpoint: "0.0.0.0:3301"
# ---
# ID of the Kubernetes cluster used for tagging provisioned EBS volumes (optional).
Expand Down Expand Up @@ -210,6 +210,8 @@ controller:
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
volumes: []
volumeMounts: []
# securityContext on the controller container (see sidecars for securityContext on sidecar containers)
containerSecurityContext:
readOnlyRootFilesystem: true
Expand Down

0 comments on commit 47b1d95

Please sign in to comment.