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) 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
Click to show internal directories.
Click to hide internal directories.