controllers

package
v0.0.0-...-a45b031 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const ClusterPluginFinalizerName = "finalizer.clusterplugin.kok.tanx"
View Source
const FinalizerName = "finalizer.cluster.kok.tanx"
View Source
const MountPath = "/etc/cluster/"

Variables

View Source
var VersionsModules = make(map[string][]*Module)

Functions

func AddModules

func AddModules(key string, m ...*Module)

func ReconcileCluster

func ReconcileCluster(ctx *ModuleContext) (ctrl.Result, error)

Types

type ClusterPluginModule

type ClusterPluginModule struct {
	Name string
	// contains filtered or unexported fields
}

type ClusterPluginReconciler

type ClusterPluginReconciler struct {
	client.Client
	Log      logr.Logger
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
}

ClusterPluginReconciler reconciles a ClusterPlugin object

func (*ClusterPluginReconciler) Reconcile

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

func (*ClusterPluginReconciler) SetupWithManager

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

type ClusterReconciler

type ClusterReconciler struct {
	client.Client
	Log      logr.Logger
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
}

ClusterReconciler reconciles a Cluster object

func (*ClusterReconciler) Reconcile

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

+kubebuilder:rbac:groups=cluster.kok.tanx,resources=clusters,verbs=get;list;watch;create;update;patch;Del +kubebuilder:rbac:groups=cluster.kok.tanx,resources=clusters/status,verbs=get;update;patch +kubebuilder:rbac:groups=cluster.kok.tanx,resources=clusters/events,verbs=get;list;watch;create;update;patch

func (*ClusterReconciler) SetupWithManager

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

type InitConfig

type InitConfig struct {
	Version                string
	EtcdRepository         string
	EtcdVersion            string
	ApiServerImage         string
	ControllerManagerImage string
	SchedulerImage         string
	ClientImage            string
	InitImage              string
	PodInfraContainerImage string
}

type Module

type Module struct {
	Name  string
	Sub   []*Module
	Order int

	GetObj               func() Object
	Render               func(c *v1.Cluster) Object
	SetStatus            func(c *v1.Cluster, target, now Object) (bool, Object)
	Del                  func(ctx context.Context, c *v1.Cluster, client client.Client) error
	Next                 func(c *v1.Cluster) bool
	SetDefault           func(c *v1.Cluster)
	ValidateCreateModule func(c *v1.Cluster) field.ErrorList
	ValidateUpdateModule func(now *v1.Cluster, old *v1.Cluster) field.ErrorList
}

func (*Module) Default

func (m *Module) Default(c *v1.Cluster)

func (*Module) Delete

func (m *Module) Delete(ctx *ModuleContext) error

func (*Module) Ready

func (m *Module) Ready(ctx *ModuleContext) bool

func (*Module) Reconcile

func (m *Module) Reconcile(ctx *ModuleContext) error

func (*Module) ValidateCreate

func (m *Module) ValidateCreate(c *v1.Cluster) field.ErrorList

func (*Module) ValidateUpdate

func (m *Module) ValidateUpdate(now *v1.Cluster, old *v1.Cluster) field.ErrorList

type ModuleContext

type ModuleContext struct {
	context.Context
	*v1.Cluster
	logr.Logger
	*ClusterReconciler
}

func NewModuleContext

func NewModuleContext(context context.Context, c *v1.Cluster, logger logr.Logger, r *ClusterReconciler) *ModuleContext

type MultiClusterPluginReconciler

type MultiClusterPluginReconciler struct {
	client.Client
	Log      logr.Logger
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
}

MultiClusterPluginReconciler reconciles a MultiClusterPlugin object

func (*MultiClusterPluginReconciler) Reconcile

func (*MultiClusterPluginReconciler) SetupWithManager

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

type Object

type Object interface {
	runtime.Object
	metav1.Object
	metav1.ObjectMetaAccessor
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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