Merge pull request #1513 from databus23/checksum

Add a checksum function to the template engine
pull/1484/head
Matt Butcher 8 years ago committed by GitHub
commit 74353f73a4

@ -61,6 +61,29 @@ Because YAML ascribes significance to indentation levels and whitespace,
this is one great way to include snippets of code, but handle
indentation in a relevant context.
## Automatically Roll Deployments When ConfigMaps or Secrets change
Often times configmaps or secrets are injected as configuration
files in containers.
Depending on the application a restart may be required should those
be updated with a subsequent `helm upgrade`, but if the
deployment spec itself didn't change the application keeps running
with the old configuration resulting in an inconsistent deployment.
The `sha256sum` function can be used together with the `include`
function to ensure a deployments template section is updated if another
spec changes:
```
kind: Deployment
spec:
template:
metadata:
annotations:
checksum/config: {{ include "mychart/templates/configmap.yaml" . | sha256sum }}
[...]
```
## Using "Partials" and Template Includes
Sometimes you want to create some reusable parts in your chart, whether

2
glide.lock generated

@ -201,7 +201,7 @@ imports:
- name: github.com/Masterminds/semver
version: 52edfc04e184ecf0962489d167b511b27aeebd61
- name: github.com/Masterminds/sprig
version: 8f797f5b23118d8fe846c4296b0ad55044201b14
version: 3fb136ad254dd34998b95f8d523b09a0dafa31b5
- name: github.com/mattn/go-runewidth
version: d6bea18f789704b5f83375793155289da36a3c7f
- name: github.com/pborman/uuid

Loading…
Cancel
Save