From 2f6cbcc8dd27cfd5f6848897080bdb8e080668b6 Mon Sep 17 00:00:00 2001 From: NikolaiKuziaevQubership Date: Mon, 27 Jan 2025 14:04:37 +0400 Subject: [PATCH 1/2] helm-refactoring --- charts/diag-proxy/templates/deployment.yaml | 2 ++ charts/diag-proxy/values.yaml | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/charts/diag-proxy/templates/deployment.yaml b/charts/diag-proxy/templates/deployment.yaml index e0e0c40..77e2b4f 100644 --- a/charts/diag-proxy/templates/deployment.yaml +++ b/charts/diag-proxy/templates/deployment.yaml @@ -48,6 +48,8 @@ spec: secretName: tls-assets-nc-diag-agent {{- end }} {{- end }} + imagePullSecrets: + - name: {{ .Values.IMAGE_PULL_SECRET_NAME }} containers: - name: {{ .Values.SERVICE_NAME }} image: '{{ .Values.IMAGE_REPOSITORY }}:{{ .Values.TAG }}' diff --git a/charts/diag-proxy/values.yaml b/charts/diag-proxy/values.yaml index da826ed..d063177 100644 --- a/charts/diag-proxy/values.yaml +++ b/charts/diag-proxy/values.yaml @@ -6,9 +6,10 @@ ARTIFACT_DESCRIPTOR_VERSION: '' # -- Image coordinates, next two values will be joined as: # IMAGE_REPOSITORY:TAG -IMAGE_REPOSITORY: '' -TAG: '' - +IMAGE_REPOSITORY: ghcr.io/netcracker/diag-proxy +TAG: main +# --- The name of the secret in Kubernetes that provides access to the private Docker registry +IMAGE_PULL_SECRET_NAME: regcred ### Deployment parameters # --- Number of diag-proxy replicas (pods per deployment) From 7981550412e941c887ca19ee71a8503c2a7a52cd Mon Sep 17 00:00:00 2001 From: NikolaiKuziaevQubership Date: Mon, 27 Jan 2025 14:13:53 +0400 Subject: [PATCH 2/2] helm-refactoring --- charts/diag-proxy/templates/deployment.yaml | 4 +++- charts/diag-proxy/values.yaml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/charts/diag-proxy/templates/deployment.yaml b/charts/diag-proxy/templates/deployment.yaml index 77e2b4f..657f6bd 100644 --- a/charts/diag-proxy/templates/deployment.yaml +++ b/charts/diag-proxy/templates/deployment.yaml @@ -48,8 +48,10 @@ spec: secretName: tls-assets-nc-diag-agent {{- end }} {{- end }} + {{- with .Values.imagePullSecrets }} imagePullSecrets: - - name: {{ .Values.IMAGE_PULL_SECRET_NAME }} + {{- toYaml . | nindent 8 }} + {{- end }} containers: - name: {{ .Values.SERVICE_NAME }} image: '{{ .Values.IMAGE_REPOSITORY }}:{{ .Values.TAG }}' diff --git a/charts/diag-proxy/values.yaml b/charts/diag-proxy/values.yaml index d063177..db5b8d5 100644 --- a/charts/diag-proxy/values.yaml +++ b/charts/diag-proxy/values.yaml @@ -9,7 +9,7 @@ ARTIFACT_DESCRIPTOR_VERSION: '' IMAGE_REPOSITORY: ghcr.io/netcracker/diag-proxy TAG: main # --- The name of the secret in Kubernetes that provides access to the private Docker registry -IMAGE_PULL_SECRET_NAME: regcred +imagePullSecrets: [] ### Deployment parameters # --- Number of diag-proxy replicas (pods per deployment)