diff --git a/charts/opencost/Chart.yaml b/charts/opencost/Chart.yaml index ea675af..51645ad 100755 --- a/charts/opencost/Chart.yaml +++ b/charts/opencost/Chart.yaml @@ -9,7 +9,7 @@ keywords: - finops - monitoring - opencost -version: 1.40.0 +version: 1.41.0 maintainers: - name: mattray url: https://mattray.dev diff --git a/charts/opencost/templates/_helpers.tpl b/charts/opencost/templates/_helpers.tpl index 282fc0e..ec38d3d 100644 --- a/charts/opencost/templates/_helpers.tpl +++ b/charts/opencost/templates/_helpers.tpl @@ -156,3 +156,27 @@ apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1beta1 {{- end }} {{- end -}} + +{{- define "opencost.imageTag" -}} +{{ .Values.opencost.exporter.image.tag | default (printf "%s" .Chart.AppVersion) }} +{{- end -}} + +{{- define "opencost.fullImageName" -}} +{{- if .Values.opencost.exporter.image.fullImageName }} +{{- .Values.opencost.exporter.image.fullImageName -}} +{{- else}} +{{- .Values.opencost.exporter.image.registry -}}/{{- .Values.opencost.exporter.image.repository -}}:{{- include "opencost.imageTag" . -}} +{{- end -}} +{{- end -}} + +{{- define "opencostUi.imageTag" -}} +{{- .Values.opencost.ui.image.tag | default (printf "%s" .Chart.AppVersion) -}} +{{- end -}} + +{{- define "opencostUi.fullImageName" -}} +{{- if .Values.opencost.ui.image.fullImageName }} +{{- .Values.opencost.ui.image.fullImageName -}} +{{- else}} +{{- .Values.opencost.ui.image.registry -}}/{{- .Values.opencost.ui.image.repository -}}:{{- include "opencostUi.imageTag" . -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/charts/opencost/templates/deployment.yaml b/charts/opencost/templates/deployment.yaml index 7fbee2d..1d8e291 100644 --- a/charts/opencost/templates/deployment.yaml +++ b/charts/opencost/templates/deployment.yaml @@ -62,11 +62,7 @@ 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 "%s" .Chart.AppVersion) }}" - {{- end}} + image: {{ include "opencost.fullImageName" . }} imagePullPolicy: {{ .Values.opencost.exporter.image.pullPolicy }} args: {{- range .Values.opencost.exporter.extraArgs }} @@ -268,11 +264,7 @@ spec: {{- end }} {{- if .Values.opencost.ui.enabled }} - name: opencost-ui - {{- 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 "%s" .Chart.AppVersion) }}" - {{- end }} + image: {{ include "opencostUi.fullImageName" .}} imagePullPolicy: {{ .Values.opencost.ui.image.pullPolicy }} ports: - containerPort: {{ .Values.opencost.ui.uiPort }} diff --git a/charts/opencost/values.yaml b/charts/opencost/values.yaml index 87a7100..b9b7ffa 100644 --- a/charts/opencost/values.yaml +++ b/charts/opencost/values.yaml @@ -130,8 +130,7 @@ opencost: # -- Exporter container image name repository: opencost/opencost # -- Exporter container image tag - # @default -- `""` (use appVersion in Chart.yaml) - tag: "" + tag: "1.111.0@sha256:6aa68e52a24b14ba41f23db08d1b9db1429a1c0300f4c0381ecc2c61fc311a97" # -- Exporter container image pull policy pullPolicy: IfNotPresent # -- Override the full image name for development purposes @@ -374,7 +373,7 @@ opencost: repository: opencost/opencost-ui # -- UI container image tag # @default -- `""` (use appVersion in Chart.yaml) - tag: "" + tag: "1.111.0@sha256:f7221e7a708d71663f5eca6c238268757eb4352f3e9f46b1029d33ab4e53fd8a" # -- UI container image pull policy pullPolicy: IfNotPresent # -- Override the full image name for development purposes