airshipit / treasuremap

Reference Airship manifests, CICD, and reference architecture.
http://openstack.org
Apache License 2.0
52 stars 39 forks source link

Create helm-chart-collator Image for Treasuremap #162

Closed lb4368 closed 2 years ago

lb4368 commented 3 years ago

Problem description Treasuremap manifests currently use the default quay.io/airshipit/helm-chart-collator:latest image. This requires that charts needed by treasuremap (e.g. Dex) be managed in the charts.yaml file in the images repository where the helm-chart-collator is defined and built. It would be better if treasuremap managed its own charts.yaml and created a helm-chart-collator image specific for the needs of treasuremap. This would make it easier to place all charts needed by treasuremap into a single helm-chart-collator repository image to avoid having to access multiple helm repositories during deployment. This may also make it easier for downstream sites to build their own collators using the treasuremap charts.yaml as a base.

Proposed change

  1. Update treasuremap to create associated helm-chart-collator images compatible with each treasuremap release.
  2. The treasuremap helm-chart-collator should include helm charts used for all treasuremap manifest functions such that the collator is the only HelmRepository used by treasuremap.
  3. Update treasuremap functions to use the helm-chart-collator accordingly.

Potential impacts

seaneagan commented 3 years ago

Items 2. and 3. are definitely needed so we can deploy without reaching out to external helm repositories. For item 1. during the CI process (master branch) it may prove difficult to both update the helm-chart-collator input (charts.yaml) and use the output (image) in a single commit, since it will need to be stored somewhere (likely quay.io) before it can be referenced/used, unless we can create a local docker repository to store it in or something. So I am not sure how we can get around needing two commits: 1) Update charts.yaml (CI pushes to quay.io on merge) 2) Update treasuremap to use image from 1)

Thus, putting the charts.yaml in treasuremap directly will have the down side of needing to wait for the (expensive) treasuremap gates for both commits, and on the first commit there is really nothing to validate, unless we can do some fancy zuul job trigger file exclusion. It would be nice to keep the charts versions in treasuremap where they will be used, but maybe keeping it in airship/images for now would be simplest. In any case I think we should probably change the name to indicate that it is for use by treasuremap e.g. quay.io/airshipit/treasuremap-helm-charts.

seaneagan commented 3 years ago

Also the helm-chart-collator and helm-chart-repository functions and catalogue entries (hcc image and helm repo url) are currently in airshipctl, and we are currently just referencing the latest image. We should be pinning to an image sha and this should be done in treasuremap, since this is where charts are actually consumed. If we leave the functions in airshipctl, we should just leave the default hcc image ref empty. We could also move the functions to treasuremap if preferred.

seaneagan commented 3 years ago

https://review.opendev.org/c/airship/images/+/794838

seaneagan commented 3 years ago

I created https://github.com/airshipit/airshipctl/issues/582 as well to make it easy to use other helm chart repositories during development time as this will still be useful.

seaneagan commented 3 years ago

https://review.opendev.org/c/airship/treasuremap/+/796933

seaneagan commented 3 years ago

https://review.opendev.org/c/airship/treasuremap/+/797138

lb4368 commented 2 years ago

Closed per patchset merge