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

Create Helm repos for linkerd2 stable and edge #502

Merged
merged 6 commits into from
Sep 16, 2019
Merged

Create Helm repos for linkerd2 stable and edge #502

merged 6 commits into from
Sep 16, 2019

Conversation

alpeb
Copy link
Member

@alpeb alpeb commented Sep 5, 2019

Fixes linkerd/linkerd2#3365

This adds the Helm repos https://run.linkerd.io/edge and
https://run.linkerd.io/stable.

So the user would install the stable chart with:

helm repo add linkerd-stable https://run.linkerd.io/stable
helm install --set blah blah linkerd-stable/linkerd2

and the edge chart with:

helm repo add linkerd-edge https://run.linkerd.io/edge
helm install --set blah blah linkerd-edge/linkerd2

Both repos can coexist in the same Helm environment.

I've updated the install-helm.md doc accordingly.

The index.yaml and linkerd2-0.1.0.tgz files were generated with the
bin/helm -stable|edge command added in linkerd/linkerd2#3292

This adds the Helm repos `https://run.linkerd.io/edge` and
`https://run.linkerd.io/stable`.

So the user would install the stable chart with:
```bash
helm repo add linkerd-stable https://run.linkerd.io/stable
helm install --set blah blah linkerd-stable/linkerd2
```

So the user would install the edge chart with:
```bash
helm repo add linkerd-edge https://run.linkerd.io/edge
helm install --set blah blah linkerd-edge/linkerd2
```

Both repos can coexist in the same Helm environment.

I've updated the `install-helm.md` doc accordingly.

The `index.yaml` and `linkerd2-0.1.0.tgz` files were generated with the
`bin/helm -stable|edge` command added in linkerd/linkerd#3292

Signed-off-by: Alejandro Pedraza Borrero <alejandro@buoyant.io>
Signed-off-by: Alejandro Pedraza Borrero <alejandro@buoyant.io>
"https://events.linuxfoundation.org/events/servicemeshcon-2019/program/call-for-proposals-cfp/")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These CFPs are closed, so do we need to add this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change consisted just on adding a newline at the end of the file to make the linter pass. As for leaving that file, I guess we'd like to leave everything there for historical purposes, but I could be wrong.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably want to remove this, but it should be done in a separate PR.

@ihcsim
Copy link
Contributor

ihcsim commented Sep 9, 2019

Combining what I gathered from https://github.com/BuoyantIO/buoyant-internal/pull/1023, linkerd/linkerd2#3292 and this PR, my understanding is that we are publishing the chart .tgz file for every edge and stable release, by pushing them to this repo. And in order to do this, we need to change the chart version for every release so that we can get a .tgz chart file with a different name, right?

TL;DR:

  1. Can we instead only publish one chart for the edges, and not bother with changing the chart version?
  2. For stable releases, we can change the chart release to match the Linkerd release version.

Some details on chart publication and user's install/upgrade workflow:

The reason behind the proposal to publish only one chart for the edge is because I don't want try to figure out which edge release does chart 0.0.1 correspond to. It will also remove the needs to update the chart version on every edge release.

E.g., during edge release, we modified the appVersion to reflect the edge version, but keep version as a constant:

✗ helm package --app-version edge-19.9.2 --version 0.0.1+edge --destination charts/edge charts/linkerd2
Successfully packaged chart and saved it to: charts/edge/linkerd2-0.0.1+edge.tgz
✗ helm repo index --url http://127.0.0.1:7000/charts/edge charts/edge

✗ helm package --app-version edge-19.9.3 --version 0.0.1+edge --destination charts/edge charts/linkerd2
Successfully packaged chart and saved it to: charts/edge/linkerd2-0.0.1+edge.tgz
✗ helm repo index --url http://127.0.0.1:7000/charts/edge charts/edge

I imagine this is what the user's workflow will look like:

# using my local helm repo
✗ helm repo add linkerd-edge http://127.0.0.1:7000/charts/edge                                                
"linkerd-edge" has been added to your repositories

✗ helm repo list
NAME            URL
stable          https://kubernetes-charts.storage.googleapis.com
local           http://127.0.0.1:8879/charts
istio.io        https://storage.googleapis.com/istio-prerelease/daily-build/master-latest-daily/charts
linkerd-edge    http://127.0.0.1:7000/charts/edge

✗ helm repo update   
...
Update Complete.

# user discovers edge-19.9.1
✗ helm search linkerd2                                                                                       
NAME                    CHART VERSION   APP VERSION     DESCRIPTION
linkerd-edge/linkerd2   0.0.1+edge      edge-19.9.1     Linkerd gives you observability, reliability, and securit...

# install edge-19.9.1
✗ helm install # etc...                   

✗ helm list                                                                                                  
NAME            REVISION        UPDATED                         STATUS          CHART                   APP VERSION     NAMESPACE
linkerd2        1               Sun Sep  8 20:05:00 2019        DEPLOYED        linkerd2-0.0.1+edge     edge-19.9.1     default

# update repo to get edge-19.9.2
✗ helm repo update   
...
Update Complete.

# user discovers edge-19.9.2
✗ helm search linkerd2                                                                                       
NAME                    CHART VERSION   APP VERSION     DESCRIPTION
linkerd-edge/linkerd2   0.0.1+edge      edge-19.9.2     Linkerd gives you observability, reliability, and securit...

# upgrade to edge-19.9.2
✗ helm upgrade linkerd2 linkerd-edge/linkerd2
# etc...

