Repository navigation
Conversation
Contributor
|
Could we add some tests for these scenarios? |
Contributor
Author
|
@brancz sure I can. What scenarios do you want to test ? |
brancz
reviewed
Jul 24, 2020
|
|
||
| resultImage := sset.Spec.Template.Spec.Containers[0].Image | ||
| expected := "my-reg/prometheus:latest" | ||
| expected := "my-reg/prometheus:latest@sha256:7384a79f4b4991bf8269e7452390249b7c70bcdd10509c8c1c6c6e30e32fb324" |
Contributor
There was a problem hiding this comment.
is this right? if I'm not mistaken I believe this would not work
Contributor
Author
There was a problem hiding this comment.
Looks like it's working:
> docker pull debian
Using default tag: latest
latest: Pulling from library/debian
31dd5ebca5ef: Pull complete
Digest: sha256:68f4e2259032a4e6f5035804e64438b52af8dd5889528b305b9059183ea4cd2a
Status: Downloaded newer image for debian:latest
docker.io/library/debian:latest
> docker pull debian:latest
latest: Pulling from library/debian
Digest: sha256:68f4e2259032a4e6f5035804e64438b52af8dd5889528b305b9059183ea4cd2a
Status: Image is up to date for debian:latest
docker.io/library/debian:latest
> docker pull debian@sha256:68f4e2259032a4e6f5035804e64438b52af8dd5889528b305b9059183ea4cd2a
sha256:68f4e2259032a4e6f5035804e64438b52af8dd5889528b305b9059183ea4cd2a: Pulling from library/debian
Digest: sha256:68f4e2259032a4e6f5035804e64438b52af8dd5889528b305b9059183ea4cd2a
Status: Image is up to date for debian@sha256:68f4e2259032a4e6f5035804e64438b52af8dd5889528b305b9059183ea4cd2a
docker.io/library/debian@sha256:68f4e2259032a4e6f5035804e64438b52af8dd5889528b305b9059183ea4cd2a
> docker pull debian:latest@sha256:68f4e2259032a4e6f5035804e64438b52af8dd5889528b305b9059183ea4cd2a
sha256:68f4e2259032a4e6f5035804e64438b52af8dd5889528b305b9059183ea4cd2a: Pulling from library/debian
Digest: sha256:68f4e2259032a4e6f5035804e64438b52af8dd5889528b305b9059183ea4cd2a
Status: Image is up to date for debian@sha256:68f4e2259032a4e6f5035804e64438b52af8dd5889528b305b9059183ea4cd2a
docker.io/library/debian:latest@sha256:68f4e2259032a4e6f5035804e64438b52af8dd5889528b305b9059183ea4cd2a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since
0.35.0release, some fields have been deprecated:spec.baseImagespec.tagspec.shaIn code, pkg/prometheus/statefulset.go line 284 and later, operator build prometheusImagePath using deprecated fields and spec.Version. At line 287, if spec.Image is defined, operator will simply replace prometheusImagePath value with spec.Image value.
This skip the version, which is not propagated anymore to statefulset definition.
This patch intends to be able to use either version or tag information to set Prometheus version for statefulset.
This brings back the old behaviour while keeping the deprecation mechanism