cloud

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRegionID added in v0.24.0

func GetRegionID() ([]string, error)

GetRegionID get region id of aws

Types

type AWS added in v0.24.0

type AWS struct {
	AccessKeyID     string
	AccessKeySecret string
	RegionID        string
}

AWS struct of aws cloud

func (*AWS) GetKubeConfigObj added in v0.24.0

func (a *AWS) GetKubeConfigObj(clusterID string) (*clientcmdapi.Config, error)

GetKubeConfigObj get aws eks kubeConfig file

func (*AWS) ListCluster added in v0.24.0

func (a *AWS) ListCluster() (clusters []ClusterInfo, err error)

ListCluster list cluster info of aws

type AliCloud

type AliCloud struct {
	AccessKeyID     string
	AccessKeySecret string
}

AliCloud struct of alibaba cloud

func (*AliCloud) GetKubeConfig

func (a *AliCloud) GetKubeConfig(clusterID string) (string, error)

GetKubeConfig get kubeConfig file

func (*AliCloud) GetRegionID added in v0.16.1

func (a *AliCloud) GetRegionID() ([]string, error)

GetRegionID get region id of ack cluster

func (*AliCloud) ListCluster

func (a *AliCloud) ListCluster() (clusters []ClusterInfo, err error)

ListCluster list cluster info

type Azure added in v0.25.0

type Azure struct {
	AuthMode       AzureAuth
	ClientID       string
	ClientSecret   string
	SubscriptionID string
	TenantID       string
	ObjectID       string
	// contains filtered or unexported fields
}

Azure struct of azure cloud

func (*Azure) GetAdminKubeConfig added in v0.29.0

func (a *Azure) GetAdminKubeConfig(clusterName, resourceGroupName string) ([]byte, error)

GetAdminKubeConfig get kubeConfig file

func (*Azure) GetKubeConfig added in v0.25.0

func (a *Azure) GetKubeConfig(clusterName, resourceGroupName string) ([]byte, error)

GetKubeConfig get kubeConfig file

func (*Azure) ListCluster added in v0.25.0

func (a *Azure) ListCluster(subscription AzureSubscription) (clusters []ClusterInfo, err error)

ListCluster list cluster info

func (*Azure) ListSubscriptions added in v0.29.0

func (a *Azure) ListSubscriptions() (subscription []AzureSubscription, err error)

ListSubscriptions list subscriptions

type AzureAuth added in v0.29.0

type AzureAuth int
const (
	AuthModeDefault AzureAuth = iota
	AuthModeServicePrincipal
)

type AzureSubscription added in v0.29.0

type AzureSubscription struct {
	ID          string
	DisplayName string
}

type Cluster

type Cluster interface {
	GetRegionID() ([]string, error)
	ListCluster() (clusters []ClusterInfo, err error)
	GetKubeConfig(clusterID string) (kubeconfig string, err error)
}

Cluster interface of cloud k8s cluster

type ClusterInfo

type ClusterInfo struct {
	Name       string
	Account    string
	ID         string
	RegionID   string
	K8sVersion string
	ConsoleURL string
}

ClusterInfo ack cluster info

type Rancher added in v0.17.0

type Rancher struct {
	ServerURL string
	APIKey    string
}

Rancher struct of rancher

func (*Rancher) GetKubeConfig added in v0.17.0

func (r *Rancher) GetKubeConfig(clusterID string) (string, error)

GetKubeConfig get kubeConfig file

func (*Rancher) GetRegionID added in v0.17.0

func (r *Rancher) GetRegionID() ([]string, error)

GetRegionID get region id of rancher cluster

func (*Rancher) ListCluster added in v0.17.0

func (r *Rancher) ListCluster() (clusters []ClusterInfo, err error)

ListCluster list cluster info

type TencentCloud added in v0.16.1

type TencentCloud struct {
	SecretID  string
	SecretKey string
	RegionID  string
}

TencentCloud struct of tencent cloud

func (*TencentCloud) GetKubeConfig added in v0.16.1

func (t *TencentCloud) GetKubeConfig(clusterID string) (string, error)

GetKubeConfig get tke kubeConfig file

func (*TencentCloud) GetRegionID added in v0.16.1

func (t *TencentCloud) GetRegionID() ([]string, error)

GetRegionID get region id of tke cluster

func (*TencentCloud) ListCluster added in v0.16.1

func (t *TencentCloud) ListCluster() (clusters []ClusterInfo, err error)

ListCluster list tke cluster info

Jump to

Keyboard shortcuts

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