Skip to content

Commit

Permalink
Merge pull request #588 from huiwq1990/feat-openapiv2
Browse files Browse the repository at this point in the history
support openapi v2 for compatibility lower kubernete versions
  • Loading branch information
Iceber authored Nov 12, 2023
2 parents e89faaf + ac40b0f commit 41975c5
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 41975c5

Please sign in to comment.