Make GetOpenAPIFile publicly settable

This commit is contained in:
Phillip Wittrock
2020-02-20 21:43:55 -08:00
parent ca9aa62c26
commit e004c31700
9 changed files with 36 additions and 13 deletions

12
cmd/config/ext/ext.go Normal file
View File

@@ -0,0 +1,12 @@
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package ext
import "path/filepath"
// GetOpenAPIFile returns the path to the file containing supplementary OpenAPI definitions.
// Maybe be overridden to configure which file to read OpenAPI definitions from.
var GetOpenAPIFile = func(args []string) (string, error) {
return filepath.Join(args[0], "kustomization"), nil
}