Skip to content

Commit 574027c

Browse files
helm template creating
1 parent 52de58f commit 574027c

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{{/*
2+
Find a env-checker image in various places.
3+
Image can be found from:
4+
* specified by user from .Values.IMAGE_REPOSITORY and .Values.TAG
5+
* default value
6+
*/}}
7+
{{- define "diag-proxy.image" -}}
8+
{{- if and (not (empty .Values.IMAGE_REPOSITORY)) (not (empty .Values.TAG)) -}}
9+
{{- printf "%s:%s" .Values.IMAGE_REPOSITORY .Values.TAG -}}
10+
{{- else -}}
11+
{{- printf "ghcr.io/netcracker/diag-proxy:main" -}}
12+
{{- end -}}
13+
{{- end -}}

charts/diag-proxy/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ spec:
5454
{{- end }}
5555
containers:
5656
- name: {{ .Values.SERVICE_NAME }}
57-
image: '{{ .Values.IMAGE_REPOSITORY }}:{{ .Values.TAG }}'
57+
image: {{ template "diag-proxy.image" . }}
5858
ports:
5959
- name: cdt-tcp
6060
containerPort: 1715

charts/diag-proxy/values.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ ARTIFACT_DESCRIPTOR_VERSION: ''
66

77
# -- Image coordinates, next two values will be joined as:
88
# IMAGE_REPOSITORY:TAG
9-
IMAGE_REPOSITORY: ghcr.io/netcracker/diag-proxy
10-
TAG: main
9+
#IMAGE_REPOSITORY: ghcr.io/netcracker/diag-proxy
10+
#TAG: main
1111
# --- The name of the secret in Kubernetes that provides access to the private Docker registry
12-
imagePullSecrets: []
12+
imagePullSecrets:
13+
- name: regcred
1314
### Deployment parameters
1415

1516
# --- Number of diag-proxy replicas (pods per deployment)

0 commit comments

Comments
 (0)