Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
      View Source
      
  
    const ( GitRepoName = "cloud-provider" GitRepoURL = "https://github.com/apecloud/cloud-provider" )
      View Source
      
  
const ( Local = "local" AWS = "aws" AliCloud = "alicloud" Azure = "azure" GCP = "gcp" TencentCloud = "tencentcloud" )
Variables ¶
      View Source
      
  
    var ( // CliDockerNetwork is docker network for k3d cluster when `kbcli playground` // all cluster will be created in this network, so they can communicate with each other CliDockerNetwork = "k3d-kbcli-playground" // K3sImage is k3s image repo K3sImage = "rancher/k3s:" + version.K3sImageTag // K3dProxyImage is k3d proxy image repo K3dProxyImage = "docker.io/apecloud/k3d-proxy:" + version.K3dVersion // K3dFixEnv KBEnvFix fixes.K3DFixEnv = "KB_FIX_MOUNTS" )
      View Source
      
  
var (
	TFExecPath string
)
    Functions ¶
func CloudProviders ¶
func CloudProviders() []string
func K8sService ¶
Types ¶
type Interface ¶
type Interface interface {
	// Name returns the cloud provider name
	Name() string
	// CreateK8sCluster creates a kubernetes cluster
	CreateK8sCluster(clusterInfo *K8sClusterInfo) error
	// DeleteK8sCluster deletes the created kubernetes cluster
	DeleteK8sCluster(clusterInfo *K8sClusterInfo) error
	// GetClusterInfo gets cluster info
	GetClusterInfo() (*K8sClusterInfo, error)
}
    type K8sClusterInfo ¶
type K8sClusterInfo struct {
	ClusterName   string `json:"cluster_name"`
	CloudProvider string `json:"cloud_provider"`
	Region        string `json:"region,omitempty"`
	KubeConfig    string `json:"kube_config,omitempty"`
	KbcliVersion  string `json:"kbcli_version,omitempty"`
}
    K8sClusterInfo is the kubernetes cluster information for playground that will be serialized to a state file
func (*K8sClusterInfo) IsValid ¶
func (c *K8sClusterInfo) IsValid() bool
IsValid checks if kubernetes cluster info is valid
func (*K8sClusterInfo) String ¶
func (c *K8sClusterInfo) String() string
 Click to show internal directories. 
   Click to hide internal directories.