Skip to content

Commit

Permalink
Open the door to including the images list on the Chart.lock file
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Caraballo Llorente <[email protected]>
  • Loading branch information
Pablo Caraballo Llorente committed Dec 16, 2022
1 parent b3a35d4 commit 4a22413
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions hips/hip-0019.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,44 @@ This file should be distributed either alongside or within the Helm Chart being

In addition to this, if the chart lock is available, then we could create a Helm builtin object called `Images`, just like we have `Chart` or `Release`. This would be useful for generating the template YAML and therefore avoid having the image information replicated in the lock and the values.yaml file.

Alternatively to the `images-lock.yml` file, this bill of materials could live inside the existing `Chart.lock`. While this reuses an existing file, which in part is intended to accomodate these kind of metadata, it also implies that a packaged chart may bundle different code than the original (i.e. if we took Bitnami's [Wordpress](https://github.com/bitnami/charts/blob/main/bitnami/wordpress/Chart.lock) and packaged it, the resulting `Chart.lock` would be different to the original). Yet, this could be addressed by tracking the `Chart.lock` file with images in `git`, or by not tracking it at all (like other users may do). This is a debate it already exists for other package managers and that has been out there for a while. A minimalistic draft of the `Chart.lock` file could be as follows:

```yaml
dependencies:
- name: memcached
repository: https://charts.bitnami.com/bitnami
version: 6.3.2
- name: mariadb
repository: https://charts.bitnami.com/bitnami
version: 11.4.1
- name: common
repository: https://charts.bitnami.com/bitnami
version: 2.2.2
digest: sha256:5a55c2b684433bf6fa9efcf0d3c4ab23ceef313808203b766c485b6e03bda60f
generated: "2022-12-13T02:28:18.307577267Z"
images:
- name: wordpress
image: docker.io/bitnami/wordpress:6.0.2-debian-11-r9
digests:
- digest: sha256:b4cb055a643d1d51d1678f3e011cf008b227852bc0a4118126deeed844ccfb6a
arch: linux/amd64
- digest: sha256:4d2760961bdd2e9956d752d637e7795e2eea973c25825bd18cb881c3edeee8ff
arch: linux/arm64
chart: wordpress
- name: bitnami-shell
image: docker.io/bitnami/bitnami-shell:11-debian-11-r37
digests:
- digest: sha256:0946f1d16c010bed0a47e3c09ff193d898c868044bb4c1b037c83b7c53c26deb
arch: linux/amd64
chart: wordpress
- name: apache-exporter
image: docker.io/bitnami/apache-exporter:0.11.0-debian-11-r42
digests:
- digest: sha256:ea4aa97834500297e4252f5f98492c52a7bfd1993bd5ef4e485ae84996b1c63a
arch: linux/amd64
chart: wordpress
```

## Backwards compatibility

There isn't any backward incompatibility, since there's no modification of any existing schema. Charts making use of the `annotations` and `images-lock` file would benefit of the feature, others just wouldn't.
Expand Down

0 comments on commit 4a22413

Please sign in to comment.