Documentation ¶
Index ¶
- Constants
- Variables
- func IsIgnoreError(err error) bool
- func IsRainbondVolumeNotFound(e error) bool
- func LabelsForRainbondComponent(cpt *rainbondv1alpha1.RbdComponent) map[string]string
- type ComponentHandler
- func NewAPI(ctx context.Context, client client.Client, ...) ComponentHandler
- func NewAliyunCSIDiskPlugin(ctx context.Context, client client.Client, ...) ComponentHandler
- func NewAliyunCSINasPlugin(ctx context.Context, client client.Client, ...) ComponentHandler
- func NewAliyunCSINasProvisioner(ctx context.Context, client client.Client, ...) ComponentHandler
- func NewAppUI(ctx context.Context, client client.Client, ...) ComponentHandler
- func NewChaos(ctx context.Context, client client.Client, ...) ComponentHandler
- func NewDB(ctx context.Context, client client.Client, ...) ComponentHandler
- func NewETCD(ctx context.Context, client client.Client, ...) ComponentHandler
- func NewEventLog(ctx context.Context, client client.Client, ...) ComponentHandler
- func NewGateway(ctx context.Context, client client.Client, ...) ComponentHandler
- func NewHub(ctx context.Context, client client.Client, ...) ComponentHandler
- func NewMQ(ctx context.Context, client client.Client, ...) ComponentHandler
- func NewMetricsServer(ctx context.Context, client client.Client, ...) ComponentHandler
- func NewMonitor(ctx context.Context, client client.Client, ...) ComponentHandler
- func NewNFS(ctx context.Context, client client.Client, ...) ComponentHandler
- func NewNode(ctx context.Context, client client.Client, ...) ComponentHandler
- func NewRepo(ctx context.Context, client client.Client, ...) ComponentHandler
- func NewWebCli(ctx context.Context, client client.Client, ...) ComponentHandler
- func NewWorker(ctx context.Context, client client.Client, ...) ComponentHandler
- func NewaliyunCSIDiskProvisioner(ctx context.Context, client client.Client, ...) ComponentHandler
- type IgnoreError
- type K8sResourcesInterface
- type Replicaser
- type StorageClassRWOer
- type StorageClassRWXer
Constants ¶
const (
// EtcdSSLPath ssl file path for etcd
EtcdSSLPath = "/run/ssl/etcd"
)
Variables ¶
var APIName = "rbd-api"
APIName name
var AppUIName = "rbd-app-ui"
AppUIName name for rbd-app-ui resources.
var ChaosName = "rbd-chaos"
ChaosName name for rbd-chaos
var (
// DBName name
DBName = "rbd-db"
)
var ErrNoDBEndpoints = errors.New("no ready endpoints for DB were found")
ErrNoDBEndpoints -
var ErrV1beta1MetricsExists = errors.New("v1beta1.metrics.k8s.io already exists")
ErrV1beta1MetricsExists -
var EtcdName = "rbd-etcd"
EtcdName name for rbd-etcd.
var EventLogName = "rbd-eventlog"
EventLogName name for rbd-eventlog.
var GatewayName = "rbd-gateway"
GatewayName name for rbd-gateway.
var HubName = "rbd-hub"
HubName name
var MQName = "rbd-mq"
MQName name for rbd-mq
var MetricsServerName = "metrics-server"
MetricsServerName name for metrics-server
var MonitorName = "rbd-monitor"
MonitorName name for rbd-monitor.
var NFSName = "nfs-provisioner"
NFSName name for nfs provisioner
var NodeName = "rbd-node"
NodeName name for rbd-node
var RepoName = "rbd-repo"
RepoName name for rbd-repo.
var WebCliName = "rbd-webcli"
WebCliName name for rbd-webcli.
var WorkerName = "rbd-worker"
WorkerName name for rbd-worker.
Functions ¶
func IsIgnoreError ¶
IsIgnoreError check if the given err is IgnoreError.
func IsRainbondVolumeNotFound ¶
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 ¶
func NewAPI(ctx context.Context, client client.Client, component *rainbondv1alpha1.RbdComponent, cluster *rainbondv1alpha1.RainbondCluster) ComponentHandler
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 ¶
func NewAppUI(ctx context.Context, client client.Client, component *rainbondv1alpha1.RbdComponent, cluster *rainbondv1alpha1.RainbondCluster) ComponentHandler
NewAppUI creates a new rbd-app-ui handler.
func NewChaos ¶
func NewChaos(ctx context.Context, client client.Client, component *rainbondv1alpha1.RbdComponent, cluster *rainbondv1alpha1.RainbondCluster) ComponentHandler
NewChaos creates a new rbd-chaos handler.
func NewDB ¶
func NewDB(ctx context.Context, client client.Client, component *rainbondv1alpha1.RbdComponent, cluster *rainbondv1alpha1.RainbondCluster) ComponentHandler
NewDB new db
func NewETCD ¶
func NewETCD(ctx context.Context, client client.Client, component *rainbondv1alpha1.RbdComponent, cluster *rainbondv1alpha1.RainbondCluster) ComponentHandler
NewETCD creates a new rbd-etcd handler.
func NewEventLog ¶
func NewEventLog(ctx context.Context, client client.Client, component *rainbondv1alpha1.RbdComponent, cluster *rainbondv1alpha1.RainbondCluster) ComponentHandler
NewEventLog creates a new rbd-eventlog handler.
func NewGateway ¶
func NewGateway(ctx context.Context, client client.Client, component *rainbondv1alpha1.RbdComponent, cluster *rainbondv1alpha1.RainbondCluster) ComponentHandler
NewGateway returns a new rbd-gateway handler.
func NewHub ¶
func NewHub(ctx context.Context, client client.Client, component *rainbondv1alpha1.RbdComponent, cluster *rainbondv1alpha1.RainbondCluster) ComponentHandler
NewHub nw hub
func NewMQ ¶
func NewMQ(ctx context.Context, client client.Client, component *rainbondv1alpha1.RbdComponent, cluster *rainbondv1alpha1.RainbondCluster) ComponentHandler
NewMQ creates a new rbd-mq handler.
func NewMetricsServer ¶
func NewMetricsServer(ctx context.Context, client client.Client, component *rainbondv1alpha1.RbdComponent, cluster *rainbondv1alpha1.RainbondCluster) ComponentHandler
NewMetricsServer creates a new metrics-server handler
func NewMonitor ¶
func NewMonitor(ctx context.Context, client client.Client, component *rainbondv1alpha1.RbdComponent, cluster *rainbondv1alpha1.RainbondCluster) ComponentHandler
NewMonitor returns a new rbd-monitor handler.
func NewNFS ¶
func NewNFS(ctx context.Context, client client.Client, component *rainbondv1alpha1.RbdComponent, cluster *rainbondv1alpha1.RainbondCluster) ComponentHandler
NewNFS creates a new rbd-nfs handler.
func NewNode ¶
func NewNode(ctx context.Context, client client.Client, component *rainbondv1alpha1.RbdComponent, cluster *rainbondv1alpha1.RainbondCluster) ComponentHandler
NewNode creates a new rbd-node handler.
func NewRepo ¶
func NewRepo(ctx context.Context, client client.Client, component *rainbondv1alpha1.RbdComponent, cluster *rainbondv1alpha1.RainbondCluster) ComponentHandler
NewRepo creates a new rbd-repo hanlder.
func NewWebCli ¶
func NewWebCli(ctx context.Context, client client.Client, component *rainbondv1alpha1.RbdComponent, cluster *rainbondv1alpha1.RainbondCluster) ComponentHandler
NewWebCli creates a new rbd-webcli handler.
func NewWorker ¶
func NewWorker(ctx context.Context, client client.Client, component *rainbondv1alpha1.RbdComponent, cluster *rainbondv1alpha1.RainbondCluster) ComponentHandler
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.