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] Add support for image digest apart from tag #11797

Merged
merged 1 commit into from
Aug 18, 2022

Conversation

carrodher
Copy link
Member

@carrodher carrodher commented Aug 17, 2022

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

Description of the change

This PR adds support for image digest apart from the existing image tag. Changes in the different Helm charts will look like this one in bitnami/etcd: #11798

Once applied the changes, this is the result when setting the image.digest parameter in the values.yaml:

## Bitnami etcd image version
## ref: https://hub.docker.com/r/bitnami/etcd/tags/
## @param image.registry etcd image registry
## @param image.repository etcd image name
## @param image.tag etcd image tag
## @param image.digest etcd image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
##
image:    
  registry: docker.io
  repository: bitnami/etcd
  tag: 3.5.4-debian-11-r22
  digest: sha256:507bc997779af5f0419ad917167ba1c9a2ceb936f2c1e82fb0f687e6c1296897
$ helm template . -s templates/statefulset.yaml | grep 'image:'
          image: docker.io/bitnami/etcd@sha256:507bc997779af5f0419ad917167ba1c9a2ceb936f2c1e82fb0f687e6c1296897

In the same way, when the image.digest is empty (default value), this is the result:

## Bitnami etcd image version
## ref: https://hub.docker.com/r/bitnami/etcd/tags/
## @param image.registry etcd image registry
## @param image.repository etcd image name
## @param image.tag etcd image tag
## @param image.digest etcd image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
##
image:    
  registry: docker.io
  repository: bitnami/etcd
  tag: 3.5.4-debian-11-r22
  digest: ""
$ helm template . -s templates/statefulset.yaml | grep 'image:'
          image: docker.io/bitnami/etcd:3.5.4-debian-11-r22

Applicable issues

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

@rafariossaa rafariossaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@carrodher carrodher requested review from rafariossaa and removed request for fmulero August 17, 2022 11:42
@carrodher carrodher assigned rafariossaa and unassigned fmulero Aug 17, 2022
@carrodher carrodher merged commit b069345 into master Aug 18, 2022
@carrodher carrodher deleted the commondigest branch August 18, 2022 06:31
@spralexx
Copy link

spralexx commented Aug 18, 2022

This breaks deployment for me when using bitnami/keycloak helm chart. See Log attached.

spralexx@MBP keycloak % helm template --debug keycloak ./|grep "image"
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /Users/spralexx/Desktop/work/kunden/xxxxxx/apps/kubeconfig.yaml
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /Users/spralexx/Desktop/work/kunden/xxxxxx/apps/kubeconfig.yaml
install.go:178: [debug] Original chart version: ""
install.go:195: [debug] CHART PATH: /Users/spralexx/Desktop/work/kunden/xxxxxx/apps/charts/keycloak

          image: docker.io/bitnami/postgresql:14.4.0-debian-11-r21
          imagePullPolicy: "IfNotPresent"
          image: docker.io/bitnami/keycloak:18.0.2-debian-11-r13
          imagePullPolicy: IfNotPresent
          image: docker.io/bitnami/keycloak-config-cli:5.2.2-debian-11-r0
          imagePullPolicy: IfNotPresent
spralexx@MBP keycloak % helm template --debug keycloak ./|grep "image"
spralexx@MBP keycloak % helm dependency update
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /Users/spralexx/Desktop/work/kunden/xxxxxx/apps/kubeconfig.yaml
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /Users/spralexx/Desktop/work/kunden/xxxxxx/apps/kubeconfig.yaml
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "phoenix" chart repository
...Successfully got an update from the "bitnami" chart repository
...Successfully got an update from the "gitlab" chart repository
Update Complete. ⎈Happy Helming!⎈
Saving 2 charts
Downloading postgresql from repo https://charts.bitnami.com/bitnami
Downloading common from repo https://charts.bitnami.com/bitnami
Deleting outdated charts
spralexx@MBP keycloak % helm template --debug keycloak ./|grep "image"
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /Users/spralexx/Desktop/work/kunden/xxxxxx/apps/kubeconfig.yaml
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /Users/spralexx/Desktop/work/kunden/xxxxxx/apps/kubeconfig.yaml
install.go:178: [debug] Original chart version: ""
install.go:195: [debug] CHART PATH: /Users/spralexx/Desktop/work/kunden/xxxxxx/apps/charts/keycloak

          image: docker.io/bitnami/postgresql@<nil>
          imagePullPolicy: "IfNotPresent"
          image: docker.io/bitnami/keycloak@<nil>
          imagePullPolicy: IfNotPresent
          image: docker.io/bitnami/keycloak-config-cli@<nil>
          imagePullPolicy: IfNotPresent

@pyromaniac3010
Copy link

Same for me. All helm charts which use common chart version 1.17.0 break and have image tag nil

@Panplumousse
Copy link

here same issu

carrodher added a commit that referenced this pull request Aug 18, 2022
Signed-off-by: Carlos Rodriguez Hernandez <carlosrh@vmware.com>
carrodher added a commit that referenced this pull request Aug 18, 2022
Signed-off-by: Carlos Rodriguez Hernandez <carlosrh@vmware.com>

Signed-off-by: Carlos Rodriguez Hernandez <carlosrh@vmware.com>
@carrodher
Copy link
Member Author

carrodher commented Aug 18, 2022

Sorry for the inconveniences. Initial changes from #11797 (1.17.0) were reverted at #11829 (1.17.1). The same changes were implemented again at #11830 but bumping the chart version in a major (2.0.0).

The version with the fix is already published, see

$ helm repo update bitnami
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "bitnami" chart repository
Update Complete. ⎈Happy Helming!⎈

$ helm search repo bitnami/common
NAME          	CHART VERSION	APP VERSION	DESCRIPTION
bitnami/common	1.17.1       	1.17.1     	A Library Helm Chart for grouping common logic ...

And the new major will be available once reviewed and merged the PR

@pyromaniac3010
Copy link

@carrodher Thanks a lot for the quick response. Shouldn't it be possible to have the 1.x.x branch working with the digest, too? I think it just needs one more if, isn't it?

@carrodher
Copy link
Member Author

We will work on updating the whole chart catalog to use bitnami/common 2.x.x and the image.digest feature in the same way we did for bitnami/etcd at #11798

rafariossaa pushed a commit to rafariossaa/charts that referenced this pull request Aug 19, 2022
…#11797)

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

Signed-off-by: Carlos Rodriguez Hernandez <carlosrh@vmware.com>
rafariossaa pushed a commit to rafariossaa/charts that referenced this pull request Aug 19, 2022
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.

Support using image digests and not only tags
7 participants