controller

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// RCSConfigName is the name of the RCS Deployer Config CRD instance
	RCSConfigName = "rcs-config"
	// RCSConfigNamespace is the namespace that contains the RCS Deployer Config CRD instance
	RCSConfigNamespace = "rcs-deployer-system"
	// DefaultPlacementsNamespace is the default namespace contains the placements
	DefaultPlacementsNamespace = "default"

	RequeueTime = 20 * time.Second
)

Variables

View Source
var CappPredicateFunctions = predicate.Funcs{
	UpdateFunc: func(e event.UpdateEvent) bool {
		newCapp := e.ObjectNew.(*cappv1alpha1.Capp)
		return !utils.ContainsPlacementAnnotation(*newCapp)
	},
	CreateFunc: func(e event.CreateEvent) bool {
		capp := e.Object.(*cappv1alpha1.Capp)
		return !utils.ContainsPlacementAnnotation(*capp)
	},

	DeleteFunc: func(e event.DeleteEvent) bool {
		capp := e.Object.(*cappv1alpha1.Capp)
		return !utils.ContainsPlacementAnnotation(*capp)
	},
}

Functions

This section is empty.

Types

type ErrNoManagedCluster

type ErrNoManagedCluster struct{}

ErrNoManagedCluster is a custom error type for the requeue scenario

func (ErrNoManagedCluster) Error

func (e ErrNoManagedCluster) Error() string

type PlacementReconciler

type PlacementReconciler struct {
	client.Client
	Scheme        *runtime.Scheme
	EventRecorder record.EventRecorder
}

PlacementReconciler reconciles a CappPlacement object

func (*PlacementReconciler) Reconcile

func (r *PlacementReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*PlacementReconciler) SetupWithManager

func (r *PlacementReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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