Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Remove namespace from charts and split them into linkerd-crds and linkerd-control-plane #6635

Merged
merged 23 commits into from
Dec 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
4ab0a32
Remove namespace for linkerd2 chart
alpeb Aug 9, 2021
9f6ee44
Fix helm-deep test, and bypass helm upgrade test for now
alpeb Aug 9, 2021
898e722
Delete ns in bin/test-cleanup
alpeb Aug 11, 2021
57a83eb
Remove namespace from linkerd2-viz chart (#6638)
alpeb Aug 13, 2021
872634d
Merge branch 'main' into alpeb/no-ns-helm-core
alpeb Aug 13, 2021
c9cf389
Update policy resources
alpeb Aug 13, 2021
22d4a86
Remove namespace from linkerd2-cni chart (#6643)
alpeb Aug 17, 2021
11ff9db
Remove namespace from multicluster charts (#6665)
alpeb Aug 17, 2021
fff86d1
Merge branch 'main' into alpeb/no-ns-helm-core
alpeb Aug 17, 2021
b298348
Remove namespace from linkerd-jaeger chart (#6669)
alpeb Aug 17, 2021
d43b9a2
Merge branch 'main' into alpeb/no-ns-helm-core
alpeb Nov 17, 2021
ec3f93b
Merge branch 'main' into alpeb/no-ns-helm-core
alpeb Nov 18, 2021
be00936
Merge branch 'main' into alpeb/no-ns-helm-core
alpeb Nov 19, 2021
804b5f3
Fix tap-injector
alpeb Nov 19, 2021
c319a5b
Merge branch 'main' into alpeb/no-ns-helm-core
alpeb Nov 22, 2021
f5a96c9
Merge branch 'main' into alpeb/no-ns-helm-core
alpeb Nov 29, 2021
cac195b
Split core Helm charts (#6691)
alpeb Dec 3, 2021
2717703
Merge branch 'main' into alpeb/no-ns-helm-core
alpeb Dec 3, 2021
cda5102
Remove trafficsplit CRD
alpeb Dec 3, 2021
c7a0b19
Update helm-build, enableEndpointSlices, kubeVersion, helm READMEs
alpeb Dec 3, 2021
5d3eb2f
use linkerd-crds instead of linkerd-base
alpeb Dec 8, 2021
09e2923
Merge branch 'main' into alpeb/no-ns-helm-core
alpeb Dec 9, 2021
7bc6d79
Set up helm charts versioning (#7448)
alpeb Dec 10, 2021
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
3 changes: 2 additions & 1 deletion .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ jobs:
- external-prometheus-deep
- external-resources
- helm-deep
- helm-upgrade
# Skipping Helm upgrade test given chart in 2.11 is backwards-incompatible
#- helm-upgrade
- multicluster
- uninstall
- upgrade-edge
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ jobs:
- external-prometheus-deep
- external-resources
- helm-deep
- helm-upgrade
# Skipping Helm upgrade test given chart in 2.11 is backwards-incompatible
#- helm-upgrade
- uninstall
- upgrade-edge
- upgrade-stable
Expand Down
16 changes: 9 additions & 7 deletions bin/_test-helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,8 @@ run_upgrade-stable_test() {

setup_helm() {
export helm_path="$bindir"/helm
helm_chart="$( cd "$bindir"/.. && pwd )"/charts/linkerd2
export helm_chart
helm_charts="$( cd "$bindir"/.. && pwd )"/charts
export helm_charts
export helm_release_name='helm-test'
export helm_multicluster_release_name="multicluster-test"
"$bindir"/helm-build
Expand All @@ -486,9 +486,11 @@ setup_helm() {
helm_cleanup() {
(
set -e
"$helm_path" --kube-context="$context" delete "$helm_release_name" || true
"$helm_path" --kube-context="$context" delete "$helm_multicluster_release_name" || true
# `helm delete` doesn't wait for resources to be deleted, so we wait explicitly.
"$helm_path" --kube-context="$context" --namespace linkerd delete "$helm_release_name-crds" || true
"$helm_path" --kube-context="$context" --namespace linkerd delete "$helm_release_name-control-plane" || true
kubectl delete ns/linkerd
"$helm_path" --kube-context="$context" --namespace linkerd-multicluster delete "$helm_multicluster_release_name" || true
kubectl delete ns/linkerd-multicluster
# We wait for the namespace to be gone so the following call to `cleanup` doesn't fail when it attempts to delete
# the same namespace that is already being deleted here (error thrown by the NamespaceLifecycle controller).
# We don't have that problem with global resources, so no need to wait for them to be gone.
Expand All @@ -509,7 +511,7 @@ run_helm-upgrade_test() {

setup_helm
helm_viz_chart="$( cd "$bindir"/.. && pwd )"/viz/charts/linkerd-viz
run_test "$test_directory/install_test.go" --helm-path="$helm_path" --helm-chart="$helm_chart" \
run_test "$test_directory/install_test.go" --helm-path="$helm_path" --helm-charts="$helm_charts" \
--viz-helm-chart="$helm_viz_chart" --helm-stable-chart='linkerd/linkerd2' --viz-helm-stable-chart="linkerd/linkerd-viz" --helm-release="$helm_release_name" --upgrade-helm-from-version="$stable_version"
helm_cleanup
}
Expand Down Expand Up @@ -570,7 +572,7 @@ run_helm-deep_test() {
setup_helm
helm_multicluster_chart="$( cd "$bindir"/.. && pwd )"/multicluster/charts/linkerd-multicluster
helm_viz_chart="$( cd "$bindir"/.. && pwd )"/viz/charts/linkerd-viz
run_test "$test_directory/install_test.go" --helm-path="$helm_path" --helm-chart="$helm_chart" \
run_test "$test_directory/install_test.go" --helm-path="$helm_path" --helm-charts="$helm_charts" \
--helm-release="$helm_release_name" --multicluster-helm-chart="$helm_multicluster_chart" \
--viz-helm-chart="$helm_viz_chart" --multicluster-helm-release="$helm_multicluster_release_name"
while IFS= read -r line; do tests+=("$line"); done <<< "$(go list "$test_directory"/.../...)"
Expand Down
15 changes: 10 additions & 5 deletions bin/helm-build
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
set -e

setValues() {
sed -i "s/$1/$2/" charts/linkerd2/values.yaml
sed -i "s/$1/$2/" charts/linkerd-crds/values.yaml
sed -i "s/$1/$2/" charts/linkerd-control-plane/values.yaml
sed -i "s/$1/$2/" charts/linkerd2-cni/values.yaml
sed -i "s/$1/$2/" multicluster/charts/linkerd-multicluster/values.yaml
sed -i "s/$1/$2/" jaeger/charts/linkerd-jaeger/values.yaml
Expand All @@ -22,7 +23,8 @@ bindir=$( cd "${BASH_SOURCE[0]%/*}" && pwd )
rootdir=$( cd "$bindir"/.. && pwd )

# cleanup dependencies
rm -f charts/linkerd2/charts/*
rm -f charts/linkerd-crds/charts/*
rm -f charts/linkerd-control-plane/charts/*
rm -f charts/linkerd2-cni/charts/*
rm -f charts/patch/charts/*
rm -f jaeger/charts/linkerd-jaeger/charts/*
Expand All @@ -35,9 +37,11 @@ rm -f viz/charts/linkerd-viz/charts/*
"$bindir"/helm lint "$rootdir"/charts/partials
"$bindir"/helm dep up "$rootdir"/charts/linkerd2-cni
"$bindir"/helm lint "$rootdir"/charts/linkerd2-cni
"$bindir"/helm dep up "$rootdir"/charts/linkerd2
"$bindir"/helm dep up "$rootdir"/charts/linkerd-crds
"$bindir"/helm dep up "$rootdir"/charts/linkerd-control-plane
"$bindir"/helm dep up "$rootdir"/charts/patch
"$bindir"/helm lint --set identityTrustAnchorsPEM="fake-trust" --set identity.issuer.tls.crtPEM="fake-cert" --set identity.issuer.tls.keyPEM="fake-key" "$rootdir"/charts/linkerd2
"$bindir"/helm lint "$rootdir"/charts/linkerd-crds
"$bindir"/helm lint --set identityTrustAnchorsPEM="fake-trust" --set identity.issuer.tls.crtPEM="fake-cert" --set identity.issuer.tls.keyPEM="fake-key" "$rootdir"/charts/linkerd-control-plane
"$bindir"/helm lint "$rootdir"/charts/linkerd2-cni
"$bindir"/helm dep up "$rootdir"/jaeger/charts/linkerd-jaeger
"$bindir"/helm lint "$rootdir"/jaeger/charts/linkerd-jaeger
Expand All @@ -63,7 +67,8 @@ if [ "$1" = package ]; then
# set version in Values files
setValues "linkerdVersionValue" "$fullVersion"

"$bindir"/helm --version "$version" --app-version "$tag" -d "$rootdir"/target/helm package "$rootdir"/charts/linkerd2
"$bindir"/helm -d "$rootdir"/target/helm package "$rootdir"/charts/linkerd-crds
"$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
10 changes: 7 additions & 3 deletions bin/test-cleanup
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,16 @@ echo "cleaning up linkerd resources [${k8s_context}]"
# Helm cleanup. Just the entries in `helm ls` as the resources should have already been cleaned up by the code above.
releases=$("$bindir/helm" ls -A -q)
if [[ "${releases[*]}" =~ 'l5d-viz' ]]; then
"$bindir/helm" --kube-context="$k8s_context" delete l5d-viz
"$bindir/helm" --kube-context="$k8s_context" --namespace linkerd-viz delete l5d-viz
kubectl delete ns linkerd-viz
fi
if [[ "${releases[*]}" =~ 'helm-test' ]]; then
"$bindir/helm" --kube-context="$k8s_context" delete helm-test
"$bindir/helm" --kube-context="$k8s_context" --namespace linkerd delete helm-test-crds
"$bindir/helm" --kube-context="$k8s_context" --namespace linkerd delete helm-test-control-plane
kubectl delete ns linkerd
fi
if [[ "${releases[*]}" =~ 'multicluster-test' ]]; then
"$bindir/helm" --kube-context="$k8s_context" delete multicluster-test
"$bindir/helm" --kube-context="$k8s_context" --namespace linkerd-multicluster delete multicluster-test
kubectl delete ns linkerd-multicluster
fi

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ dependencies:
repository: file://../partials
version: 0.1.0
digest: sha256:8e42f9c9d4a2dc883f17f94d6044c97518ced19ad0922f47b8760e47135369ba
generated: "2020-12-21T17:47:25.811707816Z"
generated: "2021-12-06T11:42:50.784240359-05:00"
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
apiVersion: "v1"
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.
type: application
home: https://linkerd.io
keywords:
- service-mesh
kubeVersion: ">=1.20.0-0"
name: "linkerd2"
name: "linkerd-control-plane"
sources:
- https://github.com/linkerd/linkerd2/
# this version will be updated by the CI before publishing the Helm tarball
version: 0.1.0
dependencies:
- name: partials
version: 0.1.0
repository: file://../partials
version: 1.0.0-edge
icon: https://linkerd.io/images/logo-only-200h.png
maintainers:
- name: Linkerd authors
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# linkerd2
# linkerd-control-plane

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 All @@ -17,6 +17,11 @@ the [Linkerd Getting Started Guide][getting-started] for how.
For more comprehensive documentation, start with the [Linkerd
docs][linkerd-docs].

## Prerequisite: linkerd-crds chart

Before installing this chart, please install the `linkerd-crds` chart, which
creates all the CRDs that the components from the current chart require.

## Prerequisite: identity certificates

The identity component of Linkerd requires setting up a trust anchor
Expand All @@ -30,10 +35,13 @@ Note that the provided certificates must be ECDSA certificates.

## Adding Linkerd's Helm repository

Included here for completeness-sake, but should have already been added when
`linkerd-base` was installed.

```bash
# To add the repo for Linkerd2 stable releases:
# To add the repo for Linkerd stable releases:
helm repo add linkerd https://helm.linkerd.io/stable
# To add the repo for Linkerd2 edge releases:
# To add the repo for Linkerd edge releases:
helm repo add linkerd-edge https://helm.linkerd.io/edge
```

Expand All @@ -42,18 +50,20 @@ release, just replace with `linkerd-edge`.

## Installing the chart

You must provide the certificates and keys described in the preceding section.

In this example we set the expiration date to one year ahead:
You must provide the certificates and keys described in the preceding section,
and the same expiration date you used to generate the Issuer certificate.

```bash
helm install \
helm install linkerd-control-plane -n linkerd \
--set-file identityTrustAnchorsPEM=ca.crt \
--set-file identity.issuer.tls.crtPEM=issuer.crt \
--set-file identity.issuer.tls.keyPEM=issuer.key \
linkerd/linkerd2
linkerd/linkerd-control-plane
```

Note that you require to install this chart in the same namespace you installed
the `linkerd-base` chart.

## Setting High-Availability

Besides the default `values.yaml` file, the chart provides a `values-ha.yaml`
Expand All @@ -65,18 +75,18 @@ affinities are specified in that file.
You can get ahold of `values-ha.yaml` by fetching the chart files:

```bash
helm fetch --untar linkerd/linkerd2
helm fetch --untar linkerd/linkerd-control-plane
```

Then use the `-f` flag to provide the override file, for example:

```bash
helm install \
helm install linkerd-control-plane -n linkerd \
--set-file identityTrustAnchorsPEM=ca.crt \
--set-file identity.issuer.tls.crtPEM=issuer.crt \
--set-file identity.issuer.tls.keyPEM=issuer.key \
-f linkerd2/values-ha.yaml
linkerd/linkerd2
linkerd/linkerd-control-plane
```

## Get involved
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ the [Linkerd Getting Started Guide][getting-started] for how.
For more comprehensive documentation, start with the [Linkerd
docs][linkerd-docs].

## Prerequisite: linkerd-crds chart

Before installing this chart, please install the `linkerd-crds` chart, which
creates all the CRDs that the components from the current chart require.

## Prerequisite: identity certificates

The identity component of Linkerd requires setting up a trust anchor
Expand All @@ -28,10 +33,13 @@ Note that the provided certificates must be ECDSA certificates.

## Adding Linkerd's Helm repository

Included here for completeness-sake, but should have already been added when
`linkerd-base` was installed.

```bash
# To add the repo for Linkerd2 stable releases:
# To add the repo for Linkerd stable releases:
helm repo add linkerd https://helm.linkerd.io/stable
# To add the repo for Linkerd2 edge releases:
# To add the repo for Linkerd edge releases:
helm repo add linkerd-edge https://helm.linkerd.io/edge
```

Expand All @@ -40,18 +48,20 @@ release, just replace with `linkerd-edge`.

## Installing the chart

You must provide the certificates and keys described in the preceding section.

In this example we set the expiration date to one year ahead:
You must provide the certificates and keys described in the preceding section,
and the same expiration date you used to generate the Issuer certificate.

```bash
helm install \
helm install linkerd-control-plane -n linkerd \
--set-file identityTrustAnchorsPEM=ca.crt \
--set-file identity.issuer.tls.crtPEM=issuer.crt \
--set-file identity.issuer.tls.keyPEM=issuer.key \
linkerd/linkerd2
linkerd/linkerd-control-plane
```

Note that you require to install this chart in the same namespace you installed
the `linkerd-base` chart.

## Setting High-Availability

Besides the default `values.yaml` file, the chart provides a `values-ha.yaml`
Expand All @@ -63,18 +73,18 @@ affinities are specified in that file.
You can get ahold of `values-ha.yaml` by fetching the chart files:

```bash
helm fetch --untar linkerd/linkerd2
helm fetch --untar linkerd/linkerd-control-plane
```

Then use the `-f` flag to provide the override file, for example:

```bash
helm install \
helm install linkerd-control-plane -n linkerd \
--set-file identityTrustAnchorsPEM=ca.crt \
--set-file identity.issuer.tls.crtPEM=issuer.crt \
--set-file identity.issuer.tls.keyPEM=issuer.key \
-f linkerd2/values-ha.yaml
linkerd/linkerd2
linkerd/linkerd-control-plane
```

## Get involved
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ kind: ConfigMap
apiVersion: v1
metadata:
name: linkerd-config
namespace: {{.Values.namespace}}
{{ include "partials.namespace" . }}
labels:
linkerd.io/control-plane-component: controller
linkerd.io/control-plane-ns: {{.Values.namespace}}
linkerd.io/control-plane-ns: {{.Release.Namespace}}
annotations:
{{ include "partials.annotations.created-by" . }}
data:
linkerd-crds-chart-version: linkerd-crds-1.0.0-edge
values: |
{{- $values := deepCopy .Values }}
{{- /*
Expand Down
Loading