ansible-role-k8s-storage/bin/gen_list.sh
Adrien Reslinger adca04dadf First release
2020-03-16 15:34:32 +01:00

6 lines
No EOL
520 B
Bash
Executable file

#!/bin/bash
wget https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml
kubernetes-split-yaml local-path-storage.yaml > generated.log
mv generated local
cat generated.log | while read LIGNE; do if [ $(echo "${LIGNE}" | grep -c ^File) -eq 1 ]; then echo -n "${LIGNE} "; else echo "${LIGNE}"; fi; done | grep ^File | sort -V | sed 's|.*\(generated/\)\(.*\.yaml\)| - "local/\2"|'
sed 's|/opt/local-path-provisioner|/mnt/shared|' -i local/local-path-config-ConfigMap.yaml