Skip to content

yurrriq/helm-outdated

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

helm-outdated

Dependencies

Script

Be safer.

set -euo pipefail

Iterate through each dependency, and determine if it’s outdated.

while IFS= read -r dependency; do
    subchart="${dependency%-*}"
    current="${dependency##*-}"
    latest=$(helm inspect chart "$subchart" | yq -r '.version')

    if [ "$current" == "$latest" ]; then
        printf "%s is up to date.\\n" "$subchart"
    else
        printf "Consider upgrading %s: %s -> %s.\\n" \
            "$subchart" "$current" "$latest"
    fi
done < <(helm dep list \
    | grep -v WARNING \
    | tail -n+2 | head -n-1 | sort -u \
    | awk '{ sub("@","",$3); printf "%s/%s-%s\n", $3, $1, $2; }')

Metadata

name: outdated
version: 0.0.5
usage: list outdated subcharts
description: |-
  A Helm plugin to list outdated subcharts
command: "$HELM_PLUGIN_DIR/outdated.sh"

Installation

The default target, install, is phony.

.DEFAULT: install
.PHONY: install

The install target tangles README.org, creates the target directory if missing, and uses GNU Stow to install the plugin.

install: README.org
	@ emacs --batch --quick \
		--load ob-tangle \
		--eval '(setq org-src-preserve-indentation t)' \
		--eval '(org-babel-tangle-file "$<")'
	@ mkdir -p "$${HELM_HOME:-$$HOME/.helm}/plugins/outdated"
	@ stow -t "$${HELM_HOME:-$$HOME/.helm}/plugins/outdated" .

Stow Ignore List

\.DS_Store
\.git
Makefile
README\.org