Fill in Default Values for CPU/Memory (#130)

Update k8s client and the dependencies
ACI client change for Mocking
Add ACI Provider Mock Tests
Add the Windows development environment
Add UT for Default Resource Requests
Enable the make test in Docker file
Update the vendors
This commit is contained in:
Robbie Zhang
2018-04-16 10:31:16 -07:00
committed by GitHub
parent 88bafc701b
commit 2b85b0d1df
862 changed files with 61483 additions and 16781 deletions

View File

@@ -9,7 +9,7 @@ import (
const (
// BaseURI is the default URI used for compute services.
BaseURI = "https://management.azure.com"
baseURI = "https://management.azure.com"
userAgent = "virtual-kubelet/azure-arm-aci/2018-02-01"
apiVersion = "2018-02-01-preview"
@@ -34,7 +34,7 @@ func NewClient(auth *azure.Authentication) (*Client, error) {
return nil, fmt.Errorf("Authentication is not supplied for the Azure client")
}
client, err := azure.NewClient(auth, BaseURI, userAgent)
client, err := azure.NewClient(auth, baseURI, userAgent)
if err != nil {
return nil, fmt.Errorf("Creating Azure client failed: %v", err)
}

View File

@@ -20,7 +20,7 @@ func (c *Client) CreateContainerGroup(resourceGroup, containerGroupName string,
}
// Create the url.
uri := api.ResolveRelative(BaseURI, containerGroupURLPath)
uri := api.ResolveRelative(c.auth.ResourceManagerEndpoint, containerGroupURLPath)
uri += "?" + url.Values(urlParams).Encode()
// Create the body for the request.

View File

@@ -17,7 +17,7 @@ func (c *Client) DeleteContainerGroup(resourceGroup, containerGroupName string)
}
// Create the url.
uri := api.ResolveRelative(BaseURI, containerGroupURLPath)
uri := api.ResolveRelative(c.auth.ResourceManagerEndpoint, containerGroupURLPath)
uri += "?" + url.Values(urlParams).Encode()
// Create the request.

View File

@@ -19,7 +19,7 @@ func (c *Client) GetContainerGroup(resourceGroup, containerGroupName string) (*C
}
// Create the url.
uri := api.ResolveRelative(BaseURI, containerGroupURLPath)
uri := api.ResolveRelative(c.auth.ResourceManagerEndpoint, containerGroupURLPath)
uri += "?" + url.Values(urlParams).Encode()
// Create the request.

View File

@@ -22,10 +22,10 @@ func (c *Client) ListContainerGroups(resourceGroup string) (*ContainerGroupListR
}
// Create the url.
uri := api.ResolveRelative(BaseURI, containerGroupListURLPath)
uri := api.ResolveRelative(c.auth.ResourceManagerEndpoint, containerGroupListURLPath)
// List by resource group if they passed one.
if resourceGroup != "" {
uri = api.ResolveRelative(BaseURI, containerGroupListByResourceGroupURLPath)
uri = api.ResolveRelative(c.auth.ResourceManagerEndpoint, containerGroupListByResourceGroupURLPath)
}
uri += "?" + url.Values(urlParams).Encode()

View File

@@ -20,7 +20,7 @@ func (c *Client) GetContainerLogs(resourceGroup, containerGroupName, containerNa
}
// Create the url.
uri := api.ResolveRelative(BaseURI, containerLogsURLPath)
uri := api.ResolveRelative(c.auth.ResourceManagerEndpoint, containerLogsURLPath)
uri += "?" + url.Values(urlParams).Encode()
// Create the request.