[hyper-provider] 1.fix hyper.NewClient 2.add instanceType 3.fix incrementRefCounters and decrementRefCounters

This commit is contained in:
Jimmy Xu
2017-12-17 22:48:29 +08:00
parent 57996b44c4
commit b870ac2eaa
3 changed files with 63 additions and 13 deletions

View File

@@ -4,8 +4,8 @@ import (
"fmt"
"io"
"github.com/virtual-kubelet/virtual-kubelet/providers"
"github.com/BurntSushi/toml"
"github.com/virtual-kubelet/virtual-kubelet/providers"
)
type providerConfig struct {
@@ -15,6 +15,7 @@ type providerConfig struct {
OperatingSystem string
CPU string
Memory string
InstanceType string
Pods string
}
@@ -27,6 +28,11 @@ func (p *HyperProvider) loadConfig(r io.Reader) error {
p.accessKey = config.AccessKey
p.secretKey = config.SecretKey
p.instanceType = "s4"
if config.InstanceType != "" {
p.instanceType = config.InstanceType
}
// Default to 20 mcpu
p.cpu = "20"
if config.CPU != "" {