chore(scripts): format kubeconform script
Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
1 file changed
+5
-7
@@ -22,7 +22,7 @@ kubeconform_args=(
|
|||||||
|
|
||||||
echo "=== Validating standalone manifests in ${KUBERNETES_DIR}/flux ==="
|
echo "=== Validating standalone manifests in ${KUBERNETES_DIR}/flux ==="
|
||||||
find "${KUBERNETES_DIR}/flux" -maxdepth 1 -type f -name '*.yaml' -print0 | while IFS= read -r -d $'\0' file;
|
find "${KUBERNETES_DIR}/flux" -maxdepth 1 -type f -name '*.yaml' -print0 | while IFS= read -r -d $'\0' file;
|
||||||
do
|
do
|
||||||
kubeconform "${kubeconform_args[@]}" "${file}"
|
kubeconform "${kubeconform_args[@]}" "${file}"
|
||||||
if [[ ${PIPESTATUS[0]} != 0 ]]; then
|
if [[ ${PIPESTATUS[0]} != 0 ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
@@ -31,10 +31,9 @@ done
|
|||||||
|
|
||||||
echo "=== Validating kustomizations in ${KUBERNETES_DIR}/flux ==="
|
echo "=== Validating kustomizations in ${KUBERNETES_DIR}/flux ==="
|
||||||
find "${KUBERNETES_DIR}/flux" -type f -name $kustomize_config -print0 | while IFS= read -r -d $'\0' file;
|
find "${KUBERNETES_DIR}/flux" -type f -name $kustomize_config -print0 | while IFS= read -r -d $'\0' file;
|
||||||
do
|
do
|
||||||
echo "=== Validating kustomizations in ${file/%$kustomize_config} ==="
|
echo "=== Validating kustomizations in ${file/%$kustomize_config} ==="
|
||||||
kustomize build "${file/%$kustomize_config}" "${kustomize_args[@]}" | \
|
kustomize build "${file/%$kustomize_config}" "${kustomize_args[@]}" | kubeconform "${kubeconform_args[@]}"
|
||||||
kubeconform "${kubeconform_args[@]}"
|
|
||||||
if [[ ${PIPESTATUS[0]} != 0 ]]; then
|
if [[ ${PIPESTATUS[0]} != 0 ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -42,10 +41,9 @@ done
|
|||||||
|
|
||||||
echo "=== Validating kustomizations in ${KUBERNETES_DIR}/apps ==="
|
echo "=== Validating kustomizations in ${KUBERNETES_DIR}/apps ==="
|
||||||
find "${KUBERNETES_DIR}/apps" -type f -name $kustomize_config -print0 | while IFS= read -r -d $'\0' file;
|
find "${KUBERNETES_DIR}/apps" -type f -name $kustomize_config -print0 | while IFS= read -r -d $'\0' file;
|
||||||
do
|
do
|
||||||
echo "=== Validating kustomizations in ${file/%$kustomize_config} ==="
|
echo "=== Validating kustomizations in ${file/%$kustomize_config} ==="
|
||||||
kustomize build "${file/%$kustomize_config}" "${kustomize_args[@]}" | \
|
kustomize build "${file/%$kustomize_config}" "${kustomize_args[@]}" | kubeconform "${kubeconform_args[@]}"
|
||||||
kubeconform "${kubeconform_args[@]}"
|
|
||||||
if [[ ${PIPESTATUS[0]} != 0 ]]; then
|
if [[ ${PIPESTATUS[0]} != 0 ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in new issue
Block a user