apps: fix substitution issue by generating k8s kustomizations
This commit is contained in:
parent
04c20ae36b
commit
de4a15fa88
|
@ -1,5 +1,5 @@
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
- vikunja-kustomization.yaml
|
|
||||||
- vikunja-secrets-kustomization.yaml
|
- vikunja-secrets-kustomization.yaml
|
||||||
|
- vikunja-kustomization.yaml
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- forgejo-kustomization.yaml
|
||||||
|
- forgejo-secrets-kustomization.yaml
|
|
@ -1,14 +1,15 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
# Generates kubernetes kustomizations
|
# Generates kubernetes kustomizations for given directories or all subdirectories
|
||||||
if test $# -gt 0
|
if test $# -gt 0
|
||||||
then dir=$1
|
then for dir; do
|
||||||
{ echo 'apiVersion: kustomize.config.k8s.io/v1beta1
|
{ echo 'apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
resources:'
|
resources:'
|
||||||
find $dir -maxdepth 1 -type f -name "*.yaml" -not -name "kustomization.yaml" -printf " - %f\n"; } | tee $dir/kustomization.yaml
|
find $dir -maxdepth 1 -type f -name "*.yaml" -not -name "kustomization.yaml" -printf " - %f\n"; } | tee $dir/kustomization.yaml
|
||||||
|
done
|
||||||
else
|
else
|
||||||
find -mindepth 1 -maxdepth 1 -type d | while read dir
|
find -mindepth 1 -maxdepth 1 -type d | while read dir
|
||||||
do echo "$dir"
|
do echo "[4m$dir[0m"
|
||||||
$0 "$dir"
|
$0 "$dir"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- invoiceninja-kustomization.yaml
|
||||||
|
- invoiceninja-secrets-kustomization.yaml
|
Loading…
Reference in New Issue