From a8f4b51b7f9070cd87c8da76510b49139e3830c4 Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Tue, 29 Oct 2024 10:34:41 -0400 Subject: [PATCH] chore(scripts): format kubeconform script Signed-off-by: Devin Buhl --- scripts/kubeconform.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/scripts/kubeconform.sh b/scripts/kubeconform.sh index a69308b1..20ba1ad4 100755 --- a/scripts/kubeconform.sh +++ b/scripts/kubeconform.sh @@ -22,31 +22,29 @@ kubeconform_args=( 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; - do +do kubeconform "${kubeconform_args[@]}" "${file}" if [[ ${PIPESTATUS[0]} != 0 ]]; then - exit 1 + exit 1 fi done echo "=== Validating kustomizations in ${KUBERNETES_DIR}/flux ===" 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} ===" - kustomize build "${file/%$kustomize_config}" "${kustomize_args[@]}" | \ - kubeconform "${kubeconform_args[@]}" + kustomize build "${file/%$kustomize_config}" "${kustomize_args[@]}" | kubeconform "${kubeconform_args[@]}" if [[ ${PIPESTATUS[0]} != 0 ]]; then - exit 1 + exit 1 fi done echo "=== Validating kustomizations in ${KUBERNETES_DIR}/apps ===" 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} ===" - kustomize build "${file/%$kustomize_config}" "${kustomize_args[@]}" | \ - kubeconform "${kubeconform_args[@]}" + kustomize build "${file/%$kustomize_config}" "${kustomize_args[@]}" | kubeconform "${kubeconform_args[@]}" if [[ ${PIPESTATUS[0]} != 0 ]]; then - exit 1 + exit 1 fi done