Documentation ¶
Index ¶
- Variables
- type GetOptions
- type HarborClusterReconciler
- func (r *HarborClusterReconciler) ComponentsAreAllReady(serviceToMap map[goharborv1.Component]*lcm.CRStatus) bool
- func (r *HarborClusterReconciler) DefaultComponentStatus() map[goharborv1.Component]*lcm.CRStatus
- func (r *HarborClusterReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)
- func (r *HarborClusterReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *HarborClusterReconciler) UpdateHarborClusterStatus(ctx context.Context, harborCluster *goharborv1.HarborCluster, ...) error
- type Reconciler
- type ServiceGetter
- type ServiceGetterImpl
- func (impl *ServiceGetterImpl) Cache(ctx context.Context, harborCluster *goharborv1.HarborCluster, ...) Reconciler
- func (impl *ServiceGetterImpl) Database(ctx context.Context, harborCluster *goharborv1.HarborCluster, ...) Reconciler
- func (impl *ServiceGetterImpl) Harbor(ctx context.Context, harborCluster *goharborv1.HarborCluster, ...) Reconciler
- func (impl *ServiceGetterImpl) Storage(ctx context.Context, harborCluster *goharborv1.HarborCluster, ...) Reconciler
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ComponentToConditionType = map[goharborv1.Component]goharborv1.HarborClusterConditionType{ goharborv1.ComponentHarbor: goharborv1.ServiceReady, goharborv1.ComponentCache: goharborv1.CacheReady, goharborv1.ComponentStorage: goharborv1.StorageReady, goharborv1.ComponentDatabase: goharborv1.DatabaseReady, } ReconcileWaitResult = reconcile.Result{RequeueAfter: 30 * time.Second} )
Functions ¶
This section is empty.
Types ¶
type GetOptions ¶
type HarborClusterReconciler ¶
type HarborClusterReconciler struct { client.Client ServiceGetter Log logr.Logger Scheme *runtime.Scheme RequeueAfter time.Duration Recorder record.EventRecorder }
HarborClusterReconciler reconciles a HarborCluster object
func (*HarborClusterReconciler) ComponentsAreAllReady ¶
func (r *HarborClusterReconciler) ComponentsAreAllReady(serviceToMap map[goharborv1.Component]*lcm.CRStatus) bool
ServicesAreAllReady check whether these components(includes cache, db, storage) are all ready.
func (*HarborClusterReconciler) DefaultComponentStatus ¶
func (r *HarborClusterReconciler) DefaultComponentStatus() map[goharborv1.Component]*lcm.CRStatus
func (*HarborClusterReconciler) SetupWithManager ¶
func (r *HarborClusterReconciler) SetupWithManager(mgr ctrl.Manager) error
func (*HarborClusterReconciler) UpdateHarborClusterStatus ¶
func (r *HarborClusterReconciler) UpdateHarborClusterStatus( ctx context.Context, harborCluster *goharborv1.HarborCluster, componentToCRStatus map[goharborv1.Component]*lcm.CRStatus) error
UpdateHarborClusterStatus will Update HarborCluster CR status, according the services reconcile result.
type Reconciler ¶
type ServiceGetter ¶
type ServiceGetter interface { // For Redis Cache(ctx context.Context, harborCluster *goharborv1.HarborCluster, options *GetOptions) Reconciler // For database Database(ctx context.Context, harborCluster *goharborv1.HarborCluster, options *GetOptions) Reconciler // For storage Storage(ctx context.Context, harborCluster *goharborv1.HarborCluster, options *GetOptions) Reconciler // For harbor itself Harbor(ctx context.Context, harborCluster *goharborv1.HarborCluster, componentToCRStatus map[goharborv1.Component]*lcm.CRStatus, options *GetOptions) Reconciler }
type ServiceGetterImpl ¶
type ServiceGetterImpl struct { }
func (*ServiceGetterImpl) Cache ¶
func (impl *ServiceGetterImpl) Cache(ctx context.Context, harborCluster *goharborv1.HarborCluster, options *GetOptions) Reconciler
func (*ServiceGetterImpl) Database ¶
func (impl *ServiceGetterImpl) Database(ctx context.Context, harborCluster *goharborv1.HarborCluster, options *GetOptions) Reconciler
func (*ServiceGetterImpl) Harbor ¶
func (impl *ServiceGetterImpl) Harbor(ctx context.Context, harborCluster *goharborv1.HarborCluster, componentToCRStatus map[goharborv1.Component]*lcm.CRStatus, options *GetOptions) Reconciler
func (*ServiceGetterImpl) Storage ¶
func (impl *ServiceGetterImpl) Storage(ctx context.Context, harborCluster *goharborv1.HarborCluster, options *GetOptions) Reconciler
Click to show internal directories.
Click to hide internal directories.