Documentation
¶
Index ¶
- Constants
- Variables
- func NewRGController(mgr ctrl.Manager, channel chan event.GenericEvent, logger logr.Logger, ...) error
- func UpdateReconcileStatusToReflectKstatus(status v1alpha1.ResourceStatus, ignoreMutation bool) (v1alpha1.Reconcile, error)
- func UpdateStatusToReflectActuation(s v1alpha1.ResourceStatus) v1alpha1.Status
Constants ¶
const ( // ManagerContainerName is the name of the manager container of the resource-group controller. ManagerContainerName = "manager" // FieldManager is the field manager name used by the resource-group controller. // This avoids conflicts with the reconciler and reconciler-manager. FieldManager = configsync.ConfigSyncPrefix + "resource-group-controller" )
const ( StartReconciling = "StartReconciling" FinishReconciling = "FinishReconciling" ComponentFailed = "ComponentFailed" ExceedTimeout = "ExceedTimeout" )
Variables ¶
var DefaultDuration = 30 * time.Second
DefaultDuration is the default throttling duration
Functions ¶
func NewRGController ¶
func NewRGController(mgr ctrl.Manager, channel chan event.GenericEvent, logger logr.Logger, resolver *typeresolver.TypeResolver, resMap *resourcemap.ResourceMap, duration time.Duration) error
NewRGController creates a new ResourceGroup controller and registers it with the provided manager.
func UpdateReconcileStatusToReflectKstatus ¶
func UpdateReconcileStatusToReflectKstatus(status v1alpha1.ResourceStatus, ignoreMutation bool) (v1alpha1.Reconcile, error)
UpdateReconcileStatusToReflectKstatus uses the current Strategy and Actuation status from the applier and the newly computed kstatus to compute the Reconcile status. Returns an error if one of the inputs is invalid.
func UpdateStatusToReflectActuation ¶
func UpdateStatusToReflectActuation(s v1alpha1.ResourceStatus) v1alpha1.Status
UpdateStatusToReflectActuation updates the latest computed kstatus to reflect the desired state in the source of truth, as much as possible, not just the desired state that has been persisted to the Kubernetes API.
This is necessary, because kstatus only reflects whether the object status reflects the object spec. But in Config Sync, the desired state is actually in the source or truth. So if the latest desired state has not yet been successfully actuated (applied or deleted), then the current status is Unknown, because neither Kubernetes nor this ResourceGroup controller knows what the desired state is.
Types ¶
This section is empty.