provider

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2021 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LiqoProvider

type LiqoProvider struct {
	RemoteRemappedPodCidr options.Option
	LocalRemappedPodCidr  options.Option
	// contains filtered or unexported fields
}

LiqoProvider implements the virtual-kubelet provider interface and stores pods in memory.

func NewLiqoProvider

func NewLiqoProvider(nodeName, foreignClusterId, homeClusterId string, internalIP string, daemonEndpointPort int32, kubeconfig, remoteKubeConfig string) (*LiqoProvider, error)

NewKubernetesProviderKubernetes creates a new KubernetesV0Provider. Kubernetes legacy provider does not implement the new asynchronous podnotifier interface

func (*LiqoProvider) ConfigureNode

func (p *LiqoProvider) ConfigureNode(ctx context.Context, n *v1.Node)

func (*LiqoProvider) CreatePod

func (p *LiqoProvider) CreatePod(_ context.Context, homePod *corev1.Pod) error

CreatePod accepts a Pod definition and stores it in memory.

func (*LiqoProvider) DeletePod

func (p *LiqoProvider) DeletePod(ctx context.Context, pod *corev1.Pod) (err error)

DeletePod deletes the specified pod out of memory.

func (*LiqoProvider) GetContainerLogs

func (p *LiqoProvider) GetContainerLogs(_ context.Context, homeNamespace string, homePodName string, containerName string, opts api.ContainerLogOpts) (io.ReadCloser, error)

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

func (*LiqoProvider) GetPod

func (p *LiqoProvider) GetPod(_ context.Context, namespace, name string) (pod *corev1.Pod, err error)

GetPod returns a pod by name that is stored in memory.

func (*LiqoProvider) GetPodStatus

func (p *LiqoProvider) GetPodStatus(_ context.Context, namespace, name string) (*corev1.PodStatus, error)

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

func (*LiqoProvider) GetPods

func (p *LiqoProvider) GetPods(_ context.Context) ([]*corev1.Pod, error)

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

func (*LiqoProvider) GetStatsSummary

func (p *LiqoProvider) GetStatsSummary(ctx context.Context) (*stats.Summary, error)

GetStatsSummary returns dummy stats for all pods known by this provider.

func (*LiqoProvider) NotifyPods

func (p *LiqoProvider) NotifyPods(_ context.Context, notifier func(interface{}))

NotifyPods is called to set a pod informing callback function. This should be called before any operations are ready within the provider.

func (*LiqoProvider) ReconcileNodeFromAdv

func (p *LiqoProvider) ReconcileNodeFromAdv(event watch.Event) error

The reconciliation function; every time this function is called, the node status is updated by means of r.updateFromAdv

func (*LiqoProvider) ReconcileNodeFromTep

func (p *LiqoProvider) ReconcileNodeFromTep(event watch.Event) error

func (*LiqoProvider) RunInContainer

func (p *LiqoProvider) RunInContainer(_ context.Context, homeNamespace string, homePodName string, containerName 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 (*LiqoProvider) StartNodeUpdater

func (p *LiqoProvider) StartNodeUpdater(nodeRunner *module.NodeController) (chan struct{}, chan struct{}, error)

func (*LiqoProvider) UpdatePod

func (p *LiqoProvider) UpdatePod(_ context.Context, pod *corev1.Pod) error

UpdatePod accepts a Pod definition and updates its reference.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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