service

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TagNameKubernetesClusterPrefix is the tag name we use to differentiate multiple
	// logically independent clusters running in the same AZ.
	// tag format: kubernetes.io/cluster/<clusterID> = shared|owned
	// The tag key = TagNameKubernetesClusterPrefix + clusterID
	// The tag value is an ownership value
	TagNameKubernetesClusterPrefix = "kubernetes.io/cluster/"

	// ResourceLifecycleOwned is the value we use when tagging resources to indicate
	// that the resource is considered owned and managed by the cluster,
	// and in particular that the lifecycle is tied to the lifecycle of the cluster.
	ResourceLifecycleOwned = "owned"
)

Imported from cloud-provider-aws/pkg/providers/v2/tags.go

View Source
const (
	GCP_IMAGE_ID     = "https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-1804-bionic-v20201014"
	AZURE_IMAGE_ID   = "Canonical:UbuntuServer:18.04-LTS:latest"
	ALIBABA_IMAGE_ID = "ubuntu_18_04_x64_20G_alibase_20210521.vhd"
	TENCENT_IMAGE_ID = "img-pi0ii46r"
	CLOUDIT_IMAGE_ID = "ac2696a8-ecf7-4aab-bfbf-9ab5f3256ca2"
	NCPVPC_IMAGE_ID  = "SW.VSVR.OS.LNX64.UBNTU.SVR1804.B050"
	NCP_IMAGE_ID     = "SPSW0LINUX000130"
)

Variables

This section is empty.

Functions

func AddNode

func AddNode(namespace string, clusterName string, req *app.NodeReq) (*model.NodeList, error)

add a node

func CreateCluster

func CreateCluster(namespace string, req *app.ClusterReq) (*model.Cluster, error)

create a cluster

func DeleteCluster

func DeleteCluster(namespace string, clusterName string) (*app.Status, error)

delete a cluster

func GetCluster

func GetCluster(namespace string, clusterName string) (*model.Cluster, error)

get a cluster

func GetNode

func GetNode(namespace string, clusterName string, nodeName string) (*model.Node, error)

get a node

func ListCluster

func ListCluster(namespace string) (*model.ClusterList, error)

get clusters

func ListNode

func ListNode(namespace string, clusterName string) (*model.NodeList, error)

get nodes

func RemoveNode

func RemoveNode(namespace string, clusterName string, nodeName string) (*app.Status, error)

remove a node

Types

type MCIR added in v0.7.2

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

func NewMCIR added in v0.7.2

func NewMCIR(namespace string, role app.ROLE, nodeSetReq app.NodeSetReq) *MCIR

func (*MCIR) CreateIfNotExist added in v0.7.2

func (self *MCIR) CreateIfNotExist() (model.ClusterReason, string)

create a MCIR (vpc, firewall, ssk-key, vm-spec, vm-image) if there is not exist

func (*MCIR) NewNLB added in v0.7.2

func (self *MCIR) NewNLB(namespace string, mcisName string, groupId string) tumblebug.NLB

func (*MCIR) NewVM added in v0.7.2

func (self *MCIR) NewVM(namespace string, name string, mcisName string, vmCount string, diskType string, diskSize string) tumblebug.VM

new a VM template

type SpecList added in v0.7.2

type SpecList struct {
	Kind    string    `json:"kind"`
	Config  string    `json:"connectionName"`
	Vmspecs []Vmspecs `json:"items"`
}

func VerifySpecList added in v0.7.2

func VerifySpecList(configName string, controlPlane string, cpumin int, cpumax int, memorymin int, memorymax int) (SpecList, error)

type Vmspecs added in v0.7.2

type Vmspecs struct {
	Name   string `json:"name"`   // output
	Memory string `json:"memory"` // output
	CPU    struct {
		Count string `json:"count"` // output
		Clock string `json:"clock"` // output - GHz
	} `json:"cpu"`
}

Jump to

Keyboard shortcuts

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