controllers

package
v0.0.0-...-9b96d08 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ReconcileWaitResult = reconcile.Result{RequeueAfter: 30 * time.Second}

Functions

func GenerateLabels

func GenerateLabels(labels map[string]string, name string) map[string]string

func MergeLabels

func MergeLabels(allLabels ...map[string]string) map[string]string

Types

type GetOptions

type GetOptions struct {
	Client        k8s.Client
	Recorder      record.EventRecorder
	Log           logr.Logger
	DClient       k8s.DClient
	Scheme        *runtime.Scheme
	Labels        map[string]string
	Monitor       *prometheus.GenericClientset
	Observers     *observer.Manager
	ZKClient      *zk.BaseClient
	ObservedState *observer.State
	Finalizers    finalizer.Handler
}

type Reconciler

type Reconciler interface {
	// Reconcile the dependent service.
	Reconcile() error
}

type ServiceGetter

type ServiceGetter interface {
	// For Workload
	Workload(ctx context.Context, workload *cachev1alpha1.Workload, options *GetOptions) Reconciler
}

type ServiceGetterImpl

type ServiceGetterImpl struct {
}

func (*ServiceGetterImpl) Workload

func (impl *ServiceGetterImpl) Workload(ctx context.Context, workload *cachev1alpha1.Workload, options *GetOptions) Reconciler

type WorkloadReconciler

type WorkloadReconciler struct {
	client.Client
	ServiceGetter
	Log           logr.Logger
	Scheme        *runtime.Scheme
	Recorder      record.EventRecorder
	Observers     *observer.Manager
	Monitor       *prometheus.GenericClientset
	ZKClient      *zk.BaseClient
	ObservedState *observer.State
	Finalizers    finalizer.Handler
}

WorkloadReconciler reconciles a Workload object

func (*WorkloadReconciler) Reconcile

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

func (*WorkloadReconciler) SetupWithManager

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

Jump to

Keyboard shortcuts

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