alibabacloud

package
v0.0.0-...-3bdca91 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultCreateClusterConfig = `` /* 1776-byte string literal not displayed */

const DefaultCreateClusterConfig = `{"name":"test-create","cluster_type":"ManagedKubernetes","disable_rollback":true,"timeout_mins":60,"kubernetes_version":"1.28.3-aliyun.1","region_id":"cn-hangzhou","snat_entry":true,"cloud_monitor_flags":true,"endpoint_public_access":true,"deletion_protection":true,"proxy_mode":"ipvs","cis_enable_risk_check":true,"tags":[],"timezone":"Asia/Shanghai","addons":[{"name":"security-inspector"},{"name":"terway-eniip","config":"{\"IPVlan\":\"false\",\"NetworkPolicy\":\"false\",\"ENITrunking\":\"false\"}"},{"name":"csi-plugin"},{"name":"csi-provisioner"},{"name":"storage-operator","config":"{\"CnfsOssEnable\":\"false\",\"CnfsNasEnable\":\"true\"}"},{"name":"logtail-ds","config":"{\"IngressDashboardEnabled\":\"true\"}"},{"name":"ack-node-problem-detector","config":"{\"sls_project_name\":\"\"}"},{"name":"nginx-ingress-controller","config":"{\"IngressSlbNetworkType\":\"internet\",\"IngressSlbSpec\":\"slb.s2.small\"}"},{"name":"ack-node-local-dns"},{"name":"arms-prometheus"},{"name":"alicloud-monitor-controller","config":"{\"group_contact_ids\":\"[41399]\"}"}],"cluster_spec":"ack.pro.small","os_type":"Linux","platform":"AliyunLinux","image_type":"AliyunLinux3","pod_vswitch_ids":["vsw-bp1njm4435ly60z7adj0j"],"runtime":{"name":"containerd","version":"1.6.20"},"charge_type":"PostPaid","vpcid":"vpc-bp1qoxk37f4wgf59e2avn","service_cidr":"172.16.0.0/16","vswitch_ids":["vsw-bp1njm4435ly60z7adj0j"],"ip_stack":"ipv4","key_pair":"packer_64899245-d623-9e4b-42ee-33ee5a81f84f","logging_type":"SLS","cpu_policy":"none","service_account_issuer":"https://kubernetes.default.svc","api_audiences":"https://kubernetes.default.svc","is_enterprise_security_group":true,"controlplane_log_ttl":"30","controlplane_log_components":["apiserver","kcm","scheduler","ccm","controlplane-events","alb"],"nodepools":[{"nodepool_info":{"name":"default-nodepool"},"scaling_group":{"vswitch_ids":["vsw-bp1njm4435ly60z7adj0j"],"system_disk_category":"cloud_essd","system_disk_size":120,"system_disk_performance_level":"PL0","system_disk_encrypted":false,"data_disks":[],"instance_types":["ecs.c6.xlarge"],"tags":[],"instance_charge_type":"PostPaid","soc_enabled":false,"cis_enabled":false,"key_pair":"packer_64899245-d623-9e4b-42ee-33ee5a81f84f","login_as_non_root":false,"security_group_ids":[],"platform":"AliyunLinux","image_id":"aliyun_3_x64_20G_alibase_20230727.vhd","image_type":"AliyunLinux3","desired_size":3,"rds_instances":[],"multi_az_policy":"BALANCE"},"kubernetes_config":{"cpu_policy":"none","cms_enabled":true,"unschedulable":false,"runtime":"containerd","runtime_version":"1.6.20"}}],"num_of_nodes":0}`

Variables

This section is empty.

Functions

func NewOpenAPIService

func NewOpenAPIService(cfg *CloudConfig) (openAPIService, error)

Types

type AlibabaCloudManager

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

func CreateAlibabaCloudManager

func CreateAlibabaCloudManager(cfg *CloudConfig) (manager *AlibabaCloudManager, err error)

func (*AlibabaCloudManager) CreateCluster

func (*AlibabaCloudManager) CreateGameServerLoadBalancer

func (am *AlibabaCloudManager) CreateGameServerLoadBalancer() (string, error)

func (*AlibabaCloudManager) CreateVpc

func (am *AlibabaCloudManager) CreateVpc(regionId string) (string, error)

func (*AlibabaCloudManager) CreateVswitched

func (am *AlibabaCloudManager) CreateVswitched(vpcId string, regionId string) ([]*string, error)

func (*AlibabaCloudManager) DeleteCluster

func (am *AlibabaCloudManager) DeleteCluster(clusterId string) error

func (*AlibabaCloudManager) GetCluster

func (am *AlibabaCloudManager) GetCluster(clusterId string) (cloudprovider.KubernetesCluster, error)

func (*AlibabaCloudManager) GetClusterState

func (am *AlibabaCloudManager) GetClusterState(clusterId string) (string, error)

func (*AlibabaCloudManager) GetKubernetesConfig

func (am *AlibabaCloudManager) GetKubernetesConfig(clusterId string) (*restclient.Config, error)

func (*AlibabaCloudManager) ListClusters

func (am *AlibabaCloudManager) ListClusters() ([]cloudprovider.KubernetesCluster, error)

type CloudConfig

type CloudConfig struct {
	RegionId        string
	AccessKeyID     string
	AccessKeySecret string
}

func (*CloudConfig) ApplyDefaults

func (cc *CloudConfig) ApplyDefaults()

func (*CloudConfig) GetRegion

func (cc *CloudConfig) GetRegion() string

func (*CloudConfig) IsValid

func (cc *CloudConfig) IsValid() bool

type ClusterConfig

type ClusterConfig struct {
	RegionId          string `json:"region_id"`
	Name              string `json:"name"`
	ClusterType       string `json:"cluster_type"`
	KubernetesVersion string `json:"kubernetes_version"`
	ChargeType        string

	// net
	SnatEntry            bool `json:"snat_entry"`
	EndpointPublicAccess bool
	ProxyMode            string
	VpcId                string `json:"vpc_id"`
	VswitchIds           string `json:"vswitch_ids"`
	PodVswitchIds        []string
	ServiceCidr          string
	IpStack              string

	// nodepool
	NodePools []NodePool
}

func (*ClusterConfig) Options

func (c *ClusterConfig) Options() map[string]string

type ManagedCluster

type ManagedCluster struct {
	Id     string
	Status string
}

func (*ManagedCluster) ClusterId

func (m *ManagedCluster) ClusterId() string

func (*ManagedCluster) Description

func (m *ManagedCluster) Description() string

func (*ManagedCluster) GetKubernetesConfig

func (m *ManagedCluster) GetKubernetesConfig() (*restclient.Config, error)

func (*ManagedCluster) Healthy

func (m *ManagedCluster) Healthy() (bool, error)

type NodePool

type NodePool struct {
	Name string
}

type ServerlessCluster

type ServerlessCluster struct {
	Id     string
	Status string
}

func (*ServerlessCluster) ClusterId

func (m *ServerlessCluster) ClusterId() string

func (*ServerlessCluster) Description

func (m *ServerlessCluster) Description() string

func (*ServerlessCluster) GetKubernetesConfig

func (m *ServerlessCluster) GetKubernetesConfig() (*restclient.Config, error)

func (*ServerlessCluster) Healthy

func (m *ServerlessCluster) Healthy() (bool, error)

Jump to

Keyboard shortcuts

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