Unverified Commit 15053e67 authored by Taylor Thomas's avatar Taylor Thomas Committed by GitHub

Merge pull request #3119 from franzbeltran/update-pull-policy-best-practice

Update best practices on imagePullPolicy
parents f6bff5da 85ed9f3d
...@@ -30,12 +30,21 @@ image: "{{ .Values.redisImage }}:{{ .Values.redisTag }}" ...@@ -30,12 +30,21 @@ image: "{{ .Values.redisImage }}:{{ .Values.redisTag }}"
## ImagePullPolicy ## ImagePullPolicy
The `imagePullPolicy` should default to an empty value, but allow users to override it: `helm create` sets the `imagePullPolicy` to `IfNotPresent` by default by doing the following in your `deployment.yaml`:
```yaml ```yaml
imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }} imagePullPolicy: {{ .Values.image.pullPolicy }}
``` ```
And `values.yaml`:
```yaml
pullPolicy: IfNotPresent
```
Similarly, Kubernetes defaults the `imagePullPolicy` to `IfNotPresent` if it is not defined at all. If you want a value other than `IfNotPresent`, simply update the value in `values.yaml` to your desired value.
## PodTemplates Should Declare Selectors ## PodTemplates Should Declare Selectors
All PodTemplate sections should specify a selector. For example: All PodTemplate sections should specify a selector. For example:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment