wip: misc helmfile experiments

This commit is contained in:
2025-05-13 22:35:33 +02:00
parent aadc6cb305
commit 87a10aab1f
3 changed files with 15 additions and 14 deletions
+2 -4
View File
@@ -4,11 +4,11 @@ cmd=$1
chart=$2
env=$3
dir=_manifests
dir=_helmify
build() {
if [ ! -d "manifests" ]; then
echo "nothing to do here..."
echo "nothing to do here..." 1>&2
exit 0
fi
@@ -24,8 +24,6 @@ name: $chart
version: 0.1.0
EOF
echo $env 1>&2
echo $chart 1>&2
cp -r manifests/* $dir/templates
}
+1 -1
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
if [[ -f base/kustomization.yaml ]]; then
if [ -f base/kustomization.yaml ]; then
cat >base/_manifest.yaml
kubectl kustomize base
else
+12 -9
View File
@@ -7,9 +7,10 @@ environments:
values:
- ../../apps/values.yaml
- ../../values/sys/values-{{ requiredEnv "CLUSTER" }}.yaml
helmDefaults:
postRenderer: ../../bin/kustomizer
prod:
values:
- ../../apps/values.yaml
- ../../values/sys/values-{{ requiredEnv "CLUSTER" }}.yaml
releases:
- name: argocd
@@ -17,16 +18,18 @@ releases:
chart: argo/argo-cd
values:
- values.yaml.gotmpl
- name: argocd-extras
postRenderer: ../../bin/kustomizer
- name: argocd-manifests
namespace: argocd
chart: _manifests
values:
- values.yaml.gotmpl
chart: _helmify
hooks:
- events: [ "prepare", "cleanup" ]
- events:
- prepare
- cleanup
showlogs: true
command: "../../bin/helmify"
command: ../../bin/helmify
args:
- "{{`{{if eq .Event.Name \"prepare\"}}build{{else}}clean{{end}}`}}"
- "{{`{{.Release.Chart}}`}}"
- "{{`{{.Environment.Name}}`}}"