stackspout/apps/generate-kustomizations.sh

10 lines
334 B
Bash
Raw Normal View History

2022-07-12 17:38:21 +00:00
#!/bin/sh -e
# Generates kubernetes kustomizations
find -mindepth 1 -maxdepth 1 -type d | while read dir;
do echo "$dir"
{ echo 'apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:'
2022-07-12 21:11:36 +00:00
find $dir -type f -not -name "*.bak" -not -name "kustomization.yaml" -printf " - %f\n"; } | tee $dir/kustomization.yaml
2022-07-12 17:38:21 +00:00
done