resourcegroup

package
v1.23.1-rc.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
const (
	StartReconciling = "StartReconciling"

	FinishReconciling = "FinishReconciling"

	ComponentFailed = "ComponentFailed"

	ExceedTimeout = "ExceedTimeout"
)

Variables

View Source
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL