Files
KubeDiagrams/bin/helm-diagrams
2025-01-05 08:29:28 +01:00

20 lines
398 B
Bash
Executable File

#! /bin/sh
# $1: Helm Chart URL
repository=$(dirname $1)
chart=$(basename $1)
rid=helm-diagrams-repo
# Add a repository.
helm repo add $rid $repository --force-update
# Process the chart.
helm template $chart $rid/$chart > $chart.yaml
# Generate the chart architecture diagram.
kube-diagrams -c KubeDiagrams.yaml --without-namespace $chart.yaml
# Remove the repository.
helm repo remove $rid