From 1b504b6fbd47e0add7a5177d982294be6e8401bc Mon Sep 17 00:00:00 2001 From: Joshua Casey Date: Thu, 24 Aug 2023 09:22:42 -0500 Subject: [PATCH] Expose OpenAPIv3 explanations --- 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 fa2e07d3..3c304ef7 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 15a2b404..670ace76 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`