Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
54d884f1
Commit
54d884f1
authored
Jan 31, 2017
by
Matt Butcher
Committed by
GitHub
Jan 31, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1888 from technosophos/docs/1880-resource-policy-keep
docs(chart_tips_and_tricks): explain resource-policy.
parents
5061a46f
c5d0dc49
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
+24
-2
charts_tips_and_tricks.md
docs/charts_tips_and_tricks.md
+24
-2
No files found.
docs/charts_tips_and_tricks.md
View file @
54d884f1
...
@@ -74,16 +74,38 @@ The `sha256sum` function can be used together with the `include`
...
@@ -74,16 +74,38 @@ The `sha256sum` function can be used together with the `include`
function to ensure a deployments template section is updated if another
function to ensure a deployments template section is updated if another
spec changes:
spec changes:
```
```
yaml
kind
:
Deployment
kind
:
Deployment
spec
:
spec
:
template
:
template
:
metadata
:
metadata
:
annotations
:
annotations
:
checksum/config
:
{{
include (print $.Chart.Name "/templates/secret.yaml") . | sha256sum
}}
checksum/config
:
{{
include (print $.Chart.Name "/templates/secret.yaml") . | sha256sum
}}
[...]
[
...
]
```
```
## Tell Tiller Not To Delete a Resource
Sometimes there are resources that should not be deleted when Helm runs a
`helm delete`
. Chart developers can add an annotation to a resource to prevent
it from being deleted.
```
yaml
kind
:
Secret
metadata
:
annotations
:
"
helm.sh/resource-policy"
:
keep
[
...
]
```
(Quotation marks are required)
The annotation
`"helm.sh/resource-policy": keep`
instructs Tiller to skip this
resource during a
`helm delete`
operation. _However_, this resource becomes
orphaned. Helm will no longer manage it in any way. This can lead to problems
if using
`helm install --replace`
on a release that has already been deleted, but
has kept resources.
## Using "Partials" and Template Includes
## Using "Partials" and Template Includes
Sometimes you want to create some reusable parts in your chart, whether
Sometimes you want to create some reusable parts in your chart, whether
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment