Documentation ¶
Index ¶
Constants ¶
const ( KptGroup = "kpt" DisableStatusKey = "configsync.gke.io/status" DisableStatusValue = "disabled" )
Variables ¶
This section is empty.
Functions ¶
func NewController ¶
func NewController(mgr manager.Manager, channel chan event.GenericEvent, logger logr.Logger, resolver *typeresolver.TypeResolver, group string, resMap *resourcemap.ResourceMap) error
NewController creates a new Reconciler and registers it with the provided manager
Types ¶
type NoGenericEventPredicate ¶
NoGenericEventPredicate skips all the generic events
func (NoGenericEventPredicate) Generic ¶
func (NoGenericEventPredicate) Generic(event.GenericEvent) bool
Generic skips all generic events
type Reconciler ¶
type Reconciler struct { // Client is to get and update ResourceGroup object. client.Client // contains filtered or unexported fields }
Reconciler reconciles a ResourceGroup object It only accepts the Create, Update, Delete events of ResourceGroup objects.
func (*Reconciler) Reconcile ¶
Reconcile implements reconcile.Reconciler. This function handles reconciliation for ResourceGroup objects. +kubebuilder:rbac:groups=kpt.dev,resources=resourcegroups,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=kpt.dev,resources=resourcegroups/status,verbs=get;update;patch +kubebuilder:rbac:groups=*,resources=*,verbs=get;list;watch
type ResourceGroupPredicate ¶
ResourceGroupPredicate skips events where the new status is not changed by the old status.
func (ResourceGroupPredicate) Update ¶
func (ResourceGroupPredicate) Update(e event.UpdateEvent) bool
Update ensures only select ResourceGroup updates causes a reconciliation loop. This prevents the controller from generating an infinite loop of reconcilers.