root

package
v0.0.0-...-4efcaec Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

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

type NoGenericEventPredicate struct {
	predicate.Funcs
}

NoGenericEventPredicate skips all the generic events

func (NoGenericEventPredicate) Generic

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

func (r *Reconciler) Reconcile(rootCtx context.Context, req ctrl.Request) (ctrl.Result, error)

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

type ResourceGroupPredicate struct {
	predicate.Funcs
}

ResourceGroupPredicate skips events where the new status is not changed by the old status.

func (ResourceGroupPredicate) Update

Update ensures only select ResourceGroup updates causes a reconciliation loop. This prevents the controller from generating an infinite loop of reconcilers.

Jump to

Keyboard shortcuts

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