K8s: use --runtime-config={group}/{version}=true to enabled APIs (#81614)

This commit is contained in:
Ryan McKinley
2024-02-01 22:06:28 -08:00
committed by GitHub
parent 7464ea4346
commit 810d14d88f
4 changed files with 91 additions and 9 deletions
+7 -1
View File
@@ -210,7 +210,13 @@ func (b *DataSourceAPIBuilder) getPluginContext(ctx context.Context, uid string)
}
func (b *DataSourceAPIBuilder) GetOpenAPIDefinitions() openapi.GetOpenAPIDefinitions {
return v0alpha1.GetOpenAPIDefinitions
return func(ref openapi.ReferenceCallback) map[string]openapi.OpenAPIDefinition {
defs := query.GetOpenAPIDefinitions(ref) // required when running standalone
for k, v := range v0alpha1.GetOpenAPIDefinitions(ref) {
defs[k] = v
}
return defs
}
}
// Register additional routes with the server