Check for Available Helm Chart Updates

Check for Available Helm Chart Updates

Managing #helm Chart versions can be a bit of an interesting process... if you first want to test out a chart, it's very likely that you won't hard code the version. You're just trying it out, right? Maybe it's just for dev/test? And then the chart slips out of dev/test and you are reminded of this mistake when some form of Helm controller (in the case of this article, #FluxCD) automatically upgrades the chart and something breaks. At this point, every chart you deploy will likely have a version attached to it. Buried in a manifest, and possibly forgotten about until, again, something breaks.

Great, so now all of your Helm Charts are lovingly locked down to a specific version, and your platform or software update process now to regularly check for chart updates. You know, security and reliability and things.

This one-liner helps:

  • list every version of a Helm Chart installed in a namespace (managed by FluxCD), and
  • uses the Helm CLI to determine if there are any updated versions available

---

Ugly Command Name: Check for Available Helm Chart Updates

What does it do?

This command will fetch each Helm Chart name and version inside of a namespace (if manged by FluxCD), and uses the Helm CLI to determine if there is an update available.

When would you use it?

In many cases our Helm Charts have not been updated in a while, and keeping our software and infrastructure components up to date is key task in maintaining service reliability. Rather than having to manually audit every GitOps HelmChart manifest and then manually compare this to each upstream repo, this command can quickly provide and audit of what is deployed and what should be upgraded.

This command is specifically focused on FluxCD managed Helm Charts.

What is the command?

Please view the GitHub Gist below to find the code snippet. Due to a limitation with LinkedIn, it does not accept some code in the code snippet and breaks the Article feature :-/

https://gist.github.com/stewartshea/9f9ab7900b5e948eed40d4b433c20d5e

What is some sample output?

Release: argo-cd | Chart: flux-system/argo-cd | Installed Version: 5.29.1 | Available Update: True | Available Version: 5.42.1
Release: vault | Chart: flux-system/vault | Installed Version: 0.23.0 | Available Update: True | Available Version: 0.25.0        

What does it need?

  • kubectl
  • jq
  • helm

If you would like this command tailored for your environment and ready to copy & paste, this command has been added to the open source library of commands available through RunWhen Local. Check it out here: https://docs.runwhen.com/public/runwhen-local/getting-started/running-locally

Find an example of the command here: https://runwhen-local.sandbox.runwhen.com/vault/vault-Helm-Release-Health/

Have an ugly command to share? Collaborate with us on GitHub with issues or discussions

要查看或添加评论,请登录

Shea Stewart的更多文章

  • Reflections on 10 Days of Sharing Ugly Commands

    Reflections on 10 Days of Sharing Ugly Commands

    As someone who spends a lot of time with #kubernetes technology and users, I recently embarked on a 10-day journey to…

  • Ugly Command Party - Day 10

    Ugly Command Party - Day 10

    On the 10th of the ugly command party, the command I'll share is: Ugly Command Name: Find Ingress Owner and Service…

  • Ugly Command Party - Day 9

    Ugly Command Party - Day 9

    On the 9th of the ugly command party, the command I'll share is: Ugly Command Name: Check Missing or Risky…

  • Ugly Command Party - Day 8

    Ugly Command Party - Day 8

    On the 8th of the ugly command party, the command I'll share is: Ugly Command Name: List ImagePullBackOff Events and…

  • Ugly Command Party - Day 7

    Ugly Command Party - Day 7

    On the 7th of the ugly command party, the command I'll share is: Ugly Command Name: Test Service Account Access to…

  • Ugly Command Party - Day 6

    Ugly Command Party - Day 6

    Ugly Command Name: Check for RWO Persistent Volume Node Attachment Issues What does it do? Searches through a namespace…

  • Ugly Command Party Day 5

    Ugly Command Party Day 5

    On the 5th of the ugly command party, the command I'll share is: Ugly Command Name: List Images and Tags for Every…

  • Ugly Command Party - Day 4

    Ugly Command Party - Day 4

    On the 4th of the ugly command party, the command I'll share is: Ugly Command Name: Fetch Ingress Object Health in…

  • Ugly Command Party - Day 3

    Ugly Command Party - Day 3

    On the 3rd of the ugly command party, the command I'll share is: Ugly Command Name: Find Failed Certificate Requests…

  • Ugly Command Party - Day 2

    Ugly Command Party - Day 2

    On the second day of the ugly command party, the command I'll share is: Ugly Command Name: Troubleshoot Unready…

社区洞察

其他会员也浏览了