From 96964b0a2b4f6d7c2ab9c80031d9178b8d3d5fd5 Mon Sep 17 00:00:00 2001 From: chrisfu Date: Sun, 3 May 2026 15:23:40 -0700 Subject: [PATCH] fix(check_kerberos): default PROLE_KDC_NAME to authority-knoe-auth (matches init_kdc.sh) check_kerberos.sh defaulted PROLE_KDC_NAME=auth but init_kdc.sh deploys the pod with label app=authority-knoe-auth (authority-gcp-auth for k8s). The pod selector never matched, so wait_for_kdc_pod always returned empty and the test failed with "KDC pod 'auth' not found" even after a successful rollout. Add _default_kdc_name() using the same mode-aware logic as init_kdc.sh. Co-Authored-By: Claude Sonnet 4.6 --- scripts/validation/check_kerberos.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/validation/check_kerberos.sh b/scripts/validation/check_kerberos.sh index 56e4cea..ba2b3b1 100755 --- a/scripts/validation/check_kerberos.sh +++ b/scripts/validation/check_kerberos.sh @@ -59,7 +59,15 @@ KRB5_REALM=${KRB5_REALM:-${REALM:-}} KRB5_KDC=${KRB5_KDC:-} KRB5_USER=${KRB5_USER:-${KRB5_USERNAME:-}} KRB5_PASSWORD=${KRB5_PASSWORD:-} -PROLE_KDC_NAME=${PROLE_KDC_NAME:-auth} +_default_kdc_name() { + local _mode + _mode=$(knoe_normalize_mode "${KNOE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}" 2>/dev/null || printf '%s' "${KNOE_MODE:-}") + case "$_mode" in + k8s) printf 'authority-gcp-auth' ;; + *) printf 'authority-knoe-auth' ;; + esac +} +PROLE_KDC_NAME=${PROLE_KDC_NAME:-$(_default_kdc_name)} PROLE_KDC_SERVICE=${PROLE_KDC_SERVICE:-auth} SAMBA_ADMIN_USER=${SAMBA_ADMIN_USER:-} SAMBA_ADMIN_PASSWORD=${SAMBA_ADMIN_PASSWORD:-}