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

[bitnami/common] Digest/Tag new approach backward compatible #12029

Merged
merged 1 commit into from
Aug 23, 2022
Merged

Conversation

carrodher
Copy link
Member

@carrodher carrodher commented Aug 23, 2022

Current behavior

1.- Default values

$ cat values.yaml
 image:
   registry: docker.io
   repository: bitnami/rabbitmq
   tag: 3.10.7-debian-11-r4
   digest: ""
$ helm template . | grep 'image:'
          image: docker.io/bitnami/rabbitmq:3.10.7-debian-11-r4

2.- Setting the image.digest

$ cat values.yaml
 image:
   registry: docker.io
   repository: bitnami/rabbitmq
   tag: 3.10.7-debian-11-r4
   digest: "sha256:aaa"
$ helm template . | grep 'image:'
          image: docker.io/bitnami/rabbitmq@sha256:aaa

3.- Removing the image.digest (old default)

$ cat values.yaml
 image:
   registry: docker.io
   repository: bitnami/rabbitmq
   tag: 3.10.7-debian-11-r4
$ helm template . | grep 'image:'
          image: docker.io/bitnami/rabbitmq@<nil>

Behavior with changes in this PR

1.- Default values

$ cat values.yaml
 image:
   registry: docker.io
   repository: bitnami/rabbitmq
   tag: 3.10.7-debian-11-r4
   digest: ""
$ helm template . | grep 'image:'
          image: docker.io/bitnami/rabbitmq:3.10.7-debian-11-r4

2.- Setting the image.digest

$ cat values.yaml
 image:
   registry: docker.io
   repository: bitnami/rabbitmq
   tag: 3.10.7-debian-11-r4
   digest: "sha256:bbb"
$ helm template . | grep 'image:'
          image: docker.io/bitnami/rabbitmq@sha256:bbb

3.- Removing the image.digest (old default)

$ cat values.yaml
 image:
   registry: docker.io
   repository: bitnami/rabbitmq
   tag: 3.10.7-debian-11-r4
$ helm template . | grep 'image:'
          image: docker.io/bitnami/rabbitmq:3.10.7-debian-11-r4

Note the difference in the third case. With the current approach (bitnami/common@2.0.0), when image.digest doesn't exist in the values.yaml it returns image: docker.io/bitnami/rabbitmq@<nil>. With the changes in this PR (bitnami/common@2.0.1), when the image.digest doesn't exist in the values.yaml a valid image is returned image: docker.io/bitnami/rabbitmq:3.10.7-debian-11-r4 using the image.tag as usual.

This is what it's behind the issue described at #12026

Once merged this PR, we should release a new version of the different Helm charts bundling bitnami/common@2.0.1

Signed-off-by: Carlos Rodriguez Hernandez <carlosrh@vmware.com>
@jouve
Copy link
Contributor

jouve commented Aug 31, 2022

glad to see you reintroduced parts of #11844 :)

rafariossaa pushed a commit to rafariossaa/charts that referenced this pull request Sep 13, 2022
…#12029)

Signed-off-by: Carlos Rodriguez Hernandez <carlosrh@vmware.com>

Signed-off-by: Carlos Rodriguez Hernandez <carlosrh@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants