diff --git a/apps/generate-kustomizations.sh b/apps/generate-kustomizations.sh index 0d138e2..857f418 100755 --- a/apps/generate-kustomizations.sh +++ b/apps/generate-kustomizations.sh @@ -1,9 +1,14 @@ #!/bin/sh -e # Generates kubernetes kustomizations -find -mindepth 1 -maxdepth 1 -type d | while read dir; -do echo "$dir" +if test $# -gt 0 +then dir=$1 { echo 'apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources:' - find $dir -type f -not -name "*.bak" -not -name "kustomization.yaml" -printf " - %f\n"; } | tee $dir/kustomization.yaml -done + 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 +fi diff --git a/apps/kustomization.yaml b/apps/kustomization.yaml new file mode 100644 index 0000000..ebeee95 --- /dev/null +++ b/apps/kustomization.yaml @@ -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