Version: v0.22.2 Latest Latest

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

Go to latest
Published: Sep 17, 2021 License: Apache-2.0 Imports: 6 Imported by: 6




This section is empty.


This section is empty.


func CRDHasFinalizer added in v0.18.0

func CRDHasFinalizer(crd *apiextensionsv1.CustomResourceDefinition, needle string) bool

CRDHasFinalizer returns true if the finalizer is in the list.

func CRDRemoveFinalizer added in v0.18.0

func CRDRemoveFinalizer(crd *apiextensionsv1.CustomResourceDefinition, needle string)

CRDRemoveFinalizer removes the finalizer if present.

func FindCRDCondition added in v0.18.0

FindCRDCondition returns the condition you're looking for or nil.

func GetCRDStorageVersion added in v0.18.0

func GetCRDStorageVersion(crd *apiextensionsv1.CustomResourceDefinition) (string, error)

GetCRDStorageVersion returns the storage version for given CRD.

func GetSchemaForVersion added in v0.18.0

GetSchemaForVersion returns the validation schema for the given version or nil.

func GetSubresourcesForVersion added in v0.18.0

GetSubresourcesForVersion returns the subresources for given version or nil.

func HasPerVersionColumns added in v0.18.0

func HasPerVersionColumns(versions []apiextensionsv1.CustomResourceDefinitionVersion) bool

HasPerVersionColumns returns true if a CRD uses per-version columns.

func HasPerVersionSchema added in v0.18.0

func HasPerVersionSchema(versions []apiextensionsv1.CustomResourceDefinitionVersion) bool

HasPerVersionSchema returns true if a CRD uses per-version schema.

func HasPerVersionSubresources added in v0.18.0

func HasPerVersionSubresources(versions []apiextensionsv1.CustomResourceDefinitionVersion) bool

HasPerVersionSubresources returns true if a CRD uses per-version subresources.

func HasServedCRDVersion added in v0.18.0

func HasServedCRDVersion(crd *apiextensionsv1.CustomResourceDefinition, version string) bool

HasServedCRDVersion returns true if the given version is in the list of CRD's versions and the Served flag is set.

func HasVersionServed added in v0.18.0

func HasVersionServed(crd *apiextensionsv1.CustomResourceDefinition, version string) bool

HasVersionServed returns true if given CRD has given version served.

func IsCRDConditionEquivalent added in v0.18.0

func IsCRDConditionEquivalent(lhs, rhs *apiextensionsv1.CustomResourceDefinitionCondition) bool

IsCRDConditionEquivalent returns true if the lhs and rhs are equivalent except for times.

func IsCRDConditionFalse added in v0.18.0

IsCRDConditionFalse indicates if the condition is present and false.

func IsCRDConditionPresentAndEqual added in v0.18.0

IsCRDConditionPresentAndEqual indicates if the condition is present and equal to the given status.

func IsCRDConditionTrue added in v0.18.0

IsCRDConditionTrue indicates if the condition is present and strictly true.

func IsProtectedCommunityGroup

func IsProtectedCommunityGroup(group string) bool

IsProtectedCommunityGroup returns whether or not a group specified for a CRD is protected for the community and needs to have the v1beta1.KubeAPIApprovalAnnotation set.

func IsStoredVersion added in v0.18.0

func IsStoredVersion(crd *apiextensionsv1.CustomResourceDefinition, version string) bool

IsStoredVersion returns whether the given version is the storage version of the CRD.

func RemoveCRDCondition added in v0.18.0

RemoveCRDCondition removes the status condition.

func SetCRDCondition added in v0.18.0

SetCRDCondition sets the status condition. It either overwrites the existing one or creates a new one.


type APIApprovalState

type APIApprovalState int

APIApprovalState covers the various options for API approval annotation states

const (
	// APIApprovalInvalid means the annotation doesn't have an expected value
	APIApprovalInvalid APIApprovalState = iota
	// APIApproved if the annotation has a URL (this means the API is approved)
	// APIApprovalBypassed if the annotation starts with "unapproved" indicating that for whatever reason the API isn't approved, but we should allow its creation
	// APIApprovalMissing means the annotation is empty

func GetAPIApprovalState

func GetAPIApprovalState(annotations map[string]string) (state APIApprovalState, reason string)

GetAPIApprovalState returns the state of the API approval and reason for that state

Source Files

Jump to

Keyboard shortcuts

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