Skip to content

Support multicluster-runtime v0.23.3 ClusterName type in Milo provider#621

Open
scotwells wants to merge 8 commits into
feat/downstream-client-packagefrom
fix/multicluster-runtime-cluster-name-type
Open

Support multicluster-runtime v0.23.3 ClusterName type in Milo provider#621
scotwells wants to merge 8 commits into
feat/downstream-client-packagefrom
fix/multicluster-runtime-cluster-name-type

Conversation

@scotwells
Copy link
Copy Markdown
Contributor

Summary

  • multicluster-runtime v0.23.3 changed ClusterName from a plain string to a distinct named type (type ClusterName string), which is a breaking API change for provider implementations.
  • Without this fix, any downstream service that upgrades to v0.23.3 gets compile errors and must fork the Milo provider locally to work around the type mismatch.
  • This PR updates Provider.Get, the Manager.Engage call, and the source.ForCluster wrapper to use multicluster.ClusterName where the upstream library now requires it.

Test plan

  • go build ./pkg/multicluster-runtime/... passes cleanly against multicluster-runtime v0.23.3
  • go test ./pkg/multicluster-runtime/... passes (existing provider tests cover the changed code paths)
  • No changes outside pkg/multicluster-runtime/

🤖 Generated with Claude Code

@scotwells scotwells changed the base branch from main to feat/downstream-client-package May 22, 2026 23:02
@scotwells scotwells force-pushed the fix/multicluster-runtime-cluster-name-type branch from cdb1540 to 640a027 Compare May 22, 2026 23:24
…v0.23.3

multicluster-runtime v0.23.3 introduced a distinct ClusterName type
(previously a plain string). Update Provider.Get, the Engage call, and
the ForCluster call in the source wrapper to use the new type, so
consumers can upgrade to v0.23.3 without forking the provider locally.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@scotwells scotwells force-pushed the fix/multicluster-runtime-cluster-name-type branch from 640a027 to b8f9308 Compare May 22, 2026 23:44
scotwells and others added 7 commits May 22, 2026 18:47
go.mod now requires go 1.25.0 after the multicluster-runtime upgrade
cascaded to k8s v0.35.x dependencies.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Update webhook validators/defaulters to use generic Validator[T]/Defaulter[T] interfaces
  with concrete pointer types instead of runtime.Object
- Fix featuregate/version symbol moves: DefaultComponentGlobalsRegistry and
  DefaultKubeComponent now in compatibility packages; DefaultBuildEffectiveVersion
  in apiserver/pkg/util/compatibility
- Fix WithImpersonation moved to filters/impersonation subpackage
- Fix Options.Complete() signature (removed NamedFlagSets param)
- Fix KubeControllerManagerOptions.Config() now requires context.Context as first arg
- Update service account JWT imports from square/go-jose to go-jose/go-jose

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add GetEventRecorder method to testCluster mocks in quota controller tests
  (cluster.Cluster interface now embeds recorder.Provider which requires it)
- Update Engage/GetCluster/GetManager signatures to use multicluster.ClusterName
  instead of string
- Fix non-constant format strings in project_webhook.go by using const strings
  and errors.New instead of fmt.Errorf

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The original apiserver code used featuregate.NewComponentGlobalsRegistry()
to create a fresh per-instance registry, not the global default registry.
Using the global registry caused the API server pod to fail at startup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
k8s 1.35.0 changed OpenAPI model name keys from the Go import path format
("k8s.io/apimachinery/pkg/apis/meta/v1.Time") to the io.k8s reverse-domain
format ("io.k8s.apimachinery.pkg.apis.meta.v1.Time") via OpenAPIModelName()
methods.

Update the identity API's generated OpenAPI definitions to reference metav1
types using the new key format so the API server can start successfully.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ticluster-runtime v0.23.3

multicluster-runtime v0.23.3 changed the ProviderRunnable interface from
Run(context.Context, Manager) to Start(context.Context, Aware). The manager
auto-starts any provider implementing ProviderRunnable, passing an Aware
(not a full Manager) for cluster engagement.

The old Run method was never called by v0.23.3's manager, leaving p.mcMgr
nil and causing every project reconcile to requeue with "Multicluster manager
not yet started". No clusters were ever engaged, so ResourceGrants were never
created in project control planes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…controllers

ResourceRegistration, GrantCreationPolicy, ClaimCreationPolicy, and
GrantCreation are local-cluster-only resources not exposed at project
control plane paths. Setting WithEngageWithProviderClusters(true) caused
Engage to fail with "no matches for kind ResourceRegistration" when the
Milo provider attempted to watch these resources in project clusters.

This aligns the code with the design intent documented in setup.go:
- Core cluster only: ResourceRegistration, ClaimCreationPolicy, GrantCreationPolicy, GrantCreation
- All clusters: ResourceGrant, ResourceClaim, AllowanceBucket, Ownership, Cleanup

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant