diff --git a/lib/linter.sh b/lib/linter.sh index 43a06a91..0f7ed1fb 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -559,6 +559,11 @@ DetectKubernetesFile() { FILE="${1}" # File that we need to validate debug "Checking if ${FILE} is a Kubernetes descriptor..." + if grep -q -E 'apiVersion:\s*kustomize.config.k8s.io' "${FILE}" >/dev/null; then + debug "${FILE} is NOT a Kubernetes descriptor (Kustomize only)" + return 1 + fi + if grep -q -E '(apiVersion):' "${FILE}" >/dev/null; then debug "${FILE} is a Kubernetes descriptor" return 0