From e6a723cbff24c4ccee71607d230a905e0c3472ad Mon Sep 17 00:00:00 2001 From: Dennis Felsing Date: Thu, 18 Jun 2026 12:33:49 +0000 Subject: [PATCH] mz-debug: read the always-installed v1alpha1 Materialize CRD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #35418 ("Introduce v1 of the Materialize CRD") switched both `mz-debug` imports of the Materialize CR from `v1alpha1::Materialize` to `v1::Materialize`. `kube::Api::` derives its request path from the type's group/version, so these calls began hitting `/apis/materialize.cloud/v1/...`. The `v1` CRD version is only registered when the operator runs with `--install-v1-crd` (helm `operator.args.installV1CRD`, default `false`), and `v1alpha1` remains the storage version that orchestratord still reconciles. On every cluster that has not opted into the new CRD — all of them at release time, since the feature is brand-new and opt-in — there is no `materialize.cloud/v1` endpoint and the API server returns `NotFound`. This silently degrades `mz-debug`: * Auth-mode auto-detection (`get_k8s_auth_mode`) 404s and falls back to `AuthMode::None`, so SQL collection connects with the wrong auth mode on clusters using Password/Sasl/Oidc. * The Materialize CR — usually the single most important object in a support bundle — is dropped from the debug bundle, with only a log warning to indicate why. Revert both imports to `v1alpha1::Materialize`. `v1alpha1` is the stored data, is always registered regardless of `--install-v1-crd`, and carries every field `mz-debug` consumes (`spec.authenticator_kind`). Co-Authored-By: Claude Opus 4.8 (1M context) --- src/mz-debug/src/k8s_dumper.rs | 2 +- src/mz-debug/src/utils.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mz-debug/src/k8s_dumper.rs b/src/mz-debug/src/k8s_dumper.rs index 5ce9fb39c7298..f00a3e9345c3d 100644 --- a/src/mz-debug/src/k8s_dumper.rs +++ b/src/mz-debug/src/k8s_dumper.rs @@ -38,7 +38,7 @@ use k8s_openapi::apiextensions_apiserver::pkg::apis::apiextensions::v1::CustomRe use kube::api::{ListParams, LogParams}; use kube::{Api, Client}; use mz_cloud_resources::crd::generated::cert_manager::certificates::Certificate; -use mz_cloud_resources::crd::materialize::v1::Materialize; +use mz_cloud_resources::crd::materialize::v1alpha1::Materialize; use serde::{Serialize, de::DeserializeOwned}; use tracing::{info, warn}; diff --git a/src/mz-debug/src/utils.rs b/src/mz-debug/src/utils.rs index 8f5c3db7fc0f2..f1667328082c6 100644 --- a/src/mz-debug/src/utils.rs +++ b/src/mz-debug/src/utils.rs @@ -21,7 +21,7 @@ use std::str::FromStr; use chrono::{DateTime, Utc}; use kube::{Api, Client}; -use mz_cloud_resources::crd::materialize::v1::Materialize; +use mz_cloud_resources::crd::materialize::v1alpha1::Materialize; use mz_server_core::listeners::AuthenticatorKind; use zip::ZipWriter; use zip::write::SimpleFileOptions;