diff --git a/lib/functions/detectFiles.sh b/lib/functions/detectFiles.sh index daaf5070..c52581d4 100755 --- a/lib/functions/detectFiles.sh +++ b/lib/functions/detectFiles.sh @@ -162,8 +162,8 @@ DetectKubernetesFile() { debug "Checking if ${FILE} is a Kubernetes descriptor..." if grep -q -v 'kustomize.config.k8s.io' "${FILE}" && grep -q -v "tekton" "${FILE}" && - grep -q -E '(apiVersion):' "${FILE}" && - grep -q -E '(kind):' "${FILE}"; then + grep -q -E '(^apiVersion):' "${FILE}" && + grep -q -E '(^kind):' "${FILE}"; then debug "${FILE} is a Kubernetes descriptor" return 0 fi