Skip to content
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

Kubernetes won't pull down the right mattermost-operator version #90

Closed
MSaurus opened this issue Oct 15, 2019 · 4 comments
Closed

Kubernetes won't pull down the right mattermost-operator version #90

MSaurus opened this issue Oct 15, 2019 · 4 comments

Comments

@MSaurus
Copy link

MSaurus commented Oct 15, 2019

When I install mattermost-operator on a kubernetes cluster that already have pulled down the image before, it won't get the latest version of mattermost-operator. In this documentation file you use both image: mattermost/mattermost-operator:latest and imagePullPolicy: IfNotPresent.

This results in that kubernetes will pull down the image just the first time a user run this yaml file. Then you make an update to mattermost-operator and I want that update. So if the user then run this yaml again, then kubernetes will use the cache of mattermost-operator image instead of pulling down the latest because the imagePullPolicy says it should only pull down the image if the image doesn't exists in the cache. Which it does, because it's the same name and the same tag.

Proposed solution would be to start versioning the mattermost-operator image and put that in the image tag. Then Kubernetes won't use the cache if the image is updated. A user can also decide which version they want to use.

Another solution would be to remove the imagePullPolicy and still use latest as the image tag. Kubernetes would then use Always as the pull policy. However this will make Kubernetes to always pull down the image from docker hub, even if the image hasn't been changed.

@jozuenoon
Copy link
Contributor

Method with latest would work, but versioning is more pragmatic and feels like good idea 👍

@gabrieljackson
Copy link
Collaborator

Thank you for the feedback @MSaurus!

We are aware that we currently have that configuration of latest + IfNotPresent in this manifest file. This is partly due to the operator being very much in flux and also due to some cross referencing of the manifests here with those used in the cloud server.

That said, we can definitely improve this and will change this manifest's behavior asap.

@MSaurus
Copy link
Author

MSaurus commented Oct 17, 2019

Thanks! If there is something I can help with just let me know :)

@cpanato
Copy link
Contributor

cpanato commented Jan 9, 2020

@MSaurus you should not use the latest tag in your production system, please use a specific tag instead

the way we set the latest + IfNotPresent is more for the CI tests.
if you are using for testing only you can change the manifest to change the imagePullPolicy

Closing this, feel free to open a new issue if still have problems.

@cpanato cpanato closed this as completed Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants