Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
Set default imagePullPolicy to IfNotPresent (#325)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
mstrzele authored and lachie83 committed Dec 21, 2016
1 parent 0374372 commit 7d2b14d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion stable/mysql/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: mysql
version: 0.2.2
version: 0.2.3
description: Chart for MySQL
keywords:
- mysql
Expand Down
2 changes: 1 addition & 1 deletion stable/mysql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Expand Down
7 changes: 4 additions & 3 deletions stable/mysql/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions stable/mysql/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 7d2b14d

Please sign in to comment.