provider

package
v0.0.0-...-830995a Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApptainerProvider

type ApptainerProvider struct {
	*metrics.ApptaienrMetricsProvider
	// contains filtered or unexported fields
}

func NewApptainerProvider

func NewApptainerProvider(ctx context.Context, nodeName, operatingSystem, internalIP string,
	daemonEndpointPort int32) (*ApptainerProvider, error)

func (*ApptainerProvider) ConfigureNode

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

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

func (*ApptainerProvider) CreatePod

func (p *ApptainerProvider) CreatePod(ctx context.Context, pod *corev1.Pod) error

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

func (*ApptainerProvider) DeletePod

func (p *ApptainerProvider) DeletePod(ctx context.Context, pod *corev1.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 (*ApptainerProvider) GetContainerLogs

func (p *ApptainerProvider) 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 (*ApptainerProvider) GetPod

func (p *ApptainerProvider) GetPod(ctx context.Context, namespace, name string) (*corev1.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 (*ApptainerProvider) GetPodStatus

func (p *ApptainerProvider) GetPodStatus(ctx context.Context, namespace, name string) (*corev1.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 (*ApptainerProvider) GetPods

func (p *ApptainerProvider) GetPods(context.Context) ([]*corev1.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 (*ApptainerProvider) RunInContainer

func (p *ApptainerProvider) RunInContainer(ctx context.Context, namespace, podName, 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 (*ApptainerProvider) UpdatePod

func (p *ApptainerProvider) UpdatePod(ctx context.Context, pod *corev1.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