Skip to content

Commit

Permalink
Enable CSI sidecar container metrics
Browse files Browse the repository at this point in the history
Signed-off-by: Eddie Torres <[email protected]>
  • Loading branch information
torredil committed Oct 11, 2023
1 parent 4a8df4e commit 86601f7
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
36 changes: 36 additions & 0 deletions charts/aws-ebs-csi-driver/templates/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ spec:
{{- range .Values.sidecars.provisioner.additionalArgs }}
- {{ . }}
{{- end }}
{{- if .Values.controller.enableMetrics }}
- --http-endpoint=0.0.0.0:3302
{{- end}}
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
Expand All @@ -236,6 +239,12 @@ spec:
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
{{- if .Values.controller.enableMetrics }}
- name: metrics
containerPort: 3302
protocol: TCP
{{- end}}
- name: csi-attacher
image: {{ printf "%s%s:%s" (default "" .Values.image.containerRegistry) .Values.sidecars.attacher.image.repository .Values.sidecars.attacher.image.tag }}
imagePullPolicy: {{ default .Values.image.pullPolicy .Values.sidecars.attacher.image.pullPolicy }}
Expand All @@ -257,6 +266,9 @@ spec:
{{- range .Values.sidecars.attacher.additionalArgs }}
- {{ . }}
{{- end }}
{{- if .Values.controller.enableMetrics }}
- --http-endpoint=0.0.0.0:3303
{{- end}}
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
Expand All @@ -281,6 +293,12 @@ spec:
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
{{- if .Values.controller.enableMetrics }}
- name: metrics
containerPort: 3303
protocol: TCP
{{- end}}
{{- if or .Values.sidecars.snapshotter.forceEnable (.Capabilities.APIVersions.Has "snapshot.storage.k8s.io/v1beta1") (.Capabilities.APIVersions.Has "snapshot.storage.k8s.io/v1") }}
- name: csi-snapshotter
image: {{ printf "%s%s:%s" (default "" .Values.image.containerRegistry) .Values.sidecars.snapshotter.image.repository .Values.sidecars.snapshotter.image.tag }}
Expand All @@ -294,6 +312,9 @@ spec:
{{- range .Values.sidecars.snapshotter.additionalArgs }}
- {{ . }}
{{- end }}
{{- if and (.Values.controller.enableMetrics) }}
- --http-endpoint=0.0.0.0:3304
{{- end}}
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
Expand All @@ -318,6 +339,12 @@ spec:
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
{{- if .Values.controller.enableMetrics }}
- name: metrics
containerPort: 3304
protocol: TCP
{{- end}}
{{- end }}
{{- if (.Values.controller.volumeModificationFeature).enabled }}
- name: volumemodifier
Expand Down Expand Up @@ -396,6 +423,9 @@ spec:
{{- range .Values.sidecars.resizer.additionalArgs }}
- {{ . }}
{{- end }}
{{- if .Values.controller.enableMetrics }}
- --http-endpoint=0.0.0.0:3305
{{- end}}
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
Expand All @@ -420,6 +450,12 @@ spec:
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
{{- if .Values.controller.enableMetrics }}
- name: metrics
containerPort: 3305
protocol: TCP
{{- end}}
- name: liveness-probe
image: {{ printf "%s%s:%s" (default "" .Values.image.containerRegistry) .Values.sidecars.livenessProbe.image.repository .Values.sidecars.livenessProbe.image.tag }}
imagePullPolicy: {{ default .Values.image.pullPolicy .Values.sidecars.livenessProbe.image.pullPolicy }}
Expand Down
4 changes: 4 additions & 0 deletions deploy/kubernetes/base/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ spec:
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
ports:
- name: csi-attacher
image: public.ecr.aws/eks-distro/kubernetes-csi/external-attacher:v4.3.0-eks-1-28-4
imagePullPolicy: IfNotPresent
Expand All @@ -173,6 +174,7 @@ spec:
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
ports:
- name: csi-snapshotter
image: public.ecr.aws/eks-distro/kubernetes-csi/external-snapshotter/csi-snapshotter:v6.2.2-eks-1-28-4
imagePullPolicy: IfNotPresent
Expand All @@ -195,6 +197,7 @@ spec:
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
ports:
- name: csi-resizer
image: public.ecr.aws/eks-distro/kubernetes-csi/external-resizer:v1.8.0-eks-1-28-4
imagePullPolicy: IfNotPresent
Expand All @@ -218,6 +221,7 @@ spec:
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
ports:
- name: liveness-probe
image: public.ecr.aws/eks-distro/kubernetes-csi/livenessprobe:v2.10.0-eks-1-28-4
imagePullPolicy: IfNotPresent
Expand Down

0 comments on commit 86601f7

Please sign in to comment.