kubernetes: k8s.io/kubernetes/pkg/kubectl/cmd/util/openapi Index | Files | Directories

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.


Package Files

doc.go dryrun.go extensions.go openapi.go openapi_getter.go


const PrintColumnsKey = "x-kubernetes-print-columns"

PrintColumnsKey is the key that defines which columns should be printed

func GetPrintColumns Uses

func GetPrintColumns(extensions spec.Extensions) (string, bool)

GetPrintColumns looks for the open API extension for the display columns.

func SupportsDryRun Uses

func SupportsDryRun(doc *openapi_v2.Document, gvk schema.GroupVersionKind) (bool, error)

SupportsDryRun is a method that let's us look in the OpenAPI if the specific group-version-kind supports the dryRun query parameter for the PATCH end-point.

type Getter Uses

type Getter interface {
    // OpenAPIData returns the parsed OpenAPIData
    Get() (Resources, error)

Getter is an interface for fetching openapi specs and parsing them into an Resources struct

func NewOpenAPIGetter Uses

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 Uses

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 Uses

func NewOpenAPIData(doc *openapi_v2.Document) (Resources, error)

NewOpenAPIData creates a new `Resources` out of the openapi document



Package openapi imports 8 packages (graph) and is imported by 120 packages. Updated 2019-05-13. Refresh now. Tools for package owners.