Closed
Conversation
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.
This pull request introduces several important improvements to multicluster authentication, authorization, and CRD runtime handling. The changes focus on making the system more robust against nil pointer errors and panics, improving error handling and test coverage, and enhancing the reliability of CRD runtime lookups. Below are the most significant changes grouped by theme:
Authentication and Authorization Robustness:
pkg/multicluster/auth/dispatcher.goto safely handle typed nils and recover from panics inAuthenticatorandAuthorizerimplementations, ensuring the system denies requests gracefully instead of crashing. This includes new helpers likeisNil,authenticateSafely, andauthorizeSafely.ClusterAuthenticatorandClusterAuthorizerlogic to use the new safe wrappers and validation, and to handle typed nils correctly throughout the dispatch process.Admission Webhook User Info Safety:
EnsureVersionedAttributesUserInfoinpkg/multicluster/admission/webhook/generic/versioned_attributes.goto guarantee that admission webhook requests always have a non-niluser.Info, preventing upstream panics.CRD Runtime Manager Improvements:
CRDRuntimeManagerto reconcile CRD serving state from a shared projection and wait briefly for updates before returning a not-served result, improving reliability during CRD install/update events.Directorfor improved request routing.API Server Handler Wrapping:
cmd/apiserver/app/config.goby introducingwrapClusterCRDHandler, ensuring consistent application of filters and error handling.