Documentation ¶
Index ¶
- Variables
- func DependsOn(a, b corev1.EnvVar) bool
- func GetCustomResourceDefinition(ctx context.Context, client client.Reader, gk metav1.GroupKind) (*apiextensionsv1.CustomResourceDefinition, error)
- func GetNamespacedName(obj client.Object) types.NamespacedName
- func IsAdvancedStatefulSetRolledOut(statefulSet *kruiseappsv1beta1.StatefulSet) bool
- func IsCloneSetRolledOut(cloneSet *kruiseappsv1alpha1.CloneSet) bool
- func IsDeleted(obj client.Object) bool
- func IsDeploymentRolledOut(deploy *appsv1.Deployment) bool
- func IsServiceReady(svc *corev1.Service) bool
- func IsStatefulSetRolledOut(statefulSet *appsv1.StatefulSet) bool
- func IsVersionServingInCustomResourceDefinition(crd *apiextensionsv1.CustomResourceDefinition, version string) bool
- func TopologicalSort(e []corev1.EnvVar)
- type VolumeDeviceSlice
- type VolumeMountSlice
- type VolumeSlice
- type WebhookType
Constants ¶
This section is empty.
Variables ¶
var ( // CreateEventFilter is the predicate for CreateEvent only. CreateEventFilter = predicate.Funcs{ CreateFunc: func(event event.CreateEvent) bool { return true }, DeleteFunc: func(event event.DeleteEvent) bool { return false }, UpdateFunc: func(event event.UpdateEvent) bool { return false }, GenericFunc: func(event event.GenericEvent) bool { return false }, } // DeleteEventFilter is the predicate for DeleteEvent only. DeleteEventFilter = predicate.Funcs{ CreateFunc: func(event event.CreateEvent) bool { return false }, DeleteFunc: func(event event.DeleteEvent) bool { return true }, UpdateFunc: func(event event.UpdateEvent) bool { return false }, GenericFunc: func(event event.GenericEvent) bool { return false }, } // UpdateEventFilter is the predicate for UpdateEvent only. UpdateEventFilter = predicate.Funcs{ CreateFunc: func(event event.CreateEvent) bool { return false }, DeleteFunc: func(event event.DeleteEvent) bool { return false }, UpdateFunc: func(event event.UpdateEvent) bool { return true }, GenericFunc: func(event event.GenericEvent) bool { return false }, } // GenericEventFilter is the predicate for GenericEvent only. GenericEventFilter = predicate.Funcs{ CreateFunc: func(event event.CreateEvent) bool { return false }, DeleteFunc: func(event event.DeleteEvent) bool { return false }, UpdateFunc: func(event event.UpdateEvent) bool { return false }, GenericFunc: func(event event.GenericEvent) bool { return true }, } )
Functions ¶
func GetCustomResourceDefinition ¶
func GetCustomResourceDefinition(ctx context.Context, client client.Reader, gk metav1.GroupKind) (*apiextensionsv1.CustomResourceDefinition, error)
GetCustomResourceDefinition is the helper function to get the CRD for the given group kind.
func GetNamespacedName ¶
func GetNamespacedName(obj client.Object) types.NamespacedName
GetNamespacedName returns the NamespacedName of the given object.
func IsAdvancedStatefulSetRolledOut ¶ added in v0.2.4
func IsAdvancedStatefulSetRolledOut(statefulSet *kruiseappsv1beta1.StatefulSet) bool
IsAdvancedStatefulSetRolledOut returns true when the OpenKruise StatefulSet is rolled out.
func IsCloneSetRolledOut ¶ added in v0.2.4
func IsCloneSetRolledOut(cloneSet *kruiseappsv1alpha1.CloneSet) bool
IsCloneSetRolledOut returns true when the OpenKruise CloneSet is rolled out.
func IsDeploymentRolledOut ¶
func IsDeploymentRolledOut(deploy *appsv1.Deployment) bool
IsDeploymentRolledOut returns true when the Deployment is rolled out.
func IsServiceReady ¶
IsServiceReady returns true when services is ready.
func IsStatefulSetRolledOut ¶
func IsStatefulSetRolledOut(statefulSet *appsv1.StatefulSet) bool
IsStatefulSetRolledOut returns true when the StatefulSet is rolled out.
func IsVersionServingInCustomResourceDefinition ¶
func IsVersionServingInCustomResourceDefinition(crd *apiextensionsv1.CustomResourceDefinition, version string) bool
IsVersionServingInCustomResourceDefinition returns true when the CRD serves the given version.
func TopologicalSort ¶ added in v0.2.5
TopologicalSort runs a topological sort on given env vars.
Types ¶
type VolumeDeviceSlice ¶
type VolumeDeviceSlice []corev1.VolumeDevice
VolumeDeviceSlice is a wrapper of []corev1.VolumeDevice that implements the sort.Interface.
func (VolumeDeviceSlice) Less ¶
func (s VolumeDeviceSlice) Less(i, j int) bool
Less implements sort.Interface.
func (VolumeDeviceSlice) Swap ¶
func (s VolumeDeviceSlice) Swap(i, j int)
Swap implements sort.Interface.
type VolumeMountSlice ¶
type VolumeMountSlice []corev1.VolumeMount
VolumeMountSlice is a wrapper of []corev1.VolumeMount that implements the sort.Interface.
func (VolumeMountSlice) Less ¶
func (s VolumeMountSlice) Less(i, j int) bool
Less implements sort.Interface.
func (VolumeMountSlice) Swap ¶
func (s VolumeMountSlice) Swap(i, j int)
Swap implements sort.Interface.
type VolumeSlice ¶
VolumeSlice is a wrapper of []corev1.Volume that implements the sort.Interface.
type WebhookType ¶ added in v0.2.2
type WebhookType string
WebhookType defines an immutable type for a webhook. Use NewWebhookType to instantiate.
const ( ValidatingWebhookType WebhookType = "validating" MutatingWebhookType WebhookType = "mutating" )
Valid webhook types.
func (WebhookType) IsMutating ¶ added in v0.2.2
func (wt WebhookType) IsMutating() bool
IsMutating is true if wt is a mutating webhook, else false.
func (WebhookType) IsValidating ¶ added in v0.2.2
func (wt WebhookType) IsValidating() bool
IsValidating is true if wt is a validating webhook, else false.
func (WebhookType) String ¶ added in v0.2.2
func (wt WebhookType) String() string