Skip to content
Snippets Groups Projects
Commit 0710ff65 authored by xeruf's avatar xeruf
Browse files

apps: create kustomization for directory

parent 7b297aa5
No related branches found
No related tags found
No related merge requests found
#!/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
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment