azure-aci: github.com/virtual-kubelet/azure-aci Index | Files | Directories

package azure

import "github.com/virtual-kubelet/azure-aci"

Index

Package Files

aadMock.go aci.go aciMock.go acsCredential.go config.go errors.go metrics.go

type AADMock Uses

type AADMock struct {
    OnAcquireToken func(http.ResponseWriter, *http.Request)
    // contains filtered or unexported fields
}

AADMock implements a AAD mock server .

func NewAADMock Uses

func NewAADMock() *AADMock

NewAADMock creates a new AAD server mocker.

func (*AADMock) Close Uses

func (mock *AADMock) Close()

Close terminates the AAD server mocker.

func (*AADMock) GetServerURL Uses

func (mock *AADMock) GetServerURL() string

GetServerURL returns the mock server URL.

type ACIMock Uses

type ACIMock struct {
    OnCreate             func(string, string, string, *aci.ContainerGroup) (int, interface{})
    OnGetContainerGroups func(string, string) (int, interface{})
    OnGetContainerGroup  func(string, string, string) (int, interface{})
    OnGetRPManifest      func() (int, interface{})
    // contains filtered or unexported fields
}

ACIMock implements a Azure Container Instance mock server.

func NewACIMock Uses

func NewACIMock() *ACIMock

NewACIMock creates a new Azure Container Instance mock server.

func (*ACIMock) Close Uses

func (mock *ACIMock) Close()

Close terminates the Azure Container Instance mock server.

func (*ACIMock) GetServerURL Uses

func (mock *ACIMock) GetServerURL() string

GetServerURL returns the mock server URL.

type ACIProvider Uses

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

ACIProvider implements the virtual-kubelet provider interface and communicates with Azure's ACI APIs.

func NewACIProvider Uses

func NewACIProvider(config string, rm *manager.ResourceManager, nodeName, operatingSystem string, internalIP string, daemonEndpointPort int32) (*ACIProvider, error)

NewACIProvider creates a new ACIProvider.

func (*ACIProvider) ConfigureNode Uses

func (p *ACIProvider) ConfigureNode(ctx context.Context, node *v1.Node)

ConfigureNode enables a provider to configure the node object that will be used for Kubernetes.

func (*ACIProvider) CreatePod Uses

func (p *ACIProvider) CreatePod(ctx context.Context, pod *v1.Pod) error

CreatePod accepts a Pod definition and creates an ACI deployment

func (*ACIProvider) DeletePod Uses

func (p *ACIProvider) DeletePod(ctx context.Context, pod *v1.Pod) error

DeletePod deletes the specified pod out of ACI.

func (*ACIProvider) GetContainerLogs Uses

func (p *ACIProvider) GetContainerLogs(ctx context.Context, namespace, podName, containerName string, opts api.ContainerLogOpts) (io.ReadCloser, error)

GetContainerLogs returns the logs of a pod by name that is running inside ACI.

func (*ACIProvider) GetPod Uses

func (p *ACIProvider) GetPod(ctx context.Context, namespace, name string) (*v1.Pod, error)

GetPod returns a pod by name that is running inside ACI returns nil if a pod by that name is not found.

func (*ACIProvider) GetPodFullName Uses

func (p *ACIProvider) GetPodFullName(namespace string, pod string) string

GetPodFullName as defined in the provider context

func (*ACIProvider) GetPodStatus Uses

func (p *ACIProvider) GetPodStatus(ctx context.Context, namespace, name string) (*v1.PodStatus, error)

GetPodStatus returns the status of a pod by name that is running inside ACI returns nil if a pod by that name is not found.

func (*ACIProvider) GetPods Uses

func (p *ACIProvider) GetPods(ctx context.Context) ([]*v1.Pod, error)

GetPods returns a list of all pods known to be running within ACI.

func (*ACIProvider) GetStatsSummary Uses

func (p *ACIProvider) GetStatsSummary(ctx context.Context) (summary *stats.Summary, err error)

GetStatsSummary returns the stats summary for pods running on ACI

func (*ACIProvider) RunInContainer Uses

func (p *ACIProvider) RunInContainer(ctx context.Context, namespace, name, container string, cmd []string, attach api.AttachIO) error

RunInContainer executes a command in a container in the pod, copying data between in/out/err and the container's stdin/stdout/stderr.

func (*ACIProvider) UpdatePod Uses

func (p *ACIProvider) UpdatePod(ctx context.Context, pod *v1.Pod) error

UpdatePod is a noop, ACI currently does not support live updates of a pod.

type AcsCredential Uses

type AcsCredential struct {
    Cloud             string `json:"cloud"`
    TenantID          string `json:"tenantId"`
    SubscriptionID    string `json:"subscriptionId"`
    ClientID          string `json:"aadClientId"`
    ClientSecret      string `json:"aadClientSecret"`
    ResourceGroup     string `json:"resourceGroup"`
    Region            string `json:"location"`
    VNetName          string `json:"vnetName"`
    VNetResourceGroup string `json:"vnetResourceGroup"`
}

AcsCredential represents the credential file for ACS

func NewAcsCredential Uses

func NewAcsCredential(p string) (*AcsCredential, error)

NewAcsCredential returns an AcsCredential struct from file path

type AuthConfig Uses

type AuthConfig struct {
    Username      string `json:"username,omitempty"`
    Password      string `json:"password,omitempty"`
    Auth          string `json:"auth,omitempty"`
    Email         string `json:"email,omitempty"`
    ServerAddress string `json:"serveraddress,omitempty"`
    IdentityToken string `json:"identitytoken,omitempty"`
    RegistryToken string `json:"registrytoken,omitempty"`
}

AuthConfig is the secret returned from an ImageRegistryCredential

Directories

PathSynopsis
clientPackage azure and subpackages are used to perform operations using the Azure Resource Manager (ARM).
client/aciPackage aci provides tools for interacting with the Azure Container Instances API.
client/apiPackage api contains the common code shared by all Azure API libraries.
client/network
client/resourcegroupsPackage resourcegroups provides tools for interacting with the Azure Resource Manager resource groups API.

Package azure imports 43 packages (graph). Updated 2019-11-14. Refresh now. Tools for package owners.