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 OwnedByConfigSyncPredicate ¶ added in v1.20.0
type OwnedByConfigSyncPredicate struct{}
OwnedByConfigSyncPredicate filters events for objects that have the label "app.kubernetes.io/managed-by=configmanagement.gke.io"
func (OwnedByConfigSyncPredicate) Create ¶ added in v1.20.0
func (OwnedByConfigSyncPredicate) Create(e event.CreateEvent) bool
Create implements predicate.Predicate
func (OwnedByConfigSyncPredicate) Delete ¶ added in v1.20.0
func (OwnedByConfigSyncPredicate) Delete(e event.DeleteEvent) bool
Delete implements predicate.Predicate
func (OwnedByConfigSyncPredicate) Generic ¶ added in v1.20.0
func (OwnedByConfigSyncPredicate) Generic(e event.GenericEvent) bool
Generic implements predicate.Predicate
func (OwnedByConfigSyncPredicate) Update ¶ added in v1.20.0
func (OwnedByConfigSyncPredicate) Update(e event.UpdateEvent) bool
Update implements predicate.Predicate
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.