handler

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2020 License: LGPL-3.0 Imports: 32 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// EtcdSSLPath ssl file path for etcd
	EtcdSSLPath = "/run/ssl/etcd"
)

Variables

View Source
var APIName = "rbd-api"

APIName name

View Source
var AppUIName = "rbd-app-ui"

AppUIName name for rbd-app-ui resources.

View Source
var ChaosName = "rbd-chaos"

ChaosName name for rbd-chaos

View Source
var (
	// DBName name
	DBName = "rbd-db"
)
View Source
var ErrNoDBEndpoints = errors.New("no ready endpoints for DB were found")

ErrNoDBEndpoints -

View Source
var ErrV1beta1MetricsExists = errors.New("v1beta1.metrics.k8s.io already exists")

ErrV1beta1MetricsExists -

View Source
var EtcdName = "rbd-etcd"

EtcdName name for rbd-etcd.

View Source
var EventLogName = "rbd-eventlog"

EventLogName name for rbd-eventlog.

View Source
var GatewayName = "rbd-gateway"

GatewayName name for rbd-gateway.

View Source
var HubName = "rbd-hub"

HubName name

View Source
var MQName = "rbd-mq"

MQName name for rbd-mq

View Source
var MetricsServerName = "metrics-server"

MetricsServerName name for metrics-server

View Source
var MonitorName = "rbd-monitor"

MonitorName name for rbd-monitor.

View Source
var NFSName = "nfs-provisioner"

NFSName name for nfs provisioner

View Source
var NodeName = "rbd-node"

NodeName name for rbd-node

View Source
var RepoName = "rbd-repo"

RepoName name for rbd-repo.

View Source
var WebCliName = "rbd-webcli"

WebCliName name for rbd-webcli.

View Source
var WorkerName = "rbd-worker"

WorkerName name for rbd-worker.

Functions

func IsIgnoreError

func IsIgnoreError(err error) bool

IsIgnoreError check if the given err is IgnoreError.

func IsRainbondVolumeNotFound

func IsRainbondVolumeNotFound(e error) bool

IsRainbondVolumeNotFound checks if the given error is RainbondVolumeNotFound.

func LabelsForRainbondComponent

func LabelsForRainbondComponent(cpt *rainbondv1alpha1.RbdComponent) map[string]string

LabelsForRainbondComponent returns the labels for the sub resources of rbdcomponent.

Types

type ComponentHandler

type ComponentHandler interface {
	// Before will do something before creating component, such as checking the prerequisites, etc.
	Before() error
	Resources() []interface{}
	After() error
	ListPods() ([]corev1.Pod, error)
}

ComponentHandler will check the prerequisites, create resources for rbdcomponent.

func NewAPI

NewAPI new api handle

func NewAliyunCSIDiskPlugin

func NewAliyunCSIDiskPlugin(ctx context.Context, client client.Client, component *rainbondv1alpha1.RbdComponent, cluster *rainbondv1alpha1.RainbondCluster) ComponentHandler

NewAliyunCSIDiskPlugin creates a new aliyun csi disk plugin handler.

func NewAliyunCSINasPlugin

func NewAliyunCSINasPlugin(ctx context.Context, client client.Client, component *rainbondv1alpha1.RbdComponent, cluster *rainbondv1alpha1.RainbondCluster) ComponentHandler

NewAliyunCSINasPlugin creates a new aliyun csi nas plugin handler.

func NewAliyunCSINasProvisioner

func NewAliyunCSINasProvisioner(ctx context.Context, client client.Client, component *rainbondv1alpha1.RbdComponent, cluster *rainbondv1alpha1.RainbondCluster) ComponentHandler

NewAliyunCSINasProvisioner creates a new aliyun csi nas provisioner handler.

func NewAppUI

NewAppUI creates a new rbd-app-ui handler.

func NewChaos

NewChaos creates a new rbd-chaos handler.

func NewDB

NewDB new db

func NewETCD

NewETCD creates a new rbd-etcd handler.

func NewEventLog

NewEventLog creates a new rbd-eventlog handler.

func NewGateway

NewGateway returns a new rbd-gateway handler.

func NewHub

NewHub nw hub

func NewMQ

NewMQ creates a new rbd-mq handler.

func NewMetricsServer

NewMetricsServer creates a new metrics-server handler

func NewMonitor

NewMonitor returns a new rbd-monitor handler.

func NewNFS

NewNFS creates a new rbd-nfs handler.

func NewNode

NewNode creates a new rbd-node handler.

func NewRepo

NewRepo creates a new rbd-repo hanlder.

func NewWebCli

NewWebCli creates a new rbd-webcli handler.

func NewWorker

NewWorker creates a new rbd-worker hanlder.

func NewaliyunCSIDiskProvisioner

func NewaliyunCSIDiskProvisioner(ctx context.Context, client client.Client, component *rainbondv1alpha1.RbdComponent, cluster *rainbondv1alpha1.RainbondCluster) ComponentHandler

NewaliyunCSIDiskProvisioner creates a new aliyun csi disk provisioner handler.

type IgnoreError

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

IgnoreError is the error with ignore by rbdcomponent controller.

func NewIgnoreError

func NewIgnoreError(msg string) *IgnoreError

NewIgnoreError creates a new IgnoreError

func (*IgnoreError) Error

func (i *IgnoreError) Error() string

type K8sResourcesInterface

type K8sResourcesInterface interface {
	// returns the resources that should be created if not exists
	ResourcesCreateIfNotExists() []interface{}
}

K8sResourcesInterface provides methods to create or update k8s resources, such as deployment, daemonset, etc.

type Replicaser

type Replicaser interface {
	// return replicas for rbdcomponent.
	Replicas() *int32
}

Replicaser provides methods to get replicas for rbdcomponent. This interface is generally used when the actual number of component is different from the spec definition.

type StorageClassRWOer

type StorageClassRWOer interface {
	SetStorageClassNameRWO(pvcParameters *pvcParameters)
}

StorageClassRWOer provides methods to setup storageclass with access mode RWO for rbdcomponent.

type StorageClassRWXer

type StorageClassRWXer interface {
	SetStorageClassNameRWX(pvcParameters *pvcParameters)
}

StorageClassRWXer provides methods to setup storageclass with access mode RWX for rbdcomponent.

Jump to

Keyboard shortcuts

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