package openapi
import "k8s.io/kubernetes/pkg/kubectl/cmd/util/openapi"
Package openapi is a collection of libraries for fetching the openapi spec from a Kubernetes server and then indexing the type definitions. The openapi spec contains the object model definitions and extensions metadata such as the patchStrategy and patchMergeKey for creating patches.
Index ¶
- Constants
- func GetPrintColumns(extensions spec.Extensions) (string, bool)
- type Getter
- type Resources
Constants ¶
const PrintColumnsKey = "x-kubernetes-print-columns"
Functions ¶
func GetPrintColumns ¶
func GetPrintColumns(extensions spec.Extensions) (string, bool)
GetPrintColumns looks for the open API extension for the display columns.
Types ¶
type Getter ¶
Getter is an interface for fetching openapi specs and parsing them into an Resources struct
func NewOpenAPIGetter ¶
func NewOpenAPIGetter(openAPIClient discovery.OpenAPISchemaInterface) Getter
NewOpenAPIGetter returns an object to return OpenAPIDatas which reads from a server, and then stores in memory for subsequent invocations
type Resources ¶
type Resources interface { LookupResource(gvk schema.GroupVersionKind) proto.Schema }
Resources interface describe a resources provider, that can give you resource based on group-version-kind.
func NewOpenAPIData ¶
func NewOpenAPIData(doc *openapi_v2.Document) (Resources, error)
Source Files ¶
doc.go extensions.go openapi.go openapi_getter.go
Directories ¶
Path | Synopsis |
---|---|
pkg/kubectl/cmd/util/openapi/testing | |
pkg/kubectl/cmd/util/openapi/validation |
- Version
- v1.12.6-beta.0
- Published
- Jan 16, 2019
- Platform
- js/wasm
- Imports
- 6 packages
- Last checked
- 5 minutes ago –
Tools for package owners.