Documentation ¶
Index ¶
- type AADMock
- type ACIMock
- type ACIProvider
- func (p *ACIProvider) Capacity(ctx context.Context) v1.ResourceList
- func (p *ACIProvider) CreatePod(ctx context.Context, pod *v1.Pod) error
- func (p *ACIProvider) DeletePod(ctx context.Context, pod *v1.Pod) error
- func (p *ACIProvider) ExecInContainer(name string, uid types.UID, container string, cmd []string, in io.Reader, ...) error
- func (p *ACIProvider) GetContainerLogs(ctx context.Context, namespace, podName, containerName string, tail int) (string, error)
- func (p *ACIProvider) GetPod(ctx context.Context, namespace, name string) (*v1.Pod, error)
- func (p *ACIProvider) GetPodFullName(namespace string, pod string) string
- func (p *ACIProvider) GetPodStatus(ctx context.Context, namespace, name string) (*v1.PodStatus, error)
- func (p *ACIProvider) GetPods(ctx context.Context) ([]*v1.Pod, error)
- func (p *ACIProvider) GetStatsSummary(ctx context.Context) (summary *stats.Summary, err error)
- func (p *ACIProvider) NodeAddresses(ctx context.Context) []v1.NodeAddress
- func (p *ACIProvider) NodeConditions(ctx context.Context) []v1.NodeCondition
- func (p *ACIProvider) NodeDaemonEndpoints(ctx context.Context) *v1.NodeDaemonEndpoints
- func (p *ACIProvider) OperatingSystem() string
- func (p *ACIProvider) UpdatePod(ctx context.Context, pod *v1.Pod) error
- type AcsCredential
- type AuthConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AADMock ¶
type AADMock struct { OnAcquireToken func(http.ResponseWriter, *http.Request) // contains filtered or unexported fields }
AADMock implements a AAD mock server .
func (*AADMock) GetServerURL ¶
GetServerURL returns the mock server URL.
type ACIMock ¶
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{}) // contains filtered or unexported fields }
ACIMock implements a Azure Container Instance mock server.
func NewACIMock ¶
func NewACIMock() *ACIMock
NewACIMock creates a new Azure Container Instance mock server.
func (*ACIMock) Close ¶
func (mock *ACIMock) Close()
Close terminates the Azure Container Instance mock server.
func (*ACIMock) GetServerURL ¶
GetServerURL returns the mock server URL.
type ACIProvider ¶
type ACIProvider struct {
// contains filtered or unexported fields
}
ACIProvider implements the virtual-kubelet provider interface and communicates with Azure's ACI APIs.
func NewACIProvider ¶
func NewACIProvider(config string, rm *manager.ResourceManager, nodeName, operatingSystem string, internalIP string, daemonEndpointPort int32) (*ACIProvider, error)
NewACIProvider creates a new ACIProvider.
func (*ACIProvider) Capacity ¶
func (p *ACIProvider) Capacity(ctx context.Context) v1.ResourceList
Capacity returns a resource list containing the capacity limits set for ACI.
func (*ACIProvider) ExecInContainer ¶ added in v0.4.1
func (p *ACIProvider) ExecInContainer(name string, uid types.UID, container string, cmd []string, in io.Reader, out, errstream io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize, timeout time.Duration) error
ExecInContainer executes a command in a container in the pod, copying data between in/out/err and the container's stdin/stdout/stderr.
func (*ACIProvider) GetContainerLogs ¶
func (p *ACIProvider) GetContainerLogs(ctx context.Context, namespace, podName, containerName string, tail int) (string, error)
GetContainerLogs returns the logs of a pod by name that is running inside ACI.
func (*ACIProvider) GetPod ¶
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 ¶ added in v0.4.1
func (p *ACIProvider) GetPodFullName(namespace string, pod string) string
GetPodFullName as defined in the provider context
func (*ACIProvider) GetPodStatus ¶
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) GetStatsSummary ¶ added in v0.5.2
GetStatsSummary returns the stats summary for pods running on ACI
func (*ACIProvider) NodeAddresses ¶
func (p *ACIProvider) NodeAddresses(ctx context.Context) []v1.NodeAddress
NodeAddresses returns a list of addresses for the node status within Kubernetes.
func (*ACIProvider) NodeConditions ¶
func (p *ACIProvider) NodeConditions(ctx context.Context) []v1.NodeCondition
NodeConditions returns a list of conditions (Ready, OutOfDisk, etc), for updates to the node status within Kubernetes.
func (*ACIProvider) NodeDaemonEndpoints ¶
func (p *ACIProvider) NodeDaemonEndpoints(ctx context.Context) *v1.NodeDaemonEndpoints
NodeDaemonEndpoints returns NodeDaemonEndpoints for the node status within Kubernetes.
func (*ACIProvider) OperatingSystem ¶
func (p *ACIProvider) OperatingSystem() string
OperatingSystem returns the operating system that was provided by the config.
type AcsCredential ¶
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 ¶
func NewAcsCredential(p string) (*AcsCredential, error)
NewAcsCredential returns an AcsCredential struct from file path
type AuthConfig ¶
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
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package azure and subpackages are used to perform operations using the Azure Resource Manager (ARM).
|
Package azure and subpackages are used to perform operations using the Azure Resource Manager (ARM). |
aci
Package aci provides tools for interacting with the Azure Container Instances API.
|
Package aci provides tools for interacting with the Azure Container Instances API. |
api
Package api contains the common code shared by all Azure API libraries.
|
Package api contains the common code shared by all Azure API libraries. |
resourcegroups
Package resourcegroups provides tools for interacting with the Azure Resource Manager resource groups API.
|
Package resourcegroups provides tools for interacting with the Azure Resource Manager resource groups API. |