Documentation
¶
Index ¶
- Constants
- type AADMock
- type ACIMock
- type ACIProvider
- func (p *ACIProvider) CleanupPod(ctx context.Context, ns, name string) error
- func (p *ACIProvider) ConfigureNode(ctx context.Context, node *v1.Node)
- 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) FetchPodStatus(ctx context.Context, ns, name string) (*v1.PodStatus, error)
- func (p *ACIProvider) GetContainerLogs(ctx context.Context, namespace, podName, containerName string, ...) (io.ReadCloser, 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) ListActivePods(ctx context.Context) ([]PodIdentifier, error)
- func (p *ACIProvider) NotifyPods(ctx context.Context, notifierCb func(*v1.Pod))
- func (p *ACIProvider) Ping(ctx context.Context) error
- func (p *ACIProvider) RunInContainer(ctx context.Context, namespace, name, container string, cmd []string, ...) error
- func (p *ACIProvider) UpdatePod(ctx context.Context, pod *v1.Pod) error
- type AcsCredential
- type AuthConfig
- type DockerConfig
- type DockerConfigEntry
- type DockerConfigJSON
- type PodIdentifier
- type PodsTracker
- type PodsTrackerHandler
Constants ¶
const (
// AzureFileDriverName is the name of the CSI driver for Azure File
AzureFileDriverName = "file.csi.azure.com"
)
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{}) OnGetRPManifest func() (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 { metrics.ACIPodMetricsProvider // 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, clusterDomain string) (*ACIProvider, error)
NewACIProvider creates a new ACIProvider.
func (*ACIProvider) CleanupPod ¶
func (p *ACIProvider) CleanupPod(ctx context.Context, ns, name string) error
func (*ACIProvider) ConfigureNode ¶
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) FetchPodStatus ¶
func (*ACIProvider) GetContainerLogs ¶
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 ¶
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 ¶
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) ListActivePods ¶
func (p *ACIProvider) ListActivePods(ctx context.Context) ([]PodIdentifier, error)
PodsTrackerHandler interface impl.
func (*ACIProvider) NotifyPods ¶
func (p *ACIProvider) NotifyPods(ctx context.Context, notifierCb func(*v1.Pod))
NotifyPods instructs the notifier to call the passed in function when the pod status changes. The provided pointer to a Pod is guaranteed to be used in a read-only fashion.
func (*ACIProvider) Ping ¶
func (p *ACIProvider) Ping(ctx context.Context) error
Ping checks if the node is still active/ready.
func (*ACIProvider) RunInContainer ¶
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.
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"` UserAssignedIdentityID string `json:"userAssignedIdentityID"` }
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
type DockerConfig ¶ added in v1.4.0
type DockerConfig map[string]DockerConfigEntry
DockerConfig represents the config file used by the docker CLI. This config that represents the credentials that should be used when pulling images from specific image repositories.
type DockerConfigEntry ¶ added in v1.4.0
DockerConfigEntry wraps a docker config as a entry
func (DockerConfigEntry) MarshalJSON ¶ added in v1.4.1
func (ident DockerConfigEntry) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface.
func (*DockerConfigEntry) UnmarshalJSON ¶ added in v1.4.1
func (ident *DockerConfigEntry) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface.
type DockerConfigJSON ¶ added in v1.4.0
type DockerConfigJSON struct { Auths DockerConfig `json:"auths"` // +optional HTTPHeaders map[string]string `json:"HttpHeaders,omitempty"` }
DockerConfigJSON represents ~/.docker/config.json file info see https://github.com/docker/docker/pull/12009
type PodIdentifier ¶
type PodIdentifier struct {
// contains filtered or unexported fields
}
type PodsTracker ¶
type PodsTracker struct {
// contains filtered or unexported fields
}
func (*PodsTracker) StartTracking ¶
func (pt *PodsTracker) StartTracking(ctx context.Context)
StartTracking starts the background tracking for created pods.
func (*PodsTracker) UpdatePodStatus ¶
func (pt *PodsTracker) UpdatePodStatus(ns, name string, updateHandler func(*v1.PodStatus), forceUpdate bool) error
UpdatePodStatus updates the status of a pod, by posting to update callback.