K8s: Make GetAPIRoutes an optional interface (#97531)

This commit is contained in:
Ryan McKinley
2024-12-07 03:08:18 +03:00
committed by GitHub
parent f276f9b35d
commit 5f39d2eeb0
15 changed files with 30 additions and 77 deletions
+5 -3
View File
@@ -39,9 +39,6 @@ type APIGroupBuilder interface {
// Get OpenAPI definitions
GetOpenAPIDefinitions() common.GetOpenAPIDefinitions
// Get the API routes for each version
GetAPIRoutes() *APIRoutes
// Optionally add an authorization hook
// Standard namespace checking will happen before this is called, specifically
// the namespace must matches an org|stack that the user belongs to
@@ -60,6 +57,11 @@ type APIGroupValidation interface {
Validate(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) (err error)
}
type APIGroupRouteProvider interface {
// Support direct HTTP routes from an APIGroup
GetAPIRoutes() *APIRoutes
}
type APIGroupOptions struct {
Scheme *runtime.Scheme
OptsGetter generic.RESTOptionsGetter