controllers

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type GetOptions

type GetOptions struct {
	Client      k8s.Client
	Recorder    record.EventRecorder
	Log         logr.Logger
	DClient     k8s.DClient
	Scheme      *runtime.Scheme
	ImageGetter image.Getter
}

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) Reconcile

func (r *HarborClusterReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

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 Reconciler interface {
	// Reconcile the dependent service.
	Reconcile() (*lcm.CRStatus, error)
}

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

Directories

Path Synopsis
api

Jump to

Keyboard shortcuts

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