Pods and PodTemplates
The following (non-exhaustive) list of resources use PodTemplates:
- Deployment
- ReplicationController
- DaemonSet
- StatefulSet
A container image should use a fixed tag or the SHA of the image. It should notuse the tags , head
, canary
, or other tags that are designed to be“floating”.
An image and a tag may be defined in as two separate fields:
helm create
sets the imagePullPolicy
to IfNotPresent
by default by doingthe following in your :
Similarly, Kubernetes defaults the imagePullPolicy
to IfNotPresent
if it isnot defined at all. If you want a value other than , simply updatethe value in values.yaml
to your desired value.
All PodTemplate sections should specify a selector. For example:
But this is even more important for sets like Deployment. Without this, theentire set of labels is used to select matching pods, and this will break ifyou use labels that change, like version or release date.