diff --git a/lib/linter.sh b/lib/linter.sh index f4958430..bcb511a7 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -562,7 +562,7 @@ DetectKubernetesFile() { FILE="${1}" # File that we need to validate debug "Checking if ${FILE} is a Kubernetes descriptor..." - if grep -q -E '(apiVersion):' "${FILE}" >/dev/null; then + if grep -v 'kustomize.config.k8s.io' "${FILE}" | grep -q -E '(apiVersion):'; then debug "${FILE} is a Kubernetes descriptor" return 0 fi