wip: towards a helmfile based config scheme
This commit is contained in:
Executable
+41
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cmd=$1
|
||||
chart=$2
|
||||
env=$3
|
||||
|
||||
dir=_manifests
|
||||
|
||||
build() {
|
||||
if [ ! -d "manifests" ]; then
|
||||
echo "nothing to do here..."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
mkdir -p $dir/templates
|
||||
|
||||
echo "generating $dir/Chart.yaml" 1>&2
|
||||
|
||||
cat <<EOF > $dir/Chart.yaml
|
||||
apiVersion: v1
|
||||
appVersion: "1.0"
|
||||
description: A Helm chart for Kubernetes
|
||||
name: $chart
|
||||
version: 0.1.0
|
||||
EOF
|
||||
|
||||
echo $env 1>&2
|
||||
echo $chart 1>&2
|
||||
cp -r manifests/* $dir/templates
|
||||
}
|
||||
|
||||
clean() {
|
||||
rm -rf $dir
|
||||
}
|
||||
|
||||
case "$cmd" in
|
||||
"build" ) build ;;
|
||||
"clean" ) clean ;;
|
||||
* ) echo "unsupported command: $cmd" 1>&2; exit 1 ;;
|
||||
esac
|
||||
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [[ -f base/kustomization.yaml ]]; then
|
||||
cat >base/_manifest.yaml
|
||||
kubectl kustomize base
|
||||
else
|
||||
cat
|
||||
fi
|
||||
Reference in New Issue
Block a user