Support multicluster-runtime v0.23.3 ClusterName type in Milo provider#621
Open
scotwells wants to merge 8 commits into
Open
Support multicluster-runtime v0.23.3 ClusterName type in Milo provider#621scotwells wants to merge 8 commits into
scotwells wants to merge 8 commits into
Conversation
cdb1540 to
640a027
Compare
…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>
640a027 to
b8f9308
Compare
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
multicluster-runtimev0.23.3 changedClusterNamefrom a plainstringto a distinct named type (type ClusterName string), which is a breaking API change for provider implementations.Provider.Get, theManager.Engagecall, and thesource.ForClusterwrapper to usemulticluster.ClusterNamewhere the upstream library now requires it.Test plan
go build ./pkg/multicluster-runtime/...passes cleanly against multicluster-runtime v0.23.3go test ./pkg/multicluster-runtime/...passes (existing provider tests cover the changed code paths)pkg/multicluster-runtime/🤖 Generated with Claude Code