Merge pull request #827 from PascalBourdier/ignore-kustomize-file

ignore kustomize file with kubeval
This commit is contained in:
Lukas Gravley 2020-10-12 10:36:45 -05:00 committed by GitHub
commit e8091a4ee9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -562,7 +562,7 @@ DetectKubernetesFile() {
FILE="${1}" # File that we need to validate FILE="${1}" # File that we need to validate
debug "Checking if ${FILE} is a Kubernetes descriptor..." 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" debug "${FILE} is a Kubernetes descriptor"
return 0 return 0
fi fi