✗ helm list                                                      
NAME            REVISION        UPDATED                         STATUS          CHART                   APP VERSION     NAMESPACE
linkerd2        2               Sun Sep  8 20:20:11 2019        DEPLOYED        linkerd2-0.0.1+edge     edge-19.9.2     default

As for stable releases, how about we make the chart version the same as the release itself? I find the default chart versioning scheme of 0.0.1, 0.0.2 etc. meaningless.

✗ helm package --app-version=stable-2.5.0 --version=2.5.0 --destination charts/stable charts/linkerd2
Successfully packaged chart and saved it to: charts/stable/linkerd2-2.5.0.tgz
✗  helm repo index --url http://127.0.0.1:7000/charts/stable charts/stable

✗ helm package --app-version=stable-2.6.0 --version=2.6.0 --destination charts/stable charts/linkerd2     
Successfully packaged chart and saved it to: charts/stable/linkerd2-2.6.0.tgz
✗  helm repo index --url http://127.0.0.1:7000/charts/stable charts/stable

On the user's side:

✗ helm repo add linkerd http://127.0.0.1:7000/charts/stable
"linkerd" has been added to your repositories

✗ helm repo list                                                                                             
NAME            URL
stable          https://kubernetes-charts.storage.googleapis.com
local           http://127.0.0.1:8879/charts
istio.io        https://storage.googleapis.com/istio-prerelease/daily-build/master-latest-daily/charts
linkerd-edge    http://127.0.0.1:7000/charts/edge
linkerd         http://127.0.0.1:7000/charts/stable

# user discovers stable-2.5
✗ helm search linkerd2                                                                                       
NAME                    CHART VERSION   APP VERSION     DESCRIPTION
linkerd-edge/linkerd2   0.0.1+edge      edge-19.9.2     Linkerd gives you observability, reliability, and securit...
linkerd/linkerd2        2.5.0           stable-2.5.0    Linkerd gives you observability, reliability, and securit...

# install stable-2.5
✗ helm install # etc..

✗ helm list                                                                                               
NAME            REVISION        UPDATED                         STATUS          CHART           APP VERSION     NAMESPACE
linkerd2        1               Sun Sep  8 20:39:01 2019        DEPLOYED        linkerd2-2.5.0  stable-2.5.0    default

✗ helm repo update 

# user discovers stable-2.6.0
✗ helm search linkerd2           
NAME                    CHART VERSION   APP VERSION     DESCRIPTION
linkerd-edge/linkerd2   0.0.1+edge      edge-19.9.2     Linkerd gives you observability, reliability, and securit...
linkerd/linkerd2        2.6.0           stable-2.6.0    Linkerd gives you observability, reliability, and securit...

# upgrade to stable-2.6.0
✗ helm upgrade linkerd2 linkerd/linkerd2 

✗ helm list                                                                                                 
NAME            REVISION        UPDATED                         STATUS          CHART           APP VERSION     NAMESPACE
linkerd2        2               Sun Sep  8 20:51:39 2019        DEPLOYED        linkerd2-2.6.0  stable-2.6.0    default

@alpeb
Copy link
Member Author

alpeb commented Sep 9, 2019

@ihcsim Regarding edge charts, I'm a little uneasy about having the same chart version not being deterministic about what linkerd version it corresponds to, plus we wouldn't have an archive of past charts. If a user reports a problem with a chart then we'd have to re-generate it. Also it seems that wouldn't play well with Helm hub where each chart version gets its own page, for example:
https://hub.helm.sh/charts/flagger/flagger/0.18.1
I believe the upgrade flow would be the same as what you describe (in my testing though I didn't need to call helm repo update to grab a new chart, but it is necessary to have helm search perform its thing using the latest chart metadata)

That being said, we could indeed have the chart version match the app version, with some minor changes to make it semver.

@ihcsim
Copy link
Contributor

ihcsim commented Sep 9, 2019

Per post stand-up convo, we will publish the chart for every edge and stable release, to a new GCS bucket. We will automate this by adding the bin/helm-build script to GitHub Actions.

alpeb added a commit to linkerd/linkerd2 that referenced this pull request Sep 10, 2019
Ref linkerd/website#502

Adds a new final step into `workflow.yml` to generate and push the Helm
artifacts.

This depends on the changes made to `bin/helm-build` in #3292 so this
branch is based on that one till it gets merged.

Signed-off-by: Alejandro Pedraza <alejandro@buoyant.io>
Signed-off-by: Alejandro Pedraza Borrero <alejandro@buoyant.io>
Copy link
Contributor

@ihcsim ihcsim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Per nits in linkerd/linkerd2#3292, can we call the repo either linkerd, linkerd.io, or helm.linkerd.io, instead of linkerd-stable?

linkerd.io/content/2/tasks/install-helm.md Show resolved Hide resolved
Signed-off-by: Alejandro Pedraza Borrero <alejandro@buoyant.io>
Signed-off-by: Alejandro Pedraza Borrero <alejandro@buoyant.io>
Signed-off-by: Alejandro Pedraza Borrero <alejandro@buoyant.io>
"https://events.linuxfoundation.org/events/servicemeshcon-2019/program/call-for-proposals-cfp/")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably want to remove this, but it should be done in a separate PR.

@alpeb alpeb merged commit 948a5f2 into master Sep 16, 2019
@alpeb alpeb deleted the alpeb/charts branch September 16, 2019 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a Helm repo to host the Linkerd Helm chart
4 participants