From cef499de732269d251ab61968c164b46d6ed78cd Mon Sep 17 00:00:00 2001 From: mr-forust Date: Tue, 6 Oct 2026 19:19:47 +0200 Subject: [PATCH] fix(deploy): skip VMAgent in secrets check before CRD install check_referenced_secrets ran kubectl create on vmagent.yaml even when the VMAgent CRD is not installed yet, failing validate with 'no matches for kind VMAgent'. Apply the same skip_uninstalled_vmagent_crd guard used by both dry-run loops. --- .gitea/workflows/deploy-lib.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitea/workflows/deploy-lib.sh b/.gitea/workflows/deploy-lib.sh index 0f6ee53..b25c4cd 100644 --- a/.gitea/workflows/deploy-lib.sh +++ b/.gitea/workflows/deploy-lib.sh @@ -705,6 +705,9 @@ check_referenced_secrets() { local missing=() refs="" for m in ${K8S_MANIFESTS[@]+"${K8S_MANIFESTS[@]}"}; do + if skip_uninstalled_vmagent_crd "$m"; then + continue + fi objects="$(kubectl create --dry-run=client --validate=false -f "$m" -o json)" || return 1 extracted="$(printf '%s' "$objects" | jq -r -f "$REPO/.gitea/workflows/secret-references.jq")" || return 1 refs+="$extracted"$'\n'