Documentation ¶
Overview ¶
Package clusterresourceplacement features a controller to reconcile the clusterResourcePlacement changes.
Index ¶
Constants ¶
View Source
const ( // InvalidResourceSelectorsReason is the reason string of placement condition when the selected resources are invalid // or forbidden. InvalidResourceSelectorsReason = "InvalidResourceSelectors" // SchedulingUnknownReason is the reason string of placement condition when the schedule status is unknown. SchedulingUnknownReason = "SchedulePending" // SynchronizePendingReason is the reason string of placement condition when the selected resources have not synchronized // under the per-cluster namespaces (i.e., fleet-member-<member-name>) on the hub cluster yet. SynchronizePendingReason = "SynchronizePending" // SynchronizeSucceededReason is the reason string of placement condition when the selected resources are // successfully synchronized under the per-cluster namespaces (i.e., fleet-member-<member-name>) on the hub cluster. SynchronizeSucceededReason = "SynchronizeSucceeded" // ApplyFailedReason is the reason string of placement condition when the selected resources fail to apply. ApplyFailedReason = "ApplyFailed" // ApplyPendingReason is the reason string of placement condition when the selected resources are pending to apply. ApplyPendingReason = "ApplyPending" // ApplySucceededReason is the reason string of placement condition when the selected resources are applied successfully. ApplySucceededReason = "ApplySucceeded" )
ClusterResourcePlacementStatus condition reasons
View Source
const ( // ResourceApplyFailedReason is the reason string of placement condition when the selected resources fail to apply. ResourceApplyFailedReason = "ApplyFailed" // ResourceApplyPendingReason is the reason string of placement condition when the selected resources are pending to apply. ResourceApplyPendingReason = "ApplyPending" // ResourceApplySucceededReason is the reason string of placement condition when the selected resources are applied successfully. ResourceApplySucceededReason = "ApplySucceeded" // WorkSynchronizePendingReason is the reason string of placement condition when the work(s) are pending to synchronize. WorkSynchronizePendingReason = "WorkSynchronizePending" // WorkSynchronizeFailedReason is the reason string of placement condition when the work(s) failed to synchronize. WorkSynchronizeFailedReason = "WorkSynchronizeFailed" // WorkSynchronizeSucceededReason is the reason string of placement condition when the work(s) are synchronized successfully. WorkSynchronizeSucceededReason = "WorkSynchronizeSucceeded" // ResourceScheduleSucceededReason is the reason string of placement condition when the selected resources are scheduled. ResourceScheduleSucceededReason = "ScheduleSucceeded" // ResourceScheduleFailedReason is the reason string of placement condition when the scheduler failed to schedule the selected resources. ResourceScheduleFailedReason = "ScheduleFailed" )
ResourcePlacementStatus condition reasons and message formats
Variables ¶
View Source
var ( ErrStillPendingManifest = fmt.Errorf("there are still manifest pending to be processed by the member cluster") ErrFailedManifest = fmt.Errorf("there are failed to apply manifests, please check the `failedResourcePlacements` status") )
Functions ¶
This section is empty.
Types ¶
type Reconciler ¶
type Reconciler struct { // the informer contains the cache for all the resources we need. InformerManager informer.Manager // RestMapper is used to convert between gvk and gvr on known resources. RestMapper meta.RESTMapper // Client is used to update objects which goes to the api server directly. Client client.Client // UncachedReader is the uncached read-only client for accessing Kubernetes API server; in most cases client should // be used instead, unless consistency becomes a serious concern. // It's only needed by v1beta1 APIs. UncachedReader client.Reader // ResourceConfig contains all the API resources that we won't select based on allowed or skipped propagating APIs option. ResourceConfig *utils.ResourceConfig // SkippedNamespaces contains the namespaces that we should not propagate. SkippedNamespaces map[string]bool Recorder record.EventRecorder Scheme *runtime.Scheme // Whether to use the new status func to populate the crp status. UseNewConditions bool }
Reconciler reconciles a cluster resource placement object
func (*Reconciler) Reconcile ¶
func (r *Reconciler) Reconcile(ctx context.Context, key controller.QueueKey) (ctrl.Result, error)
func (*Reconciler) ReconcileV1Alpha1 ¶ added in v0.6.4
func (r *Reconciler) ReconcileV1Alpha1(ctx context.Context, key controller.QueueKey) (ctrl.Result, error)
ReconcileV1Alpha1 reconciles v1aplha1 APIs.
Click to show internal directories.
Click to hide internal directories.