Skip to content

mz-debug: read the always-installed v1alpha1 Materialize CRD#37133

Merged
def- merged 1 commit into
MaterializeInc:mainfrom
def-:mz-debug-v1alpha1-crd
Jun 18, 2026
Merged

mz-debug: read the always-installed v1alpha1 Materialize CRD#37133
def- merged 1 commit into
MaterializeInc:mainfrom
def-:mz-debug-v1alpha1-crd

Conversation

@def-

@def- def- commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #35418

I assume we want to keep mz-debug working on existing v1alpha CRDs or do we plan to upgrade them all to v1? Otherwise mz-debug loses:

  • 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 is dropped from the debug bundle, with only a log warning to indicate why.

PR MaterializeInc#35418 ("Introduce v1 of the Materialize CRD") switched both
`mz-debug` imports of the Materialize CR from `v1alpha1::Materialize`
to `v1::Materialize`. `kube::Api::<T>` 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) <noreply@anthropic.com>
@def- def- merged commit 3b41d46 into MaterializeInc:main Jun 18, 2026
21 checks passed
@def- def- deleted the mz-debug-v1alpha1-crd branch June 18, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants