alexellis / arkade

Open Source Marketplace For Developer Tools
https://blog.alexellis.io/kubernetes-marketplace-two-year-update/
MIT License
4.25k stars 289 forks source link

Ignore latest tags in chart upgrade #1087

Closed rgee0 closed 5 months ago

rgee0 commented 5 months ago

Description

As described in #1086 the chart upgrade command was upgrading latest tags which was undesirable.

This change causes the upgrade command to ignore any images tagged latest. It also addresses an edge-case around -RC tags which was highlighted by the additional test created in this change. The k10mulitcluster tool that was disabled has also been removed, so closes #1082

Motivation and Context

How Has This Been Tested?

Functionally tested by using the faasd docker-compose.yaml. Initially ran chart upgrade on the file as is, and one change was found:

➜  arkade git:(ignoreLatest) ✗ ./arkade chart upgrade -f faasd.yaml -v
2024/06/13 09:37:33 Verifying images in: faasd.yaml
2024/06/13 09:37:33 Found 4 images
2024/06/13 09:37:34 [ghcr.io/openfaas/gateway] 0.27.5 => 0.27.7

This image was then changed to ghcr.io/openfaas/gateway:latest and the command run again:

➜  arkade git:(ignoreLatest) ✗ ./arkade chart upgrade -f faasd.yaml -v
2024/06/13 09:37:50 Verifying images in: faasd.yaml
2024/06/13 09:37:50 Found 4 images

The new test passes as show in the pipeline

No new tool has been added.

Types of changes

Documentation

Checklist:

rgee0 commented 5 months ago

I'm wondering whether it would be better to now use nextTag rather than latestTag in the pre-existing code to avoid confusion around :latest tags