crd

package
v0.18.1 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Kind  = "CustomResourceDefinition"
	Group = "apiextensions.k8s.io/"
)
View Source
const V1Beta1Version string = "v1beta1"

V1Beta1 refers to the deprecated v1beta1 APIVersion of CRD objects

View Source
const V1Version string = "v1"

V1 refers to the new v1 APIVersion of CRD objects

Variables

This section is empty.

Functions

func SafeStorageVersionUpgrade

func SafeStorageVersionUpgrade(existingCRD runtime.Object, newCRD runtime.Object) (bool, error)

SafeStorageVersionUpgrade determines whether the new CRD spec includes all the storage versions of the existing on-cluster CRD. For each stored version in the status of the CRD on the cluster (there will be at least one) - each version must exist in the spec of the new CRD that is being installed. See https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definition-versioning/#upgrade-existing-objects-to-a-new-stored-version.

func UnmarshalV1

func UnmarshalV1(manifest string) (*apiextensionsv1.CustomResourceDefinition, error)

UnmarshalV1 takes in a CRD manifest and returns a v1 versioned CRD object.

func UnmarshalV1Beta1

func UnmarshalV1Beta1(manifest string) (*apiextensionsv1beta1.CustomResourceDefinition, error)

UnmarshalV1 takes in a CRD manifest and returns a v1beta1 versioned CRD object.

func Version

func Version(manifest *string) (string, error)

Version takes a CRD manifest and determines whether it is v1 or v1beta1 type based on the APIVersion.

Types

This section is empty.

Jump to

Keyboard shortcuts

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