Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(parquet-exporter): use appVersion in Chart.yaml as default tag for container image #257

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions charts/opencost-parquet-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
version: 0.2.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"
appVersion: "0.2.1"
maintainers:
- name: cklingspor
11 changes: 11 additions & 0 deletions charts/opencost-parquet-exporter/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@ Create chart name and version as used by the chart label.
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create default image tag taken from the AppVersion.
*/}}
{{- define "opencost-parquet-exporter.imageTag" -}}
{{ .Values.image.tag | default (printf "v%s" .Chart.AppVersion) }}
{{- end }}

{{- define "opencost-parquet-exporter.fullImageName" -}}
{{ .Values.image.repository -}}:{{ include "opencost-parquet-exporter.imageTag" . }}
{{- end }}

{{/*
Common labels
*/}}
Expand Down
2 changes: 1 addition & 1 deletion charts/opencost-parquet-exporter/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
securityContext: {}
{{- end }}
containers:
- image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
- image: {{ include "opencost-parquet-exporter.fullImageName" . }}
imagePullPolicy: {{ .Values.image.imagePullPolicy }}
name: {{ include "opencost-parquet-exporter.name" $ }}
{{- with .Values.resources }}
Expand Down
3 changes: 2 additions & 1 deletion charts/opencost-parquet-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ securityContext:
- ALL
image:
repository: ghcr.io/opencost/opencost-parquet-exporter
tag: main
# @default -- `""` (use appVersion in Chart.yaml)
tag: ""
imagePullPolicy: Always
# -- List of env vars
env:
Expand Down