provider

package
v0.0.0-...-0e75e24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrowserProvider

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

BrowserProvider implements the virtual-kubelet provider interface

func NewBrowserProvider

func NewBrowserProvider(config string, rm *manager.ResourceManager, nodeName, operatingSystem string, internalIP string, daemonEndpointPort int32, clusterDomain string) (*BrowserProvider, error)

NewBrowserProvider creates a new Browser Provider

func (*BrowserProvider) ConfigureNode

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

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

func (*BrowserProvider) CreatePod

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

CreatePod takes a Kubernetes Pod and deploys it within the provider.

func (*BrowserProvider) DeletePod

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

DeletePod takes a Kubernetes Pod and deletes it from the provider. Once a pod is deleted, the provider is expected to call the NotifyPods callback with a terminal pod status where all the containers are in a terminal state, as well as the pod. DeletePod may be called multiple times for the same pod.

func (*BrowserProvider) GetContainerLogs

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

GetContainerLogs retrieves the logs of a container by name from the provider.

func (*BrowserProvider) GetPod

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

GetPod retrieves a pod by name from the provider (can be cached). The Pod returned is expected to be immutable, and may be accessed concurrently outside of the calling goroutine. Therefore it is recommended to return a version after DeepCopy.

func (*BrowserProvider) GetPodStats

func (p *BrowserProvider) GetPodStats(ctx context.Context, namespace, name string) *stats.PodStats

GetPodStats gets the metrics for a pod. As the browser does not provide the metrics needed we stub it out

func (*BrowserProvider) GetPodStatus

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

GetPodStatus retrieves the status of a pod by name from the provider. The PodStatus returned is expected to be immutable, and may be accessed concurrently outside of the calling goroutine. Therefore it is recommended to return a version after DeepCopy.

func (*BrowserProvider) GetPods

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

GetPods retrieves a list of all pods running on the provider (can be cached). The Pods returned are expected to be immutable, and may be accessed concurrently outside of the calling goroutine. Therefore it is recommended to return a version after DeepCopy.

func (*BrowserProvider) RunInContainer

func (p *BrowserProvider) 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 (*BrowserProvider) UpdatePod

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

UpdatePod takes a Kubernetes Pod and updates it within the provider.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL