Newer
Older
# Generates kubernetes kustomizations for given directories or all subdirectories
{ echo 'apiVersion: kustomize.config.k8s.io/v1beta1
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 "[4m$dir[0m"