Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
      View Source
      
  
    const ( GitRepoName = "cloud-provider" GitRepoURL = "https://github.com/apecloud/cloud-provider" )
      View Source
      
  
const ( Local = "local" AWS = "aws" )
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" // K3sImageDefault is k3s image repo K3sImageDefault = "rancher/k3s:" + version.K3sImageTag // K3dProxyImageDefault is k3d proxy image repo K3dProxyImageDefault = "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 K3dClusterInfo ¶ added in v1.0.0
type K3dClusterInfo struct {
	K3sImage      string `json:"k3s_image,omitempty"`
	K3dProxyImage string `json:"k3d_proxy_image,omitempty"`
}
    K3dClusterInfo is the k3d cluster information for playground
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"`
	K3dClusterInfo
}
    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.