Set default imagePullPolicy to IfNotPresent (#325)

* Set default imagePullPolicy to IfNotPresent

Fixes #295 for MySQL chart in the same way as #309 does it for MariaDB.

Related to kubernetes/kubernetes#38542.

PS I've changed `pod.alpha.kubernetes.io/init-containers` to
`pod.beta.kubernetes.io/init-containers`.

* Update docs about updating images
This commit is contained in:
Maciej Strzelecki
2016-12-21 15:28:42 -08:00
committed by Lachlan Evenson
parent 0374372bae
commit 7d2b14da45
4 changed files with 10 additions and 9 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
name: mysql
version: 0.2.2
version: 0.2.3
description: Chart for MySQL
keywords:
- mysql
+1 -1
View File
@@ -47,7 +47,7 @@ The following tables lists the configurable parameters of the MySQL chart and th
| Parameter | Description | Default |
| ----------------------- | ---------------------------------- | ---------------------------------------------------------- |
| `imageTag` | `mysql` image tag. | Most recent release |
| `imagePullPolicy` | Image pull policy | `Always` if `imageTag` is `latest`, else `IfNotPresent` |
| `imagePullPolicy` | Image pull policy | `IfNotPresent` |
| `mysqlRootPassword` | Password for the `root` user. | `nil` |
| `mysqlUser` | Username of new user to create. | `nil` |
| `mysqlPassword` | Password for the new user. | `nil` |
+4 -3
View File
@@ -13,7 +13,7 @@ spec:
labels:
app: {{ template "fullname" . }}
annotations:
pod.alpha.kubernetes.io/init-containers: '[
pod.beta.kubernetes.io/init-containers: '[
{
"name": "remove-lost-found",
"image": "busybox:1.25.0",
@@ -23,14 +23,15 @@ spec:
"name": "data",
"mountPath": "/var/lib/mysql"
}
]
],
"imagePullPolicy": {{ .Values.imagePullPolicy | quote }}
}
]'
spec:
containers:
- name: {{ template "fullname" . }}
image: "mysql:{{ .Values.imageTag }}"
imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }}
imagePullPolicy: {{ .Values.imagePullPolicy | quote }}
resources:
{{ toYaml .Values.resources | indent 10 }}
env:
+4 -4
View File
@@ -21,11 +21,11 @@ imageTag: "5.7.14"
##
# mysqlDatabase:
## Specify a imagePullPolicy
## 'Always' if imageTag is 'latest', else set to 'IfNotPresent'
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
## Specify an imagePullPolicy (Required)
## It's recommended to change this to 'Always' if the image tag is 'latest'
## ref: http://kubernetes.io/docs/user-guide/images/#updating-images
##
# imagePullPolicy:
imagePullPolicy: IfNotPresent
## Persist data to a persitent volume
persistence: