root

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 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 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

Create implements predicate.Predicate

func (OwnedByConfigSyncPredicate) Delete added in v1.20.0

Delete implements predicate.Predicate

func (OwnedByConfigSyncPredicate) Generic added in v1.20.0

Generic implements predicate.Predicate

func (OwnedByConfigSyncPredicate) Update added in v1.20.0

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

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