crd

package
v1.14.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CleanCrdFn

type CleanCrdFn func() error

CleanCrdFn declares the clean up function needed to remove the CRD

type TestCrd

type TestCrd struct {
	Name               string
	Kind               string
	APIGroup           string
	Versions           []apiextensionsv1beta1.CustomResourceDefinitionVersion
	APIExtensionClient *crdclientset.Clientset
	Crd                *apiextensionsv1beta1.CustomResourceDefinition
	DynamicClients     map[string]dynamic.ResourceInterface
	CleanUp            CleanCrdFn
}

TestCrd holds all the pieces needed to test with the CRD

func CreateMultiVersionTestCRD

func CreateMultiVersionTestCRD(f *framework.Framework, group string, apiVersions []apiextensionsv1beta1.CustomResourceDefinitionVersion, conversionWebhook *apiextensionsv1beta1.WebhookClientConfig) (*TestCrd, error)

CreateMultiVersionTestCRD creates a new CRD specifically for the calling test.

func CreateMultiVersionTestCRDWithV1Storage

func CreateMultiVersionTestCRDWithV1Storage(f *framework.Framework) (*TestCrd, error)

CreateMultiVersionTestCRDWithV1Storage creates a new CRD specifically for the calling test.

func CreateTestCRD

func CreateTestCRD(f *framework.Framework) (*TestCrd, error)

CreateTestCRD creates a new CRD specifically for the calling test.

func (*TestCrd) GetAPIVersions

func (c *TestCrd) GetAPIVersions() []string

GetAPIVersions returns the API versions served by the CRD.

func (*TestCrd) GetListName

func (c *TestCrd) GetListName() string

GetListName returns the name for the CRD list resources

func (*TestCrd) GetMetaName

func (c *TestCrd) GetMetaName() string

GetMetaName returns the metaname for the CRD.

func (*TestCrd) GetPluralName

func (c *TestCrd) GetPluralName() string

GetPluralName returns the plural form of the CRD name

func (*TestCrd) GetV1DynamicClient

func (c *TestCrd) GetV1DynamicClient() dynamic.ResourceInterface

GetV1DynamicClient returns the dynamic client for v1.

func (*TestCrd) PatchSchema

func (c *TestCrd) PatchSchema(schema []byte) error

PatchSchema takes validation schema in YAML and patches it to given CRD

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL