service

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

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"
)

Variables

This section is empty.

Functions

func AddNode

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

func CreateCluster

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

func DeleteCluster

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

func GetCSPName

func GetCSPName(providerName string) (config.CSP, error)

get CSP Name

func GetCluster

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

func GetControlPlaneIPs

func GetControlPlaneIPs(VMs []model.VM) []string

func GetNode

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

func GetRegionName

func GetRegionName(infoList []spider.KeyValue) string

get Region Name

func GetUserAccount

func GetUserAccount(csp config.CSP) string

get vm user account

func GetVmImageId

func GetVmImageId(csp config.CSP, configName string) (string, error)

get vm image-id

func ListCluster

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

func ListNode

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

func RemoveNode

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

Types

type NodeConfigInfo

type NodeConfigInfo struct {
	model.NodeConfig
	Csp     config.CSP `json:"csp"`
	Role    string     `json:"role"`
	Region  string     `json:"region"`
	Account string     `json:"account"`
}

func SetNodeConfigInfos

func SetNodeConfigInfos(nodeConfigs []model.NodeConfig, role string) ([]NodeConfigInfo, error)

func (*NodeConfigInfo) CreateFirewall

func (nodeConfigInfo *NodeConfigInfo) CreateFirewall(namespace string) (*tumblebug.Firewall, error)

func (*NodeConfigInfo) CreateImage

func (nodeConfigInfo *NodeConfigInfo) CreateImage(namespace string) (*tumblebug.Image, error)

func (*NodeConfigInfo) CreateSpec

func (nodeConfigInfo *NodeConfigInfo) CreateSpec(namespace string) (*tumblebug.Spec, error)

func (*NodeConfigInfo) CreateSshKey

func (nodeConfigInfo *NodeConfigInfo) CreateSshKey(namespace string) (*tumblebug.SSHKey, error)

func (*NodeConfigInfo) CreateVPC

func (nodeConfigInfo *NodeConfigInfo) CreateVPC(namespace string) (*tumblebug.VPC, error)

Jump to

Keyboard shortcuts

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