diff --git a/charts/aws-ebs-csi-driver/templates/controller.yaml b/charts/aws-ebs-csi-driver/templates/controller.yaml index dda851b1ff..6d15e32fb1 100644 --- a/charts/aws-ebs-csi-driver/templates/controller.yaml +++ b/charts/aws-ebs-csi-driver/templates/controller.yaml @@ -93,6 +93,9 @@ spec: {{- with .Values.controller.userAgentExtra }} - --user-agent-extra={{ . }} {{- end }} + {{- if .Values.controller.otelTracing }} + - --enable-otel-tracing=true + {{- end}} - --v={{ .Values.controller.logLevel }} {{- range .Values.controller.additionalArgs }} - {{ . }} @@ -134,6 +137,12 @@ spec: {{- with .Values.controller.env }} {{- . | toYaml | nindent 12 }} {{- end }} + {{- with .Values.controller.otelTracing }} + - name: OTEL_SERVICE_NAME + value: {{ .otelServiceName }} + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: {{ .otelExporterEndpoint }} + {{- end }} {{- with .Values.controller.envFrom }} envFrom: {{- . | toYaml | nindent 12 }} diff --git a/charts/aws-ebs-csi-driver/templates/node-windows.yaml b/charts/aws-ebs-csi-driver/templates/node-windows.yaml index 3f460563d3..4baa2832ac 100644 --- a/charts/aws-ebs-csi-driver/templates/node-windows.yaml +++ b/charts/aws-ebs-csi-driver/templates/node-windows.yaml @@ -58,6 +58,9 @@ spec: - --logging-format={{ . }} {{- end }} - --v={{ .Values.node.logLevel }} + {{- if .Values.node.otelTracing }} + - --enable-otel-tracing=true + {{- end}} env: - name: CSI_ENDPOINT value: unix:/csi/csi.sock @@ -68,6 +71,12 @@ spec: {{- if .Values.proxy.http_proxy }} {{- include "aws-ebs-csi-driver.http-proxy" . | nindent 12 }} {{- end }} + {{- with .Values.node.otelTracing }} + - name: OTEL_SERVICE_NAME + value: {{ .otelServiceName }} + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: {{ .otelExporterEndpoint }} + {{- end }} {{- with .Values.node.env }} {{- . | toYaml | nindent 12 }} {{- end }} diff --git a/charts/aws-ebs-csi-driver/templates/node.yaml b/charts/aws-ebs-csi-driver/templates/node.yaml index 9e24c102af..511d31a557 100644 --- a/charts/aws-ebs-csi-driver/templates/node.yaml +++ b/charts/aws-ebs-csi-driver/templates/node.yaml @@ -47,7 +47,7 @@ spec: operator: "Exists" {{- end }} {{- with .Values.node.securityContext }} - securityContext: + securityContext: {{- toYaml . | nindent 8 }} {{- end }} containers: @@ -64,6 +64,9 @@ spec: - --logging-format={{ . }} {{- end }} - --v={{ .Values.node.logLevel }} + {{- if .Values.node.otelTracing }} + - --enable-otel-tracing=true + {{- end}} env: - name: CSI_ENDPOINT value: unix:/csi/csi.sock @@ -74,6 +77,12 @@ spec: {{- if .Values.proxy.http_proxy }} {{- include "aws-ebs-csi-driver.http-proxy" . | nindent 12 }} {{- end }} + {{- with .Values.node.otelTracing }} + - name: OTEL_SERVICE_NAME + value: {{ .otelServiceName }} + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: {{ .otelExporterEndpoint }} + {{- end }} {{- with .Values.node.env }} {{- . | toYaml | nindent 12 }} {{- end }} @@ -109,7 +118,7 @@ spec: {{- toYaml . | nindent 12 }} {{- end }} {{- with .Values.node.containerSecurityContext }} - securityContext: + securityContext: {{- toYaml . | nindent 12 }} {{- end }} - name: node-driver-registrar @@ -158,7 +167,7 @@ spec: {{- toYaml . | nindent 12 }} {{- end }} {{- with .Values.sidecars.nodeDriverRegistrar.securityContext }} - securityContext: + securityContext: {{- toYaml . | nindent 12 }} {{- end }} - name: liveness-probe @@ -181,7 +190,7 @@ spec: {{- toYaml . | nindent 12 }} {{- end }} {{- with .Values.sidecars.livenessProbe.securityContext }} - securityContext: + securityContext: {{- toYaml . | nindent 12 }} {{- end }} {{- if .Values.imagePullSecrets }} diff --git a/charts/aws-ebs-csi-driver/values.yaml b/charts/aws-ebs-csi-driver/values.yaml index e20f57e3e8..14533a131f 100644 --- a/charts/aws-ebs-csi-driver/values.yaml +++ b/charts/aws-ebs-csi-driver/values.yaml @@ -288,6 +288,10 @@ controller: # - name: wait # image: busybox # command: [ 'sh', '-c', "sleep 20" ] + # Enable opentelemetry tracing for the plugin running on the daemonset + otelTracing: {} + # otelServiceName: ebs-csi-controller + # otelExporterEndpoint: "http://localhost:4317" node: env: [] @@ -354,6 +358,10 @@ node: containerSecurityContext: readOnlyRootFilesystem: true privileged: true + # Enable opentelemetry tracing for the plugin running on the daemonset + otelTracing: {} + # otelServiceName: ebs-csi-node + # otelExporterEndpoint: "http://localhost:4317" storageClasses: [] # Add StorageClass resources like: