From dea6e5072299b959384cb53f88d867ad47b70d2a Mon Sep 17 00:00:00 2001 From: EJ Etherington Date: Tue, 20 Jun 2023 12:27:03 -0700 Subject: [PATCH] Update Kuberentes File Detection (#4375) Co-authored-by: Zack Koppert --- lib/functions/detectFiles.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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