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

Helm v3 #75

Closed
wants to merge 7 commits into from
Closed
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
Prev Previous commit
Next Next commit
Fix readme
  • Loading branch information
Jakob Helmecke committed Jun 23, 2020
commit 8ac7401fa979a830fbf9fd48aa508fc7623f7e88
25 changes: 25 additions & 0 deletions LABEL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Migrate to new labels without downtime

1. Delete deployment with `--cascade=false`
2. Delete the corresponding replicaset with `--cascade=false` too
3. Add label to orphaned pods to match the new service selector
4. Deploy the Helm Chart
5. Wait for the newly created pods to get ready
6. Delete orphaned pods using old selector labels


## Example
```bash
kubectl delete deploy -l release=[RELEASE],app=[NAME] --cascade=false
```
```bash
kubectl delete rs -l release=[RELEASE],app=[NAME] --cascade=false
```
```bash
kubectl label pods -l release=[RELEASE],app=[NAME] \
app.kubernetes.io/instance=[RELEASE] \
app.kubernetes.io/name=[NAME]
```
```bash
kubectl delete pods -l release=[RELEASE],app=[NAME]
```
15 changes: 2 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -7,6 +7,8 @@

## Project Status

As of [PR #75](https://github.com/t3n/helm-charts/pull/75) we dropped support for Helm v2 and switched to Helm Chart apiVersion v2. We also switched labels to [Recommended Labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/). A detailed introduction on how to migrate without downtime can be found [here](LABEL.md)

This project is still under active development, so you might run into [issues](https://github.com/t3n/helm-charts/issues). If you do, please don't be shy about letting us know, or better yet, contribute a fix or feature.
We will also add more charts over time, so keep an eye on this repository.

@@ -43,19 +45,6 @@ PRs accepted. Pipeline is using Helm v3.

Small note: If editing the Readme, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.

## Upgrading to Helm v3

Since [PR #75](https://github.com/t3n/helm-charts/pull/75) we changed the chart labels to helm's recommended common labels. To Upgrade with minimal downtime follow these steps:
```
kubectl delete deploy *chart-name* --cascade=false
kubectl delete rs *chart-name* -l release=*chart-name* --cascade=false
kubectl label pods -l release=*chart-name* app.kubernetes.io/instance=*chartname* helm.sh/chart=*chartname* app.kubernetes.io/managed-by=Helm app.kubernetes.io/name=*chartname* helm.sh/chart=*chartname-version*
```
After you labeled the old pods with the new labels, deploy the new chart version with helm, delete the old pods
```
kubectl delete pods -l release=*chartname*
```

## License

[MIT](LICENSE)