f.StringVar(&upgrade.version,"version","","specify the exact chart version to use. If this is not specified, the latest version is used")
f.StringVar(&upgrade.version,"version","","specify the exact chart version to use. If this is not specified, the latest version is used")
f.Int64Var(&upgrade.timeout,"timeout",300,"time in seconds to wait for any individual kubernetes operation (like Jobs for hooks)")
f.Int64Var(&upgrade.timeout,"timeout",300,"time in seconds to wait for any individual kubernetes operation (like Jobs for hooks)")
f.BoolVar(&upgrade.resetValues,"reset-values",false,"when upgrading, reset the values to the ones built into the chart")
f.BoolVar(&upgrade.resetValues,"reset-values",false,"when upgrading, reset the values to the ones built into the chart")
f.BoolVar(&upgrade.reuseValues,"reuse-values",false,"when upgrading, reuse the last release's values, and merge in any new values. If '--reset-values' is specified, this is ignored.")
f.BoolVar(&upgrade.wait,"wait",false,"if set, will wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment are in a ready state before marking the release as successful. It will wait for as long as --timeout")
f.BoolVar(&upgrade.wait,"wait",false,"if set, will wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment are in a ready state before marking the release as successful. It will wait for as long as --timeout")
@ -16,6 +16,8 @@ This will match version 1.2.0 and any patches to that release (1.2.1, 1.2.999, a
Where possible, use `https://` repository URLs, followed by `http://` URLs.
Where possible, use `https://` repository URLs, followed by `http://` URLs.
If the repository has been added to the repository index file, the repository name can be used as an alias of URL. Use `alias:` or `@` followed by repository names.
File URLs (`file://...`) are considered a "special case" for charts that are assembled by a fixed deployment pipeline. Charts that use `file://` in a `requirements.yaml` file are not allowed in the official Helm repository.
File URLs (`file://...`) are considered a "special case" for charts that are assembled by a fixed deployment pipeline. Charts that use `file://` in a `requirements.yaml` file are not allowed in the official Helm repository.
@ -58,16 +58,18 @@ hooks, the lifecycle is altered like this:
1. User runs `helm install foo`
1. User runs `helm install foo`
2. Chart is loaded into Tiller
2. Chart is loaded into Tiller
3. After some verification, Tiller renders the `foo` templates
3. After some verification, Tiller renders the `foo` templates
4. Tiller executes the `pre-install` hook (loading hook resources into
4. Tiller prepares to execute the `pre-install` hooks (loading hook resources into
Kubernetes)
Kubernetes)
5. Tiller waits until the hook is "Ready"
5. Tiller sorts hooks by weight (assigning a weight of 0 by default) and by name for those hooks with the same weight in ascending order.
6. Tiller loads the resulting resources into Kubernetes. Note that if the `--wait`
6. Tiller then loads the hook with the lowest weight first (negative to positive)
7. Tiller waits until the hook is "Ready"
8. Tiller loads the resulting resources into Kubernetes. Note that if the `--wait`
flag is set, Tiller will wait until all resources are in a ready state
flag is set, Tiller will wait until all resources are in a ready state
and will not run the `post-install` hook until they are ready.
and will not run the `post-install` hook until they are ready.
7. Tiller executes the `post-install` hook (loading hook resources)
9. Tiller executes the `post-install` hook (loading hook resources)
8. Tiller waits until the hook is "Ready"
10. Tiller waits until the hook is "Ready"
9. Tiller returns the release name (and other data) to the client
11. Tiller returns the release name (and other data) to the client
10. The client exits
12. The client exits
What does it mean to wait until a hook is ready? This depends on the
What does it mean to wait until a hook is ready? This depends on the
resource declared in the hook. If the resources is a `Job` kind, Tiller
resource declared in the hook. If the resources is a `Job` kind, Tiller
@ -114,6 +116,7 @@ metadata:
# This is what defines this resource as a hook. Without this line, the
# This is what defines this resource as a hook. Without this line, the
# job is considered part of the release.
# job is considered part of the release.
"helm.sh/hook": post-install
"helm.sh/hook": post-install
"helm.sh/hook-weight": "-5"
spec:
spec:
template:
template:
metadata:
metadata:
@ -154,3 +157,12 @@ When subcharts declare hooks, those are also evaluated. There is no way
for a top-level chart to disable the hooks declared by subcharts. And
for a top-level chart to disable the hooks declared by subcharts. And
again, there is no guaranteed ordering.
again, there is no guaranteed ordering.
It is also possible to define a weight for a hook which will help build a deterministic executing order. Weights are defined using the following annotation:
```
annotations:
"helm.sh/hook-weight": "5"
```
Hook weights can be positive or negative numbers but must be represented as strings. When Tiller starts the execution cycle of hooks of a particular Kind it will sort those hooks in ascending order.
- [GitLab, Consumer Driven Contracts, Helm and Kubernetes](https://medium.com/@enxebre/gitlab-consumer-driven-contracts-helm-and-kubernetes-b7235a60a1cb#.xwp1y4tgi)
- [GitLab, Consumer Driven Contracts, Helm and Kubernetes](https://medium.com/@enxebre/gitlab-consumer-driven-contracts-helm-and-kubernetes-b7235a60a1cb#.xwp1y4tgi)
- [Writing a Helm Chart](https://www.influxdata.com/packaged-kubernetes-deployments-writing-helm-chart/)
- [Writing a Helm Chart](https://www.influxdata.com/packaged-kubernetes-deployments-writing-helm-chart/)
- [Creating a Helm Plugin in 3 Steps](http://technosophos.com/2017/03/21/creating-a-helm-plugin.html)
## Videos
## Video, Audio, and Podcast
- [CI/CD with Jenkins, Kubernetes, and Helm](https://www.youtube.com/watch?v=NVoln4HdZOY): AKA "The Infamous Croc Hunter Video".
- [KubeCon2016: Delivering Kubernetes-Native Applications by Michelle Noorali](https://www.youtube.com/watch?v=zBc1goRfk3k&index=49&list=PLj6h78yzYM2PqgIGU1Qmi8nY7dqn9PCr4)
- [KubeCon2016: Delivering Kubernetes-Native Applications by Michelle Noorali](https://www.youtube.com/watch?v=zBc1goRfk3k&index=49&list=PLj6h78yzYM2PqgIGU1Qmi8nY7dqn9PCr4)
- [Helm with Michelle Noorali and Matthew Butcher](https://gcppodcast.com/post/episode-50-helm-with-michelle-noorali-and-matthew-butcher/): The official Google CloudPlatform Podcast interviews Michelle and Matt about Helm.
## Helm Plugins
## Helm Plugins
@ -32,6 +35,7 @@ or [pull request](https://github.com/kubernetes/helm/pulls).
Tools layered on top of Helm or Tiller.
Tools layered on top of Helm or Tiller.
- [Quay App Registry](https://coreos.com/blog/quay-application-registry-for-kubernetes.html) - Open Kubernetes application registry, including a Helm access client
- [Chartify](https://github.com/appscode/chartify) - Generate Helm charts from existing Kubernetes resources.
- [Chartify](https://github.com/appscode/chartify) - Generate Helm charts from existing Kubernetes resources.
- [VIM-Kubernetes](https://github.com/andrewstuart/vim-kubernetes) - VIM plugin for Kubernetes and Helm
- [VIM-Kubernetes](https://github.com/andrewstuart/vim-kubernetes) - VIM plugin for Kubernetes and Helm
- [Landscaper](https://github.com/Eneco/landscaper/) - "Landscaper takes a set of Helm Chart references with values (a desired state), and realizes this in a Kubernetes cluster."
- [Landscaper](https://github.com/Eneco/landscaper/) - "Landscaper takes a set of Helm Chart references with values (a desired state), and realizes this in a Kubernetes cluster."