Documentation ¶
Index ¶
- Constants
- func NewAddFinalizerController(recorder events.Recorder, ...) factory.Controller
- func NewAppliedManifestWorkFinalizeController(recorder events.Recorder, spokeDynamicClient dynamic.Interface, ...) factory.Controller
- func NewManifestWorkFinalizeController(recorder events.Recorder, ...) factory.Controller
- func NewUnManagedAppliedWorkController(recorder events.Recorder, ...) factory.Controller
- type AddFinalizerController
- type AppliedManifestWorkFinalizeController
- type ManifestWorkFinalizeController
Constants ¶
const ( // the upper bound of the AppliedManifestWork eviction grace period // If the AppliedManifestWork eviction grace period is set with a value that is larger than or equal to // the bound, the eviction feature will be disabled. EvictionGracePeriodBound = 100 * 365 * 24 * time.Hour )
Variables ¶
This section is empty.
Functions ¶
func NewAddFinalizerController ¶
func NewAddFinalizerController( recorder events.Recorder, manifestWorkClient workv1client.ManifestWorkInterface, manifestWorkInformer workinformer.ManifestWorkInformer, manifestWorkLister worklister.ManifestWorkNamespaceLister, ) factory.Controller
NewAddFinalizerController returns a ManifestWorkController
func NewAppliedManifestWorkFinalizeController ¶
func NewAppliedManifestWorkFinalizeController( recorder events.Recorder, spokeDynamicClient dynamic.Interface, appliedManifestWorkClient workv1client.AppliedManifestWorkInterface, appliedManifestWorkInformer workinformer.AppliedManifestWorkInformer, agentID string, ) factory.Controller
func NewManifestWorkFinalizeController ¶
func NewManifestWorkFinalizeController( recorder events.Recorder, manifestWorkClient workv1client.ManifestWorkInterface, manifestWorkInformer workinformer.ManifestWorkInformer, manifestWorkLister worklister.ManifestWorkNamespaceLister, appliedManifestWorkClient workv1client.AppliedManifestWorkInterface, appliedManifestWorkInformer workinformer.AppliedManifestWorkInformer, hubHash string, ) factory.Controller
func NewUnManagedAppliedWorkController ¶
func NewUnManagedAppliedWorkController( recorder events.Recorder, manifestWorkInformer workinformer.ManifestWorkInformer, manifestWorkLister worklister.ManifestWorkNamespaceLister, appliedManifestWorkClient workv1client.AppliedManifestWorkInterface, appliedManifestWorkInformer workinformer.AppliedManifestWorkInformer, evictionGracePeriod time.Duration, hubHash, agentID string, ) factory.Controller
NewUnManagedAppliedWorkController returns a controller to evict the unmanaged appliedmanifestworks.
An appliedmanifestwork will be considered unmanaged in the following scenarios:
- the manifestwork of the current appliedmanifestwork is missing on the hub, or
- the appliedmanifestwork hub hash does not match the current hub hash of the work agent.
One unmanaged appliedmanifestwork will be evicted from the managed cluster after a grace period (by default, 60 minutes), after one appliedmanifestwork is evicted from the managed cluster, its owned resources will also be evicted from the managed cluster with Kubernetes garbage collection.
Types ¶
type AddFinalizerController ¶
type AddFinalizerController struct {
// contains filtered or unexported fields
}
AddFinalizerController is to add the cluster.open-cluster-management.io/manifest-work-cleanup finalizer to manifestworks.
type AppliedManifestWorkFinalizeController ¶
type AppliedManifestWorkFinalizeController struct {
// contains filtered or unexported fields
}
AppliedManifestWorkFinalizeController handles cleanup of appliedmanifestwork resources before deletion is allowed. It should handle all appliedmanifestworks belonging to this agent identified by the agentID.
type ManifestWorkFinalizeController ¶
type ManifestWorkFinalizeController struct {
// contains filtered or unexported fields
}
ManifestWorkFinalizeController handles cleanup of manifestwork resources before deletion is allowed.