Skip to content

Commit

Permalink
support openapi v2 for compatibility lower kubernete versions
Browse files Browse the repository at this point in the history
Signed-off-by: huiwq1990 <[email protected]>
  • Loading branch information
huiwq1990 committed Nov 9, 2023
1 parent e89faaf commit ac40b0f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/apiserver/app/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ func (o *ClusterPediaServerOptions) Config() (*apiserver.Config, error) {

genericConfig := genericapiserver.NewRecommendedConfig(apiserver.Codecs)

genericConfig.OpenAPIConfig = genericapiserver.DefaultOpenAPIConfig(generatedopenapi.GetOpenAPIDefinitions, openapinamer.NewDefinitionNamer(apiserver.Scheme))
genericConfig.OpenAPIConfig.Info.Title = "clusterpedia apiserver"
genericConfig.OpenAPIConfig.Info.Version = ""

genericConfig.OpenAPIV3Config = genericapiserver.DefaultOpenAPIV3Config(generatedopenapi.GetOpenAPIDefinitions, openapinamer.NewDefinitionNamer(apiserver.Scheme))
genericConfig.OpenAPIV3Config.Info.Title = "clusterpedia apiserver"
genericConfig.OpenAPIV3Config.Info.Version = ""
Expand Down

0 comments on commit ac40b0f

Please sign in to comment.