controller

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const RequeueTime = 2 * time.Second

Variables

View Source
var CappPredicateFuncs = 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 SyncReconciler

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

SyncReconciler reconciles a CappNamespace object

func (*SyncReconciler) Reconcile

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

func (*SyncReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

func (*SyncReconciler) SyncManifestWork

func (r *SyncReconciler) SyncManifestWork(capp cappv1alpha1.Capp, ctx context.Context, logger logr.Logger) (ctrl.Result, error)

SyncManifestWork checks whether the manifest work deploying the Capp exists in the managed cluster namespace If it does, it updates the Capp in the manifest work spec. If it doesn't then it creates it

Jump to

Keyboard shortcuts

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