-
Notifications
You must be signed in to change notification settings - Fork 212
Change imagePullPolicy to Always #504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
mythi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ozhuraki the operator code needs changes too: pkg/controllers/*/controller.go
I'd also want the policy documented somewhere because it has implications to users especially in today's environment with Docker's image pull request limit.
Perhaps add a sub-section to top-level README under Plugins:
Pre-built plugin images
Pre-built images of the plugins are available on the Docker hub. These images are automatically built and uploaded to the hub from the latest master branch of this repository.
Release tagged images of the components are also available on the Docker hub, tagged with their release version numbers in the format x.y.z, corresponding to the branches and releases in this repository.
**Note:** the default deployment files and are operator are configured with [imagePullPolicy](https://kubernetes.io/docs/concepts/containers/images/#updating-images) Always`
|
Thanks a lot for the help, done. |
1c86a58 to
084bff8
Compare
Codecov Report
@@ Coverage Diff @@
## master #504 +/- ##
=======================================
Coverage 56.70% 56.70%
=======================================
Files 30 30
Lines 2028 2028
=======================================
Hits 1150 1150
Misses 807 807
Partials 71 71 Continue to review full report at Codecov.
|
mythi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
It would be nice to have instructions for resetting policy to IfNotPresent for development purposes. |
From what I'm reading, kustomize is hard for this. We could have a developer script similar to |
I thought kustomize is designed exactly for this kind of task. What's wrong with it? And the controllers can be parameterized to use different policy when instantiating DaemonSets. |
It's hard if all the images need the overlay maintained. If we are fine just documenting how to add the overlay (and leave all the debugging to the end user), it's probably easier. |
|
+1 for leaving IfNotPresent default. Implicit upgrades caused by "Always" can be surprising for users in a negative sense I guess. |
|
IMHO for release images it's safer to use For the master branch I'd prefer |
For the controllers too? |
I have mixed feelings about it. From one side you're right, it's more secure. However, I'd prefer to avoid implicit things and let cluster admins decide when then want to upgrade their software. |
|
At least we seem to agree to use |
With "release images", do you mean tagged images? Those should be immutable, so My two cents: use It's using sed here for historic reasons, but kustomize would also work. |
|
@pohly when do you use image policy Always in PMEM-CSI? |
084bff8 to
7ca415d
Compare
|
Alright, if release images are immutable that simplifies everything. |
7ca415d to
42a07b5
Compare
It's used when developers deploy PMEM-CSI via the test script. Normal users deploy either via YAML or operator and both use the default "IfNotPresent". |
|
I'm OK with the script approach and the default setting. Just one comment: To get new users avoid any of these problems, perhaps we should more clearly point them to use the release tagged images. |
|
@ozhuraki some .yamls are missing the
|
I understand the motivation, but I think that changing the image policy to address this particular problem is just whacking one mole. Normal users should never use "devel" artifacts, whether it's images or YAML files. |
OK, thanks, added.
Looks that in the controllers' code the ImagePullPolicy is present everywhere (except in patchermanager_test, which is probably the intent there): |
|
Kubernetes default for tags is "IfNotPresent", "Always" is used by default for "latest" and when there's no tag: https://kubernetes.io/docs/concepts/containers/images/#updating-images Only moving tags (like "devel") need explicit "Always" policy, but why device plugins would use such things instead of "latest" which already implies has that? Immutable (version) tags are fine with the default policy, it doesn't need to be explicitly set. |
we don't have |
These patches change imagePullPolicy to Always in base deployments
and demos as discussed in #400.
In case a specific imagePullPolicy is required, it can be provided
through the relevant kustomization.yaml.
Closes #400.