From 2513c136de71192e7a040dc22ffffdc20bda6b85 Mon Sep 17 00:00:00 2001 From: zyue110026 <98426905+zyue110026@users.noreply.github.com> Date: Mon, 9 Sep 2024 20:35:27 -0400 Subject: [PATCH] fix: respect `tap.docker.imagePullSecrets` (#1602) * respect tap.docker.imagePullSecrets Signed-off-by: zyue110026 <98426905+zyue110026@users.noreply.github.com> * respect tap.docker.imagePullSecrets Signed-off-by: zyue110026 <98426905+zyue110026@users.noreply.github.com> * fix: respect tap.docker.imagePullSecrets Signed-off-by: zyue110026 <98426905+zyue110026@users.noreply.github.com> --------- Signed-off-by: zyue110026 <98426905+zyue110026@users.noreply.github.com> Co-authored-by: M. Mert Yildiran --- helm-chart/templates/04-hub-deployment.yaml | 6 ++++++ helm-chart/templates/06-front-deployment.yaml | 6 ++++++ helm-chart/templates/09-worker-daemon-set.yaml | 18 ++++++++++++++++++ 3 files changed, 30 insertions(+) diff --git a/helm-chart/templates/04-hub-deployment.yaml b/helm-chart/templates/04-hub-deployment.yaml index dbf2d1571..29a13b8cb 100644 --- a/helm-chart/templates/04-hub-deployment.yaml +++ b/helm-chart/templates/04-hub-deployment.yaml @@ -57,6 +57,12 @@ spec: image: '{{ .Values.tap.docker.registry }}/hub:{{ not (eq .Values.tap.docker.tag "") | ternary .Values.tap.docker.tag (include "kubeshark.defaultVersion" .) }}' {{- end }} imagePullPolicy: {{ .Values.tap.docker.imagePullPolicy }} + {{- if .Values.tap.docker.imagePullSecrets }} + imagePullSecrets: + {{- range .Values.tap.docker.imagePullSecrets }} + - name: {{ . }} + {{- end }} + {{- end }} readinessProbe: periodSeconds: 1 failureThreshold: 3 diff --git a/helm-chart/templates/06-front-deployment.yaml b/helm-chart/templates/06-front-deployment.yaml index 347cda694..5e1c66302 100644 --- a/helm-chart/templates/06-front-deployment.yaml +++ b/helm-chart/templates/06-front-deployment.yaml @@ -72,6 +72,12 @@ spec: image: '{{ .Values.tap.docker.registry }}/front:{{ not (eq .Values.tap.docker.tag "") | ternary .Values.tap.docker.tag (include "kubeshark.defaultVersion" .) }}' {{- end }} imagePullPolicy: {{ .Values.tap.docker.imagePullPolicy }} + {{- if .Values.tap.docker.imagePullSecrets }} + imagePullSecrets: + {{- range .Values.tap.docker.imagePullSecrets }} + - name: {{ . }} + {{- end }} + {{- end }} name: kubeshark-front livenessProbe: periodSeconds: 1 diff --git a/helm-chart/templates/09-worker-daemon-set.yaml b/helm-chart/templates/09-worker-daemon-set.yaml index 99117b7fa..385459a63 100644 --- a/helm-chart/templates/09-worker-daemon-set.yaml +++ b/helm-chart/templates/09-worker-daemon-set.yaml @@ -30,6 +30,12 @@ spec: - name: load-pf-ring image: {{ .Values.tap.kernelModule.image }} imagePullPolicy: {{ .Values.tap.docker.imagePullPolicy }} + {{- if .Values.tap.docker.imagePullSecrets }} + imagePullSecrets: + {{- range .Values.tap.docker.imagePullSecrets }} + - name: {{ . }} + {{- end }} + {{- end }} securityContext: capabilities: add: @@ -76,6 +82,12 @@ spec: image: '{{ .Values.tap.docker.registry }}/worker:{{ not (eq .Values.tap.docker.tag "") | ternary .Values.tap.docker.tag (include "kubeshark.defaultVersion" .) }}{{ include "kubeshark.dockerTagDebugVersion" . }}' {{- end }} imagePullPolicy: {{ .Values.tap.docker.imagePullPolicy }} + {{- if .Values.tap.docker.imagePullSecrets }} + imagePullSecrets: + {{- range .Values.tap.docker.imagePullSecrets }} + - name: {{ . }} + {{- end }} + {{- end }} name: sniffer ports: - containerPort: {{ .Values.tap.metrics.port }} @@ -179,6 +191,12 @@ spec: image: '{{ .Values.tap.docker.registry }}/worker:{{ not (eq .Values.tap.docker.tag "") | ternary .Values.tap.docker.tag (include "kubeshark.defaultVersion" .) }}{{ include "kubeshark.dockerTagDebugVersion" . }}' {{- end }} imagePullPolicy: {{ .Values.tap.docker.imagePullPolicy }} + {{- if .Values.tap.docker.imagePullSecrets }} + imagePullSecrets: + {{- range .Values.tap.docker.imagePullSecrets }} + - name: {{ . }} + {{- end }} + {{- end }} name: tracer env: - name: POD_NAME