controllers

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

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EventReasonSuccessfulCreate = "SuccessfulCreate"
	EventReasonBackupFailed     = "BackupFailed"
	EventReasonBackupSucceeded  = "BackupSucceeded"
)
View Source
var (
	EtcdClusterLabelKey       = "etcd.ydzs.io/cluster"
	EtcdClusterCommonLabelKey = "app"
	EtcdDataDirName           = "datadir"
)

Functions

func MutateHeadlessSvc

func MutateHeadlessSvc(cluster *v1alpha1.EtcdCluster, svc *corev1.Service)

根据 EtcdCluster 组装 Headless SVC

func MutateStatefulSet

func MutateStatefulSet(cluster *v1alpha1.EtcdCluster, sts *appsv1.StatefulSet)

根据EtcdCluster组装StatefulSet

Types

type Action

type Action interface {
	Execute(ctx context.Context) error
}

定义的执行动作接口

type CreateObject

type CreateObject struct {
	// contains filtered or unexported fields
}

创建一个新的资源对象

func (*CreateObject) Execute

func (o *CreateObject) Execute(ctx context.Context) error

type EtcdBackupReconciler

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

EtcdBackupReconciler reconciles a EtcdBackup object

func (*EtcdBackupReconciler) Reconcile

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

func (*EtcdBackupReconciler) SetupWithManager

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

type EtcdClusterReconciler

type EtcdClusterReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
}

EtcdClusterReconciler reconciles a EtcdCluster object

func (*EtcdClusterReconciler) Reconcile

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

func (*EtcdClusterReconciler) SetupWithManager

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

type PatchStatus

type PatchStatus struct {
	// contains filtered or unexported fields
}

更新Status

func (*PatchStatus) Execute

func (s *PatchStatus) Execute(ctx context.Context) error

Jump to

Keyboard shortcuts

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