v1

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2020 License: LGPL-3.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

View Source
const (
	//ComponentStatusRunning running
	ComponentStatusRunning = "Running"
	// ComponentStatusIniting initing
	ComponentStatusIniting = "Initing"
	//ComponentStatusCreating creating
	ComponentStatusCreating = "Creating"
	// ComponentStatusTerminating terminal
	ComponentStatusTerminating = "Terminating" // TODO fanyangyang have not found this case
	// ComponentStatusFailed failed
	ComponentStatusFailed = "Failed"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AliyunCloudDiskCSIPluginSource

type AliyunCloudDiskCSIPluginSource struct {
	// The AccessKey ID provided by Alibaba Cloud for access control.
	AccessKeyID string `json:"accessKeyID"`
	// The AccessKey Secret provided by Alibaba Cloud for access control
	AccessKeySecret string `json:"accessKeySecret"`

	MaxVolumePerNode int `json:"maxVolumePerNode" binding:"lt=16"`
}

AliyunCloudDiskCSIPluginSource represents a aliyun cloud disk CSI plugin. More info: https://github.com/kubernetes-sigs/alibaba-cloud-csi-driver/blob/master/docs/disk.md

type AliyunNasCSIPluginSource

type AliyunNasCSIPluginSource struct {
	// The AccessKey ID provided by Alibaba Cloud for access control.
	AccessKeyID string `json:"accessKeyID"`
	// The AccessKey Secret provided by Alibaba Cloud for access control
	AccessKeySecret string `json:"accessKeySecret"`
}

AliyunNasCSIPluginSource represents a aliyun cloud nas CSI plugin. More info: https://github.com/GLYASAI/alibaba-cloud-csi-driver/blob/master/docs/nas.md

type AvailableNodes

type AvailableNodes struct {
	// The nodes with user-specified labels.
	SpecifiedNodes []*K8sNode `json:"specifiedNodes,omitempty"`
	// A list of kubernetes master nodes.
	MasterNodes []*K8sNode `json:"masterNodes,omitempty"`
}

AvailableNodes contains nodes available for special rainbond components to run, such as rbd-gateway, rbd-chaos.

type CSIPluginSource

type CSIPluginSource struct {
	// AliyunCloudDiskCSIPluginSource represents a aliyun cloud disk CSI plugin.
	// More info: https://github.com/kubernetes-sigs/alibaba-cloud-csi-driver/blob/master/docs/disk.md
	AliyunCloudDisk *AliyunCloudDiskCSIPluginSource `json:"aliyunCloudDisk"`
	// AliyunNasCSIPluginSource represents a aliyun cloud nas CSI plugin.
	// More info: https://github.com/GLYASAI/alibaba-cloud-csi-driver/blob/master/docs/nas.md
	AliyunNas *AliyunNasCSIPluginSource `json:"aliyunNas"`
	// NFSCSIPluginSource represents a nfs CSI plugin.
	// More info: https://github.com/kubernetes-incubator/external-storage/tree/master/nfs
	NFS *NFSCSIPluginSource `json:"nfs,omitempty"`
}

CSIPluginSource represents the source of a csi driver to create. Only one of its members may be specified.

type ClusterInstallReq

type ClusterInstallReq struct {
	RainbondVolumes *RainbondVolumes `json:"rainbondVolumes" binding:"required"`
}

ClusterInstallReq -

type ClusterPreCheckCondition added in v1.3.0

type ClusterPreCheckCondition struct {
	Type    string `json:"type"`
	Status  string `json:"status"`
	Reason  string `json:"reason"`
	Message string `json:"message"`
}

ClusterPreCheckCondition -

type ClusterPreCheckResp added in v1.3.0

type ClusterPreCheckResp struct {
	Pass       bool                        `json:"pass"`
	Conditions []*ClusterPreCheckCondition `json:"conditions"`
}

ClusterPreCheckResp holds the response of cluster pre checking

type ClusterStatusInfo

type ClusterStatusInfo struct {
	// holds some recommend nodes available for rbd-gateway to run.
	GatewayAvailableNodes *AvailableNodes `json:"gatewayAvailableNodes"`
	// holds some recommend nodes available for rbd-chaos to run.
	ChaosAvailableNodes *AvailableNodes `json:"chaosAvailableNodes"`
	StorageClasses      []*StorageClass `json:"storageClasses"`
}

ClusterStatusInfo holds the information of rainbondcluster status.

type ComponentStatus

type ComponentStatus string

ComponentStatus component status

type Database

type Database struct {
	Host     string `json:"host"`
	Port     int    `json:"port"`
	Username string `json:"username"`
	Password string `json:"password"`
}

Database defines the connection information of database.

type EtcdCertInfo

type EtcdCertInfo struct {
	CaFile   string `json:"caFile"`
	CertFile string `json:"certFile"`
	KeyFile  string `json:"keyFile"`
}

EtcdCertInfo etcd cert info

type EtcdConfig

type EtcdConfig struct {
	// Endpoints is a list of URLs.
	Endpoints []string `json:"endpoints"`
	// Secret to mount to read certificate files for tls.
	CertInfo *EtcdCertInfo `json:"certInfo"`
}

EtcdConfig defines the configuration of etcd client.

type GlobalConfigs

type GlobalConfigs struct {
	// Enable highly available installation, otherwise use all-in-one mode
	EnableHA          bool       `json:"enableHA"`
	ImageHub          ImageHub   `json:"imageHub"`
	RegionDatabase    Database   `json:"regionDatabase"`
	UIDatabase        Database   `json:"uiDatabase"`
	EtcdConfig        EtcdConfig `json:"etcdConfig"`
	HTTPDomain        string     `json:"HTTPDomain"`
	GatewayIngressIPs []string   `json:"gatewayIngressIPs"`
	NodesForGateways  []*K8sNode `json:"nodesForGateway" binding:"required,dive,required"`
	NodesForChaos     []*K8sNode `json:"nodesForChaos" binding:"required,dive,required"`

	RainbondVolumes RainbondVolumes `json:"rainbondVolumes" binding:"required,dive,required"`
}

GlobalConfigs check result

type ImageHub

type ImageHub struct {
	Domain    string `json:"domain"`
	Namespace string `json:"namespace"`
	Username  string `json:"username"`
	Password  string `json:"password"`
}

ImageHub image hub

type K8sNode

type K8sNode struct {
	Name       string `json:"name"`
	InternalIP string `json:"internalIP" binding:"required,ipv4"`
	ExternalIP string `json:"externalIP"`
}

K8sNode holds the information about a kubernetes node.

type NFSCSIPluginSource

type NFSCSIPluginSource struct {
}

NFSCSIPluginSource represents a nfs CSI plugin. More info: https://github.com/kubernetes-incubator/external-storage/tree/master/nfs

type PodContainerStatus

type PodContainerStatus struct {
	ContainerID string `json:"containerID"`
	Image       string `json:"image"`
	// Specifies whether the container has passed its readiness probe.
	Ready   bool   `json:"ready"`
	State   string `json:"state"`
	Reason  string `json:"reason"`
	Message string `json:"message"`
}

PodContainerStatus -

type PodStatus

type PodStatus struct {
	Name              string               `json:"name"`
	Phase             string               `json:"phase"`
	HostIP            string               `json:"hostIP"`
	Reason            string               `json:"reason"`
	Message           string               `json:"message"`
	ContainerStatuses []PodContainerStatus `json:"container_statuses"`
}

PodStatus represents information about the status of a pod, which belongs to RbdComponent.

type RainbondVolume

type RainbondVolume struct {
	// Specify the name of the storageClass directly
	StorageClassName string `json:"storageClassName"`
	// Specify the storageClass parameter to directly create the corresponding StorageClass
	StorageClassParameters *StorageClassParameters `json:"storageClassParameters"`

	CSIPlugin *CSIPluginSource `json:"csiPlugin"`
}

RainbondVolume -

type RainbondVolumes

type RainbondVolumes struct {
	RWX *RainbondVolume `json:"RWX" binding:"required"`
	RWO *RainbondVolume `json:"RWO"`
}

RainbondVolumes contains information about rainbondvolume, including RWX and RWO. Used to prepare StorageClass for rainbond application.

type RbdComponentStatus

type RbdComponentStatus struct {
	Name string `json:"name"`

	// Total number of non-terminated pods targeted by this deployment (their labels match the selector).
	// +optional
	Replicas int32 `json:"replicas"`

	// Total number of ready pods targeted by this deployment.
	// +optional
	ReadyReplicas int32 `json:"readyReplicas"`

	Status          ComponentStatus `json:"status"` //translate pod status to component status
	Message         string          `json:"message"`
	Reason          string          `json:"reason"`
	ISInitComponent bool            `json:"isInitComponent"`

	PodStatuses []PodStatus `json:"podStatus"`
}

RbdComponentStatus rainbond component status

type RbdComponentStatusList

type RbdComponentStatusList []*RbdComponentStatus

RbdComponentStatusList list of rbdComponentStatus implement sort

func (RbdComponentStatusList) Len

func (l RbdComponentStatusList) Len() int

Len len of rbdComponentStatusList

func (RbdComponentStatusList) Less

func (l RbdComponentStatusList) Less(i, j int) bool

Less list i is less list j or not

func (RbdComponentStatusList) Swap

func (l RbdComponentStatusList) Swap(i, j int)

Swap swap list i and j

type StorageClass

type StorageClass struct {
	Name        string `json:"name"`
	Provisioner string `json:"provisioner"`
	AccessMode  string `json:"accessMode"`
}

StorageClass is a List of StorageCass available in the cluster. StorageClass storage class

type StorageClassParameters

type StorageClassParameters struct {
	MountOptions []string `json:"mountOptions"`

	// Provisioner indicates the type of the provisioner.
	Provisioner string `json:"provisioner"`
	// Parameters holds the parameters for the provisioner that should
	// create volumes of this storage class.
	// +optional
	Parameters map[string]string `json:"parameters"`
}

StorageClassParameters describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.

type UpdateGatewayIPReq added in v1.3.0

type UpdateGatewayIPReq struct {
	GatewayIP string `json:"gatewayIP"`
}

ClusterPreCheckCondition -

type UpgradeReq added in v1.3.0

type UpgradeReq struct {
	Version string `json:"version" binding:"required"`
}

UpgradeReq -

type UpgradeVersionsResp added in v1.3.0

type UpgradeVersionsResp struct {
	CurrentVersion      string   `json:"currentVersion"`
	UpgradeableVersions []string `json:"upgradeableVersions"`
}

UpgradeVersionsResp -

Jump to

Keyboard shortcuts

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