From ca19553fe8d917c36c2baad3af1969105a842651 Mon Sep 17 00:00:00 2001 From: Joshua Casey Date: Thu, 17 Aug 2023 15:57:06 -0500 Subject: [PATCH] DO NOT MERGE: SUPER HACK TO ADD OpenAPIV3Config TO AGGREGATE API --- internal/concierge/server/server.go | 2 ++ internal/supervisor/server/server.go | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/concierge/server/server.go b/internal/concierge/server/server.go index fa2e07d3cd..3c304ef705 100644 --- a/internal/concierge/server/server.go +++ b/internal/concierge/server/server.go @@ -228,6 +228,8 @@ func getAggregatedAPIServerConfig( // `kubectl explain` to work for the Concierge's aggregated API resources. serverConfig.OpenAPIConfig = genericapiserver.DefaultOpenAPIConfig( conciergeopenapi.GetOpenAPIDefinitions, openapinamer.NewDefinitionNamer(scheme)) + serverConfig.OpenAPIV3Config = genericapiserver.DefaultOpenAPIV3Config( + conciergeopenapi.GetOpenAPIDefinitions, openapinamer.NewDefinitionNamer(scheme)) // Note that among other things, this ApplyTo() function copies // `recommendedOptions.SecureServing.ServerCert.GeneratedCert` into // `serverConfig.SecureServing.Cert` thus making `dynamicCertProvider` diff --git a/internal/supervisor/server/server.go b/internal/supervisor/server/server.go index 15a2b40488..670ace7664 100644 --- a/internal/supervisor/server/server.go +++ b/internal/supervisor/server/server.go @@ -1,4 +1,4 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 // Package server defines the entrypoint for the Pinniped Supervisor server. @@ -613,6 +613,8 @@ func getAggregatedAPIServerConfig( // `kubectl explain` to work for the Supervisor's aggregated API resources. serverConfig.OpenAPIConfig = genericapiserver.DefaultOpenAPIConfig( supervisoropenapi.GetOpenAPIDefinitions, openapinamer.NewDefinitionNamer(scheme)) + serverConfig.OpenAPIV3Config = genericapiserver.DefaultOpenAPIV3Config( + supervisoropenapi.GetOpenAPIDefinitions, openapinamer.NewDefinitionNamer(scheme)) // Note that among other things, this ApplyTo() function copies // `recommendedOptions.SecureServing.ServerCert.GeneratedCert` into // `serverConfig.SecureServing.Cert` thus making `dynamicCertProvider`