Documentation ¶
Index ¶
- Constants
- Variables
- func CloudPodSpec2EKSPriceRequest(spec spec.CloudPodSpec) *tke.GetPriceRequest
- func EKSPodCpuType(pod *v1.Pod) string
- func EKSPodCpuValue(pod *v1.Pod) (bool, string)
- func EKSPodGpuCount(pod *v1.Pod) (bool, string)
- func EKSPodGpuType(pod *v1.Pod) (bool, string)
- func EKSPodMemValue(pod *v1.Pod) (bool, string)
- func NewTencentCloud(qcloudConf *qcloudsdk.QCloudClientConfig, config *cloud.PriceConfig, ...) cloud.Cloud
- func ParseID(id string) string
- type ClientProfile
- type CloudConfig
- type Credentials
- type EKSPlatform
- type Pod2EKSSpecConverter
- type PriceStageFeeUnit
- type TKEPlatform
- type TencentCloud
- func (tc *TencentCloud) GetConfig() (*cloud.CustomPricing, error)
- func (pc *TencentCloud) GetInstancePrice(instanceid string) *sdkcvm.QCloudInstancePrice
- func (tc *TencentCloud) GetKey(node *v1.Node) *qcloudKey
- func (tc *TencentCloud) GetNodesCost() (map[string]*cloud.Node, error)
- func (tc *TencentCloud) GetNodesPricing() (map[string]*cloud.Price, error)
- func (tc *TencentCloud) GetPodsCost() (map[string]*cloud.Pod, error)
- func (tc *TencentCloud) IsServerlessPod(pod *v1.Pod) bool
- func (tc *TencentCloud) IsVirtualNode(node *v1.Node) bool
- func (tc *TencentCloud) Node2Spec(node *v1.Node) spec.CloudNodeSpec
- func (tc *TencentCloud) NodePrice(spec spec.CloudNodeSpec) (*cloud.Node, error)
- func (pc *TencentCloud) OnNodeAdd(node *v1.Node) error
- func (pc *TencentCloud) OnNodeDelete(node *v1.Node) error
- func (pc *TencentCloud) OnNodeUpdate(old, new *v1.Node) error
- func (q *TencentCloud) PlatformPrice(cp cloud.PlatformParameter) *cloud.Prices
- func (tc *TencentCloud) Pod2ServerlessSpec(pod *v1.Pod) spec.CloudPodSpec
- func (tc *TencentCloud) Pod2Spec(pod *v1.Pod) spec.CloudPodSpec
- func (tc *TencentCloud) PodPrice(spec spec.CloudPodSpec) (*cloud.Pod, error)
- func (pc *TencentCloud) Refresh()
- func (tc *TencentCloud) ServerlessPodPrice(spec spec.CloudPodSpec) (*cloud.Pod, error)
- func (tc *TencentCloud) UpdateConfigFromConfigMap(conf map[string]string) (*cloud.CustomPricing, error)
- func (tc *TencentCloud) WarmUp() error
Constants ¶
View Source
const ( // https://cloud.tencent.com/document/product/457/53030 ValueNodeTypeEKLet = "eklet" EKSAnnoCpuType = "eks.tke.cloud.tencent.com/cpu-type" EKSAnnoCpuQuantity = "eks.tke.cloud.tencent.com/cpu" EKSAnnoMemQuantity = "eks.tke.cloud.tencent.com/mem" EKSAnnoGpuType = "eks.tke.cloud.tencent.com/gpu-type" EKSAnnoGpuCount = "eks.tke.cloud.tencent.com/gpu-count" EKSCpuTypeValue_Intel = "intel" )
Variables ¶
View Source
var QCloudProviderIdRegex = regexp.MustCompile("qcloud:///([^/]+)/([^/]+)") // It's of the form qcloud:///800005/ins-2jv4wpmr and we want ins-2jv4wpmr, if it exists
Functions ¶
func CloudPodSpec2EKSPriceRequest ¶
func CloudPodSpec2EKSPriceRequest(spec spec.CloudPodSpec) *tke.GetPriceRequest
func EKSPodCpuType ¶
func NewTencentCloud ¶
func NewTencentCloud(qcloudConf *qcloudsdk.QCloudClientConfig, config *cloud.PriceConfig, cache cache.Cache) cloud.Cloud
Types ¶
type ClientProfile ¶
type CloudConfig ¶
type CloudConfig struct { Credentials `name:"credentials" value:"optional"` ClientProfile `name:"clientProfile" value:"optional"` }
type Credentials ¶
Credentials use user defined SecretId and SecretKey
type EKSPlatform ¶
type EKSPlatform struct { }
func (*EKSPlatform) PlatformCost ¶
func (ep *EKSPlatform) PlatformCost(cp cloud.PlatformParameter) *cloud.Prices
no platform cost now for eks
type Pod2EKSSpecConverter ¶
type Pod2EKSSpecConverter interface {
Pod2EKSSpecConverter(pod *v1.Pod) (v1.ResourceList, error)
}
type PriceStageFeeUnit ¶
type TKEPlatform ¶
type TKEPlatform struct { }
func (*TKEPlatform) PlatformCost ¶
func (tp *TKEPlatform) PlatformCost(cp cloud.PlatformParameter) *cloud.Prices
type TencentCloud ¶
type TencentCloud struct {
// contains filtered or unexported fields
}
func (*TencentCloud) GetConfig ¶
func (tc *TencentCloud) GetConfig() (*cloud.CustomPricing, error)
GetConfig return CustomPricing
func (*TencentCloud) GetInstancePrice ¶
func (pc *TencentCloud) GetInstancePrice(instanceid string) *sdkcvm.QCloudInstancePrice
func (*TencentCloud) GetKey ¶
func (tc *TencentCloud) GetKey(node *v1.Node) *qcloudKey
func (*TencentCloud) GetNodesCost ¶
func (tc *TencentCloud) GetNodesCost() (map[string]*cloud.Node, error)
func (*TencentCloud) GetNodesPricing ¶
func (tc *TencentCloud) GetNodesPricing() (map[string]*cloud.Price, error)
func (*TencentCloud) GetPodsCost ¶
func (tc *TencentCloud) GetPodsCost() (map[string]*cloud.Pod, error)
func (*TencentCloud) IsServerlessPod ¶
func (tc *TencentCloud) IsServerlessPod(pod *v1.Pod) bool
func (*TencentCloud) IsVirtualNode ¶
func (tc *TencentCloud) IsVirtualNode(node *v1.Node) bool
func (*TencentCloud) Node2Spec ¶
func (tc *TencentCloud) Node2Spec(node *v1.Node) spec.CloudNodeSpec
func (*TencentCloud) NodePrice ¶
func (tc *TencentCloud) NodePrice(spec spec.CloudNodeSpec) (*cloud.Node, error)
func (*TencentCloud) OnNodeDelete ¶
func (pc *TencentCloud) OnNodeDelete(node *v1.Node) error
func (*TencentCloud) OnNodeUpdate ¶
func (pc *TencentCloud) OnNodeUpdate(old, new *v1.Node) error
func (*TencentCloud) PlatformPrice ¶
func (q *TencentCloud) PlatformPrice(cp cloud.PlatformParameter) *cloud.Prices
func (*TencentCloud) Pod2ServerlessSpec ¶
func (tc *TencentCloud) Pod2ServerlessSpec(pod *v1.Pod) spec.CloudPodSpec
convert pod to serverless pod spec, no matter the pod is in real node or virtual node.
func (*TencentCloud) Pod2Spec ¶
func (tc *TencentCloud) Pod2Spec(pod *v1.Pod) spec.CloudPodSpec
func (*TencentCloud) PodPrice ¶
func (tc *TencentCloud) PodPrice(spec spec.CloudPodSpec) (*cloud.Pod, error)
func (*TencentCloud) Refresh ¶
func (pc *TencentCloud) Refresh()
func (*TencentCloud) ServerlessPodPrice ¶
func (tc *TencentCloud) ServerlessPodPrice(spec spec.CloudPodSpec) (*cloud.Pod, error)
func (*TencentCloud) UpdateConfigFromConfigMap ¶
func (tc *TencentCloud) UpdateConfigFromConfigMap(conf map[string]string) (*cloud.CustomPricing, error)
UpdateConfigFromConfigMap update CustomPricing from configmap
func (*TencentCloud) WarmUp ¶
func (tc *TencentCloud) WarmUp() error
Click to show internal directories.
Click to hide internal directories.