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 chart=$2
env=$3 env=$3
dir=_manifests dir=_helmify
build() { build() {
if [ ! -d "manifests" ]; then if [ ! -d "manifests" ]; then
echo "nothing to do here..." echo "nothing to do here..." 1>&2
exit 0 exit 0
fi fi
@@ -24,8 +24,6 @@ name: $chart
version: 0.1.0 version: 0.1.0
EOF EOF
echo $env 1>&2
echo $chart 1>&2
cp -r manifests/* $dir/templates cp -r manifests/* $dir/templates
} }
+1 -1
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
if [[ -f base/kustomization.yaml ]]; then if [ -f base/kustomization.yaml ]; then
cat >base/_manifest.yaml cat >base/_manifest.yaml
kubectl kustomize base kubectl kustomize base
else else
+12 -9
View File
@@ -7,9 +7,10 @@ environments:
values: values:
- ../../apps/values.yaml - ../../apps/values.yaml
- ../../values/sys/values-{{ requiredEnv "CLUSTER" }}.yaml - ../../values/sys/values-{{ requiredEnv "CLUSTER" }}.yaml
prod:
helmDefaults: values:
postRenderer: ../../bin/kustomizer - ../../apps/values.yaml
- ../../values/sys/values-{{ requiredEnv "CLUSTER" }}.yaml
releases: releases:
- name: argocd - name: argocd
@@ -17,16 +18,18 @@ releases:
chart: argo/argo-cd chart: argo/argo-cd
values: values:
- values.yaml.gotmpl - values.yaml.gotmpl
- name: argocd-extras postRenderer: ../../bin/kustomizer
- name: argocd-manifests
namespace: argocd namespace: argocd
chart: _manifests chart: _helmify
values:
- values.yaml.gotmpl
hooks: hooks:
- events: [ "prepare", "cleanup" ] - events:
- prepare
- cleanup
showlogs: true showlogs: true
command: "../../bin/helmify" command: ../../bin/helmify
args: args:
- "{{`{{if eq .Event.Name \"prepare\"}}build{{else}}clean{{end}}`}}" - "{{`{{if eq .Event.Name \"prepare\"}}build{{else}}clean{{end}}`}}"
- "{{`{{.Release.Chart}}`}}" - "{{`{{.Release.Chart}}`}}"
- "{{`{{.Environment.Name}}`}}" - "{{`{{.Environment.Name}}`}}"