Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Reconcile ¶
func Reconcile( cfg crdv1.HarborSync, harbor harbor.API, store reconciler.CredentialStore, rotationInterval time.Duration, mappingFunc func( crdv1.ProjectMapping, crdv1.HarborSync, harbor.Project, *crdv1.RobotAccountCredential, string), ) error
Reconcile is a Kubernetes-agnostic function that matches the projects, reconciles the robot accounts and calls mappingFunc if specified.
Types ¶
type Adapter ¶
Adapter waits for events on an input channel and emits SyncConfig change Events using a GenericEvent on a different channel
func NewAdapter ¶
NewAdapter creates a new adapter instance
func (Adapter) Run ¶
func (a Adapter) Run() <-chan event.GenericEvent
Run starts a goroutine which reads from the input channel and writes SyncConfig change events to the returned channel
type HarborSyncConfigReconciler ¶
type HarborSyncConfigReconciler struct { client.Client RotationInterval time.Duration CredCache reconciler.CredentialStore Harbor harbor.API }
HarborSyncConfigReconciler reconciles a HarborSyncConfig object
func (*HarborSyncConfigReconciler) Reconcile ¶
Reconcile reconciles the desired state in the cluster
func (*HarborSyncConfigReconciler) SetupWithManager ¶
func (r *HarborSyncConfigReconciler) SetupWithManager(mgr ctrl.Manager, input <-chan event.GenericEvent) error
SetupWithManager setup the controller with the manager and the event input channel the input chan is used to trigger recon based on external events (harbor API resources changed, forced sync)