dotfiles/.local/bin/scripts/stack-helm

22 lines
422 B
Plaintext
Raw Normal View History

2024-02-20 18:53:00 +00:00
#!/bin/sh -e
# Emulate helm repo adding for easy command copy-pasting
cd "$STACKSPIN/../stackspout"
cmd=$1
shift
case "$cmd" in
(install) true;;
(repo) shift;;
(*) echo 'Unknown command!'>&2 && exit 2;;
esac
name=$1
url=$2
echo "apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: HelmRepository
metadata:
name: $name
namespace: flux-system
spec:
interval: 60m
url: $url" | tee "infrastructure/sources/$name.yaml"