apps: create kustomization for directory

This commit is contained in:
xeruf 2024-01-24 15:42:23 +01:00
parent 7b297aa568
commit 0710ff6532
2 changed files with 17 additions and 4 deletions

View File

@ -1,9 +1,14 @@
#!/bin/sh -e #!/bin/sh -e
# Generates kubernetes kustomizations # Generates kubernetes kustomizations
find -mindepth 1 -maxdepth 1 -type d | while read dir; if test $# -gt 0
do echo "$dir" then dir=$1
{ echo 'apiVersion: kustomize.config.k8s.io/v1beta1 { echo 'apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources:' resources:'
find $dir -type f -not -name "*.bak" -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
else
find -mindepth 1 -maxdepth 1 -type d | while read dir
do echo "$dir"
$0 "$dir"
done done
fi

8
apps/kustomization.yaml Normal file
View File

@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- gitea-kustomization.yaml
- forgejo-kustomization.yaml
- invoiceninja-customization.yaml
- vikunja-kustomization.yaml
- vikunja-test-kustomization.yaml