Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Selector labels
{{- define "coder.selectorLabels" -}}
app.kubernetes.io/name: {{ include "coder.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/part-of: {{ include "coder.name" . }}
{{- end }}

{{/*
Expand All @@ -27,6 +26,7 @@ Common labels
{{- define "coder.labels" -}}
helm.sh/chart: {{ include "coder.chart" . }}
{{ include "coder.selectorLabels" . }}
app.kubernetes.io/part-of: {{ include "coder.name" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion helm/templates/coder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
template:
metadata:
labels:
{{- include "coder.selectorLabels" . | nindent 8 }}
{{- include "coder.labels" . | nindent 8 }}
spec:
serviceAccountName: coder
restartPolicy: Always
Expand Down
8 changes: 6 additions & 2 deletions scripts/helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ if [[ "$version" == "" ]]; then
version="$(execrelative ./version.sh)"
fi

# Our chart fails when built on non-tag versions since `+` characters are
# invalid in labels, i.e. `0.15.0-devel+546a8931``.
helm_version="${version//+/-}"

if [[ "$output_path" == "" ]]; then
cdroot
mkdir -p build
Expand All @@ -72,8 +76,8 @@ cdroot
cd ./helm
log "--- Packaging helm chart for version $version ($output_path)"
helm package \
--version "$version" \
--app-version "$version" \
--version "$helm_version" \
--app-version "$helm_version" \
--destination "$temp_dir" \
. 1>&2

Expand Down