diff --git a/charts/dependency-track/templates/_helpers.tpl b/charts/dependency-track/templates/_helpers.tpl index e349ca7..3cdf500 100644 --- a/charts/dependency-track/templates/_helpers.tpl +++ b/charts/dependency-track/templates/_helpers.tpl @@ -8,6 +8,14 @@ {{- include "common.images.image" ( dict "imageRoot" .Values.frontend.image "global" .Values.global ) -}} {{- end -}} +{{- define "apiserver.image.pullSecrets" -}} +{{- include "common.images.renderPullSecrets" ( dict "images" ( list .Values.apiserver.image ) "context" $ ) -}} +{{- end -}} + +{{- define "frontend.image.pullSecrets" -}} +{{- include "common.images.renderPullSecrets" ( dict "images" ( list .Values.frontend.image ) "context" $ ) -}} +{{- end -}} + {{- define "frontend.labels.standard" -}} {{ include "common.labels.standard" . }} app.kubernetes.io/component: frontend diff --git a/charts/dependency-track/templates/backend/deployment.yaml b/charts/dependency-track/templates/backend/deployment.yaml index 3f7f01a..e5de920 100644 --- a/charts/dependency-track/templates/backend/deployment.yaml +++ b/charts/dependency-track/templates/backend/deployment.yaml @@ -15,9 +15,7 @@ spec: metadata: labels: {{- include "backend.labels.standard" . | nindent 8 }} spec: - {{- with .Values.global.imagePullSecrets }} - imagePullSecrets: {{- toYaml . | nindent 6 }} - {{- end }} + {{ include "frontend.image.pullSecrets" . | nindent 6 }} serviceAccountName: {{ include "common.names.fullname" . }}-apiserver securityContext: {{- toYaml .Values.apiserver.podSecurityContext | nindent 8 }} {{- with .Values.apiserver.initContainers }} diff --git a/charts/dependency-track/templates/frontend/deployment.yaml b/charts/dependency-track/templates/frontend/deployment.yaml index 4e9fefb..f3c0a99 100644 --- a/charts/dependency-track/templates/frontend/deployment.yaml +++ b/charts/dependency-track/templates/frontend/deployment.yaml @@ -11,9 +11,7 @@ spec: metadata: labels: {{- include "frontend.labels.standard" . | nindent 8 }} spec: - {{- with .Values.global.imagePullSecrets }} - imagePullSecrets: {{- toYaml . | nindent 6 }} - {{- end }} + {{- include "frontend.image.pullSecrets" . | nindent 6 }} serviceAccountName: {{ include "common.names.fullname" . }}-frontend securityContext: {{- toYaml .Values.frontend.podSecurityContext | nindent 8 }} containers: diff --git a/charts/dependency-track/values.yaml b/charts/dependency-track/values.yaml index eecfae7..a8b3b01 100644 --- a/charts/dependency-track/values.yaml +++ b/charts/dependency-track/values.yaml @@ -7,7 +7,7 @@ global: imageRegistry: docker.io # imagePullSecrets: - # - name: "myRegistryKeySecretName" + # - "myRegistryKeySecretName" # -- config of the frontend frontend: @@ -17,6 +17,8 @@ frontend: repository: dependencytrack/frontend tag: 4.6.1 pullPolicy: IfNotPresent + pullSecrets: [] + # - "myRegistryKeySecretName" # https://github.com/DependencyTrack/frontend/issues/60 # configmap: # config: | @@ -95,6 +97,8 @@ apiserver: repository: dependencytrack/apiserver tag: 4.6.2 pullPolicy: IfNotPresent + pullSecrets: [] + # - "myRegistryKeySecretName" env: [] persistentVolume: accessModes: