kubernetes/staging/src/k8s.io/apiextensions-apiserver/pkg/apihelpers/helpers.go

// 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 IsProtectedCommunityGroup(group string) bool {}

type APIApprovalState

const APIApprovalInvalid

const APIApproved

const APIApprovalBypassed

const APIApprovalMissing

// GetAPIApprovalState returns the state of the API approval and reason for that state
func GetAPIApprovalState(annotations map[string]string) (state APIApprovalState, reason string) {}

// SetCRDCondition sets the status condition. It either overwrites the existing one or creates a new one.
func SetCRDCondition(crd *apiextensionsv1.CustomResourceDefinition, newCondition apiextensionsv1.CustomResourceDefinitionCondition) {}

// RemoveCRDCondition removes the status condition.
func RemoveCRDCondition(crd *apiextensionsv1.CustomResourceDefinition, conditionType apiextensionsv1.CustomResourceDefinitionConditionType) {}

// FindCRDCondition returns the condition you're looking for or nil.
func FindCRDCondition(crd *apiextensionsv1.CustomResourceDefinition, conditionType apiextensionsv1.CustomResourceDefinitionConditionType) *apiextensionsv1.CustomResourceDefinitionCondition {}

// IsCRDConditionTrue indicates if the condition is present and strictly true.
func IsCRDConditionTrue(crd *apiextensionsv1.CustomResourceDefinition, conditionType apiextensionsv1.CustomResourceDefinitionConditionType) bool {}

// IsCRDConditionFalse indicates if the condition is present and false.
func IsCRDConditionFalse(crd *apiextensionsv1.CustomResourceDefinition, conditionType apiextensionsv1.CustomResourceDefinitionConditionType) bool {}

// IsCRDConditionPresentAndEqual indicates if the condition is present and equal to the given status.
func IsCRDConditionPresentAndEqual(crd *apiextensionsv1.CustomResourceDefinition, conditionType apiextensionsv1.CustomResourceDefinitionConditionType, status apiextensionsv1.ConditionStatus) bool {}

// IsCRDConditionEquivalent returns true if the lhs and rhs are equivalent except for times.
func IsCRDConditionEquivalent(lhs, rhs *apiextensionsv1.CustomResourceDefinitionCondition) bool {}

// CRDHasFinalizer returns true if the finalizer is in the list.
func CRDHasFinalizer(crd *apiextensionsv1.CustomResourceDefinition, needle string) bool {}

// CRDRemoveFinalizer removes the finalizer if present.
func CRDRemoveFinalizer(crd *apiextensionsv1.CustomResourceDefinition, needle string) {}

// HasServedCRDVersion returns true if the given version is in the list of CRD's versions and the Served flag is set.
func HasServedCRDVersion(crd *apiextensionsv1.CustomResourceDefinition, version string) bool {}

// GetCRDStorageVersion returns the storage version for given CRD.
func GetCRDStorageVersion(crd *apiextensionsv1.CustomResourceDefinition) (string, error) {}

// IsStoredVersion returns whether the given version is the storage version of the CRD.
func IsStoredVersion(crd *apiextensionsv1.CustomResourceDefinition, version string) bool {}

// GetSchemaForVersion returns the validation schema for the given version or nil.
func GetSchemaForVersion(crd *apiextensionsv1.CustomResourceDefinition, version string) (*apiextensionsv1.CustomResourceValidation, error) {}

// GetSubresourcesForVersion returns the subresources for given version or nil.
func GetSubresourcesForVersion(crd *apiextensionsv1.CustomResourceDefinition, version string) (*apiextensionsv1.CustomResourceSubresources, error) {}

// HasPerVersionSchema returns true if a CRD uses per-version schema.
func HasPerVersionSchema(versions []apiextensionsv1.CustomResourceDefinitionVersion) bool {}

// HasPerVersionSubresources returns true if a CRD uses per-version subresources.
func HasPerVersionSubresources(versions []apiextensionsv1.CustomResourceDefinitionVersion) bool {}

// HasPerVersionColumns returns true if a CRD uses per-version columns.
func HasPerVersionColumns(versions []apiextensionsv1.CustomResourceDefinitionVersion) bool {}

// HasVersionServed returns true if given CRD has given version served.
func HasVersionServed(crd *apiextensionsv1.CustomResourceDefinition, version string) bool {}