Documentation ¶
Index ¶
- func CRDHasFinalizer(crd *apiextensionsv1.CustomResourceDefinition, needle string) bool
- func CRDRemoveFinalizer(crd *apiextensionsv1.CustomResourceDefinition, needle string)
- func FindCRDCondition(crd *apiextensionsv1.CustomResourceDefinition, ...) *apiextensionsv1.CustomResourceDefinitionCondition
- func GetCRDStorageVersion(crd *apiextensionsv1.CustomResourceDefinition) (string, error)
- func GetSchemaForVersion(crd *apiextensionsv1.CustomResourceDefinition, version string) (*apiextensionsv1.CustomResourceValidation, error)
- func GetSubresourcesForVersion(crd *apiextensionsv1.CustomResourceDefinition, version string) (*apiextensionsv1.CustomResourceSubresources, error)
- func HasPerVersionColumns(versions []apiextensionsv1.CustomResourceDefinitionVersion) bool
- func HasPerVersionSchema(versions []apiextensionsv1.CustomResourceDefinitionVersion) bool
- func HasPerVersionSubresources(versions []apiextensionsv1.CustomResourceDefinitionVersion) bool
- func HasServedCRDVersion(crd *apiextensionsv1.CustomResourceDefinition, version string) bool
- func HasVersionServed(crd *apiextensionsv1.CustomResourceDefinition, version string) bool
- func IsCRDConditionEquivalent(lhs, rhs *apiextensionsv1.CustomResourceDefinitionCondition) bool
- func IsCRDConditionFalse(crd *apiextensionsv1.CustomResourceDefinition, ...) bool
- func IsCRDConditionPresentAndEqual(crd *apiextensionsv1.CustomResourceDefinition, ...) bool
- func IsCRDConditionTrue(crd *apiextensionsv1.CustomResourceDefinition, ...) bool
- func IsProtectedCommunityGroup(group string) bool
- func IsStoredVersion(crd *apiextensionsv1.CustomResourceDefinition, version string) bool
- func RemoveCRDCondition(crd *apiextensionsv1.CustomResourceDefinition, ...)
- func SetCRDCondition(crd *apiextensionsv1.CustomResourceDefinition, ...)
- type APIApprovalState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CRDHasFinalizer ¶
func CRDHasFinalizer(crd *apiextensionsv1.CustomResourceDefinition, needle string) bool
CRDHasFinalizer returns true if the finalizer is in the list.
func CRDRemoveFinalizer ¶
func CRDRemoveFinalizer(crd *apiextensionsv1.CustomResourceDefinition, needle string)
CRDRemoveFinalizer removes the finalizer if present.
func FindCRDCondition ¶
func FindCRDCondition(crd *apiextensionsv1.CustomResourceDefinition, conditionType apiextensionsv1.CustomResourceDefinitionConditionType) *apiextensionsv1.CustomResourceDefinitionCondition
FindCRDCondition returns the condition you're looking for or nil.
func GetCRDStorageVersion ¶
func GetCRDStorageVersion(crd *apiextensionsv1.CustomResourceDefinition) (string, error)
GetCRDStorageVersion returns the storage version for given CRD.
func GetSchemaForVersion ¶
func GetSchemaForVersion(crd *apiextensionsv1.CustomResourceDefinition, version string) (*apiextensionsv1.CustomResourceValidation, error)
GetSchemaForVersion returns the validation schema for the given version or nil.
func GetSubresourcesForVersion ¶
func GetSubresourcesForVersion(crd *apiextensionsv1.CustomResourceDefinition, version string) (*apiextensionsv1.CustomResourceSubresources, error)
GetSubresourcesForVersion returns the subresources for given version or nil.
func HasPerVersionColumns ¶
func HasPerVersionColumns(versions []apiextensionsv1.CustomResourceDefinitionVersion) bool
HasPerVersionColumns returns true if a CRD uses per-version columns.
func HasPerVersionSchema ¶
func HasPerVersionSchema(versions []apiextensionsv1.CustomResourceDefinitionVersion) bool
HasPerVersionSchema returns true if a CRD uses per-version schema.
func HasPerVersionSubresources ¶
func HasPerVersionSubresources(versions []apiextensionsv1.CustomResourceDefinitionVersion) bool
HasPerVersionSubresources returns true if a CRD uses per-version subresources.
func HasServedCRDVersion ¶
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 ¶
func HasVersionServed(crd *apiextensionsv1.CustomResourceDefinition, version string) bool
HasVersionServed returns true if given CRD has given version served.
func IsCRDConditionEquivalent ¶
func IsCRDConditionEquivalent(lhs, rhs *apiextensionsv1.CustomResourceDefinitionCondition) bool
IsCRDConditionEquivalent returns true if the lhs and rhs are equivalent except for times.
func IsCRDConditionFalse ¶
func IsCRDConditionFalse(crd *apiextensionsv1.CustomResourceDefinition, conditionType apiextensionsv1.CustomResourceDefinitionConditionType) bool
IsCRDConditionFalse indicates if the condition is present and false.
func IsCRDConditionPresentAndEqual ¶
func IsCRDConditionPresentAndEqual(crd *apiextensionsv1.CustomResourceDefinition, conditionType apiextensionsv1.CustomResourceDefinitionConditionType, status apiextensionsv1.ConditionStatus) bool
IsCRDConditionPresentAndEqual indicates if the condition is present and equal to the given status.
func IsCRDConditionTrue ¶
func IsCRDConditionTrue(crd *apiextensionsv1.CustomResourceDefinition, conditionType apiextensionsv1.CustomResourceDefinitionConditionType) bool
IsCRDConditionTrue indicates if the condition is present and strictly true.
func IsProtectedCommunityGroup ¶
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 ¶
func IsStoredVersion(crd *apiextensionsv1.CustomResourceDefinition, version string) bool
IsStoredVersion returns whether the given version is the storage version of the CRD.
func RemoveCRDCondition ¶
func RemoveCRDCondition(crd *apiextensionsv1.CustomResourceDefinition, conditionType apiextensionsv1.CustomResourceDefinitionConditionType)
RemoveCRDCondition removes the status condition.
func SetCRDCondition ¶
func SetCRDCondition(crd *apiextensionsv1.CustomResourceDefinition, newCondition apiextensionsv1.CustomResourceDefinitionCondition)
SetCRDCondition sets the status condition. It either overwrites the existing one or creates a new one.
Types ¶
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) APIApproved // APIApprovalBypassed if the annotation starts with "unapproved" indicating that for whatever reason the API isn't approved, but we should allow its creation APIApprovalBypassed // APIApprovalMissing means the annotation is empty APIApprovalMissing )
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