Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yurrriq/helm-outdated
A Helm plugin to list outdated subcharts
https://github.com/yurrriq/helm-outdated
dependency-management helm helm-plugin kubernetes outdated-dependencies
Last synced: 17 days ago
JSON representation
A Helm plugin to list outdated subcharts
- Host: GitHub
- URL: https://github.com/yurrriq/helm-outdated
- Owner: yurrriq
- Created: 2018-08-21T21:55:00.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-27T20:38:37.000Z (over 6 years ago)
- Last Synced: 2024-11-17T07:29:15.922Z (3 months ago)
- Topics: dependency-management, helm, helm-plugin, kubernetes, outdated-dependencies
- Language: Shell
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
README
* helm-outdated
** Dependencies
- [[https://helm.sh/][Helm]] (obviously)
- (GNU) awk
- [[https://yq.readthedocs.io/][yq]]
- Optional (for ~make install~): [[https://www.gnu.org/software/stow/][GNU Stow]]** Script
:PROPERTIES:
:header-args: :tangle outdated.sh
:END:Be safer.
#+BEGIN_SRC sh :shebang "#! /usr/bin/env bash"
set -euo pipefail
#+END_SRCIterate through each dependency, and determine if it's outdated.
#+BEGIN_SRC sh
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; }')
#+END_SRC
** Metadata
#+BEGIN_SRC yaml :tangle plugin.yaml :padline no
name: outdated
version: 0.0.5
usage: list outdated subcharts
description: |-
A Helm plugin to list outdated subcharts
command: "$HELM_PLUGIN_DIR/outdated.sh"
#+END_SRC
** Installation
:PROPERTIES:
:header-args: :tangle Makefile :padline no
:END:The default target, =install=, is phony.
#+BEGIN_SRC makefile
.DEFAULT: install
.PHONY: install
#+END_SRCThe =install= target tangles [[./README.org][README.org]], creates the target directory if
missing, and uses [[https://www.gnu.org/software/stow/][GNU Stow]] to install the plugin.
#+BEGIN_SRC makefile
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" .
#+END_SRC** Stow Ignore List
#+BEGIN_SRC txt :tangle .stow-local-ignore :padline no
\.DS_Store
\.git
Makefile
README\.org
#+END_SRC