Update Kuberentes File Detection (#4375)

Co-authored-by: Zack Koppert <zkoppert@github.com>
This commit is contained in:
EJ Etherington 2023-06-20 12:27:03 -07:00 committed by GitHub
parent a5b893a892
commit dea6e50722
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -162,8 +162,8 @@ DetectKubernetesFile() {
debug "Checking if ${FILE} is a Kubernetes descriptor..." debug "Checking if ${FILE} is a Kubernetes descriptor..."
if grep -q -v 'kustomize.config.k8s.io' "${FILE}" && if grep -q -v 'kustomize.config.k8s.io' "${FILE}" &&
grep -q -v "tekton" "${FILE}" && grep -q -v "tekton" "${FILE}" &&
grep -q -E '(apiVersion):' "${FILE}" && grep -q -E '(^apiVersion):' "${FILE}" &&
grep -q -E '(kind):' "${FILE}"; then grep -q -E '(^kind):' "${FILE}"; then
debug "${FILE} is a Kubernetes descriptor" debug "${FILE} is a Kubernetes descriptor"
return 0 return 0
fi fi