Skip to content

Commit fb2ea25

Browse files
feat: add tenant CRD to e2e artifact collection and debug report (#787)
## Summary Add the `tenants.maas.opendatahub.io` CRD to e2e must-gather artifact collection and the auth debug report. ## Description The Tenant CRD was recently introduced but was missing from the e2e debugging and artifact-collection utilities in `auth_utils.sh`. - Add `tenants.maas.opendatahub.io` to the `MAAS_CRDS` array so `collect_maas_crs()` dumps Tenant CR YAML to `tenants.yaml`. - Add `kubectl get tenants` to `collect_cluster_state()` alongside other MaaS CRs. - Add Tenant listing and status/condition detail to `run_auth_debug_report()` under the MaaS CRs section. - Update header comment to document the new `tenants.yaml` artifact. ## How it was tested - Verified script syntax with `bash -n`. - Confirmed the Tenant CRD name matches `deployment/base/maas-controller/crd/bases/maas.opendatahub.io_tenants.yaml`. - Confirmed namespace usage aligns with `TenantReconciler.TenantNamespace` (sourced from `--maas-subscription-namespace`). Made with [Cursor](https://cursor.com) Signed-off-by: Chaitanya Kulkarni <ckulkarn@redhat.com> Signed-off-by: Chaitanya Kulkarni <chkulkar@redhat.com>
1 parent 1b8f212 commit fb2ea25

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

test/e2e/scripts/auth_utils.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
# maasauthpolicies.yaml - MaaSAuthPolicy definitions
1717
# maassubscriptions.yaml - MaaSSubscription definitions
1818
# externalmodels.yaml - ExternalModel definitions
19+
# tenants.yaml - Tenant definitions
1920
# pod-logs/ - Per-pod logs from the deployment namespace
2021
#
2122
# Usage:
@@ -127,6 +128,7 @@ MAAS_CRDS=(
127128
"maasauthpolicies.maas.opendatahub.io"
128129
"maassubscriptions.maas.opendatahub.io"
129130
"externalmodels.maas.opendatahub.io"
131+
"tenants.maas.opendatahub.io"
130132
)
131133

132134
collect_maas_crs() {
@@ -208,6 +210,7 @@ collect_cluster_state() {
208210
echo "--- MaaS CRs ---"
209211
kubectl get maasmodelrefs -n "$DEPLOYMENT_NAMESPACE" 2>/dev/null || true
210212
kubectl get maasauthpolicies,maassubscriptions -n "$MAAS_SUBSCRIPTION_NAMESPACE" 2>/dev/null || true
213+
kubectl get tenants -n "$MAAS_SUBSCRIPTION_NAMESPACE" 2>/dev/null || true
211214
echo ""
212215
echo "--- HTTPRoutes ---"
213216
kubectl get httproutes -A 2>/dev/null | head -30 || true
@@ -324,6 +327,8 @@ run_auth_debug_report() {
324327
_run "MaaSSubscriptions" "kubectl get maassubscriptions -n $MAAS_SUBSCRIPTION_NAMESPACE -o wide 2>/dev/null || true"
325328
_run "MaaSSubscription status details" "kubectl get maassubscriptions -n $MAAS_SUBSCRIPTION_NAMESPACE -o jsonpath='{range .items[*]}{.metadata.name}: {.status.phase} - {.status.conditions[?(@.type==\"Ready\")].message}{\"\\n\"}{end}' 2>/dev/null || true"
326329
_run "MaaSModelRefs (all namespaces)" "kubectl get maasmodelrefs -A -o wide 2>/dev/null || true"
330+
_run "Tenants" "kubectl get tenants -n $MAAS_SUBSCRIPTION_NAMESPACE -o wide 2>/dev/null || true"
331+
_run "Tenant status details" "kubectl get tenants -n $MAAS_SUBSCRIPTION_NAMESPACE -o jsonpath='{range .items[*]}{.metadata.name}: {.status.conditions[?(@.type==\"Ready\")].status} - {.status.conditions[?(@.type==\"Ready\")].message}{\"\\n\"}{end}' 2>/dev/null || true"
327332
_append ""
328333

329334
_section "Test User Information"

0 commit comments

Comments
 (0)