Skip to content

Commit

Permalink
add in fullImageName to support development envs (#152)
Browse files Browse the repository at this point in the history
Signed-off-by: saweber <[email protected]>
  • Loading branch information
saweber authored Nov 28, 2023
1 parent 19f72a5 commit 673e777
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 9 additions & 1 deletion charts/opencost/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ spec:
{{- end }}
containers:
- name: {{ include "opencost.fullname" . }}
{{- if .Values.opencost.exporter.image.fullImageName }}
image: {{ .Values.opencost.exporter.image.fullImageName }}
{{- else }}
image: "{{ .Values.opencost.exporter.image.registry }}/{{ .Values.opencost.exporter.image.repository }}:{{ .Values.opencost.exporter.image.tag | default (printf "prod-%s" .Chart.AppVersion) }}"
{{- end}}
imagePullPolicy: {{ .Values.opencost.exporter.image.pullPolicy }}
args:
{{- range .Values.opencost.exporter.extraArgs }}
Expand Down Expand Up @@ -189,7 +193,11 @@ spec:
{{- end }}
{{- if .Values.opencost.ui.enabled }}
- name: opencost-ui
image: "{{ .Values.opencost.ui.image.registry }}/{{ .Values.opencost.ui.image.repository }}:{{ .Values.opencost.ui.image.tag | default (printf "prod-%s" .Chart.AppVersion) }}"
{{- if .Values.opencost.ui.image.fullImageName }}
image: {{ .Values.opencost.ui.image.fullImageName }}
{{- else}}
image: "{{ .Values.opencost.ui.image.registry }}/{{ .Values.opencost.ui.image.repository }}:{{ .Values.opencost.ui.image.tag | default (printf "prod-%s" .Chart.AppVersion) }}"
{{- end }}
imagePullPolicy: {{ .Values.opencost.ui.image.pullPolicy }}
ports:
- containerPort: 9090
Expand Down
4 changes: 4 additions & 0 deletions charts/opencost/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ opencost:
tag: "latest"
# -- Exporter container image pull policy
pullPolicy: IfNotPresent
# -- Override the full image name for development purposes
fullImageName: null
# -- List of extra arguments for the command, e.g.: log-format=json
extraArgs: []
# -- Number of OpenCost replicas to run
Expand Down Expand Up @@ -275,6 +277,8 @@ opencost:
tag: "latest"
# -- UI container image pull policy
pullPolicy: IfNotPresent
# -- Override the full image name for development purposes
fullImageName: null
resources:
# -- CPU/Memory resource requests
requests:
Expand Down

0 comments on commit 673e777

Please sign in to comment.