Documentation ¶
Overview ¶
Copyright (c) Microsoft Corporation. Licensed under the Apache 2.0 license.
Copyright (c) Microsoft Corporation. Licensed under the Apache 2.0 license.
Copyright (c) Microsoft Corporation. Licensed under the Apache 2.0 license.
Copyright (c) Microsoft Corporation. Licensed under the Apache 2.0 license.
Index ¶
- Constants
- func NewAKSCredential(p string) (*aksCredential, error)
- 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 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 ¶
func NewAKSCredential ¶
NewAKSCredential returns an aksCredential struct from file path
Types ¶
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(ctx context.Context, config string, azConfig auth.Config, azAPIs client.AzClientsInterface, 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
CleanupPod interface impl
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 ¶
FetchPodStatus interface impl
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)
ListActivePods 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 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 ¶
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 ¶
DockerConfigEntry wraps a docker config as a entry
func (DockerConfigEntry) MarshalJSON ¶
func (ident DockerConfigEntry) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface.
func (*DockerConfigEntry) UnmarshalJSON ¶
func (ident *DockerConfigEntry) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface.
type DockerConfigJSON ¶
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(ctx context.Context, ns, name string, updateHandler func(*v1.PodStatus), forceUpdate bool) error
UpdatePodStatus updates the status of a pod, by posting to update callback.