Skip to content

Commit

Permalink
Set up helm charts versioning (#7448)
Browse files Browse the repository at this point in the history
* Set up helm charts versioning

Implements part of #7405

Separates `version` from `appVersion` in both `linkerd-crds` and
`linkerd-control-plane` charts.

In `linkerd-crds` embeds `version` as a label in the CRDs.

In `linkerd-control-plane`, embeds `linkerd-crds`'s `version` as a new
entry in the `linkerd-config` ConfigMap, to use in a new `linkerd check`
that will be implemented in a separate PR.
  • Loading branch information
alpeb authored Dec 10, 2021
1 parent 09e2923 commit 7bc6d79
Show file tree
Hide file tree
Showing 27 changed files with 71 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bin/helm-build
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ if [ "$1" = package ]; then
setValues "linkerdVersionValue" "$fullVersion"

"$bindir"/helm -d "$rootdir"/target/helm package "$rootdir"/charts/linkerd-crds
"$bindir"/helm --version "$version" --app-version "$tag" -d "$rootdir"/target/helm package "$rootdir"/charts/linkerd-control-plane
"$bindir"/helm --app-version "$tag" -d "$rootdir"/target/helm package "$rootdir"/charts/linkerd-control-plane
"$bindir"/helm --version "$version" --app-version "$tag" -d "$rootdir"/target/helm package "$rootdir"/charts/linkerd2-cni
"$bindir"/helm --version "$version" --app-version "$tag" -d "$rootdir"/target/helm package "$rootdir"/multicluster/charts/linkerd-multicluster
"$bindir"/helm --version "$version" --app-version "$tag" -d "$rootdir"/target/helm package "$rootdir"/jaeger/charts/linkerd-jaeger
Expand Down
3 changes: 1 addition & 2 deletions charts/linkerd-control-plane/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ dependencies:
- name: partials
version: 0.1.0
repository: file://../partials
# this version will be updated by the CI before publishing the Helm tarball
version: 0.1.0
version: 1.0.0-edge
icon: https://linkerd.io/images/logo-only-200h.png
maintainers:
- name: Linkerd authors
Expand Down
2 changes: 1 addition & 1 deletion charts/linkerd-control-plane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Linkerd gives you observability, reliability, and security
for your microservices — with no code change required.

![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square)
![Version: 1.0.0-edge](https://img.shields.io/badge/Version-1.0.0--edge-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![AppVersion: edge-XX.X.X](https://img.shields.io/badge/AppVersion-edge--XX.X.X-informational?style=flat-square)

Expand Down
1 change: 1 addition & 0 deletions charts/linkerd-control-plane/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ metadata:
annotations:
{{ include "partials.annotations.created-by" . }}
data:
linkerd-crds-chart-version: linkerd-crds-1.0.0-edge
values: |
{{- $values := deepCopy .Values }}
{{- /*
Expand Down
5 changes: 1 addition & 4 deletions charts/linkerd-crds/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
apiVersion: "v2"
# this version will be updated by the CI before publishing the Helm tarball
appVersion: edge-XX.X.X
description: |
Linkerd gives you observability, reliability, and security
for your microservices — with no code change required.
Expand All @@ -16,8 +14,7 @@ dependencies:
- name: partials
version: 0.1.0
repository: file://../partials
# this version will be updated by the CI before publishing the Helm tarball
version: 0.1.0
version: 1.0.0-edge
icon: https://linkerd.io/images/logo-only-200h.png
maintainers:
- name: Linkerd authors
Expand Down
3 changes: 1 addition & 2 deletions charts/linkerd-crds/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
Linkerd gives you observability, reliability, and security
for your microservices — with no code change required.

![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square)
![Version: 1.0.0-edge](https://img.shields.io/badge/Version-1.0.0--edge-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![AppVersion: edge-XX.X.X](https://img.shields.io/badge/AppVersion-edge--XX.X.X-informational?style=flat-square)

**Homepage:** <https://linkerd.io>

Expand Down
2 changes: 2 additions & 0 deletions charts/linkerd-crds/templates/policy-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ metadata:
annotations:
{{ include "partials.annotations.created-by" . }}
labels:
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
linkerd.io/control-plane-ns: {{.Release.Namespace}}
spec:
group: policy.linkerd.io
Expand Down Expand Up @@ -151,6 +152,7 @@ metadata:
annotations:
{{ include "partials.annotations.created-by" . }}
labels:
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
linkerd.io/control-plane-ns: {{.Release.Namespace}}
spec:
group: policy.linkerd.io
Expand Down
1 change: 1 addition & 0 deletions charts/linkerd-crds/templates/serviceprofile-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ metadata:
annotations:
{{ include "partials.annotations.created-by" . }}
labels:
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
linkerd.io/control-plane-ns: {{.Release.Namespace}}
spec:
group: linkerd.io
Expand Down
4 changes: 4 additions & 0 deletions cli/cmd/testdata/install_controlplane_tracing_output.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions cli/cmd/testdata/install_custom_domain.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions cli/cmd/testdata/install_custom_registry.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions cli/cmd/testdata/install_default.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions cli/cmd/testdata/install_default_override_dst_get_nets.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions cli/cmd/testdata/install_default_token.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions cli/cmd/testdata/install_ha_output.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions cli/cmd/testdata/install_ha_with_overrides_output.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions cli/cmd/testdata/install_heartbeat_disabled_output.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions cli/cmd/testdata/install_helm_control_plane_output.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7bc6d79

Please sign in to comment.