provider

package
v0.0.0-...-09bfeb9 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OperatingSystemMacOS is the configuration value for defining MacOS.
	OperatingSystemMacOS = "macos"
	// OperatingSystemLinux is the configuration value for defining Linux.
	OperatingSystemLinux = "linux"
	// OperatingSystemWindows is the configuration value for defining Windows.
	OperatingSystemWindows = "windows"
)
View Source
const (
	DefaultPods = 110
)

Variables

View Source
var (
	// ValidOperatingSystems defines the group of operating systems
	// that can be used as a kubelet node.
	ValidOperatingSystems = OperatingSystems{
		OperatingSystemMacOS:   true,
		OperatingSystemLinux:   false,
		OperatingSystemWindows: false,
	}
)

Functions

This section is empty.

Types

type MacOSProvider

type MacOSProvider struct {
	nodeutil.Provider
	// contains filtered or unexported fields
}

MacOSProvider implements the virtual-kubelet provider interface.

func NewMacOSProvider

func NewMacOSProvider(rm *manager.ResourceManager, nodeName, operatingSystem, internalIP string, daemonEndpointPort int32) *MacOSProvider

NewMacOSProvider creates a new MacOS provider.

func (*MacOSProvider) AttachToContainer

func (p *MacOSProvider) AttachToContainer(ctx context.Context, namespace, podName, containerName string, attach api.AttachIO) error

AttachToContainer attaches to the executing process of a container in the pod, copying data between in/out/err and the container's stdin/stdout/stderr.

func (*MacOSProvider) ConfigureNode

func (p *MacOSProvider) ConfigureNode(ctx context.Context, n *corev1.Node)

func (*MacOSProvider) CreatePod

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

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

func (*MacOSProvider) DeletePod

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

DeletePod takes a Kubernetes Pod and deletes it from the provider.

func (*MacOSProvider) GetContainerLogs

func (p *MacOSProvider) 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 (*MacOSProvider) GetMetricsResource

func (p *MacOSProvider) GetMetricsResource(ctx context.Context) ([]*dto.MetricFamily, error)

GetMetricsResource gets the metrics for the node, including running pods

func (*MacOSProvider) GetPod

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

GetPod retrieves a pod by name from the provider (can be cached).

func (*MacOSProvider) GetPodStatus

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

GetPodStatus retrieves the status of a pod by name from the provider.

func (*MacOSProvider) GetPods

func (p *MacOSProvider) GetPods(ctx context.Context) ([]*corev1.Pod, error)

GetPods retrieves a list of all pods running on the provider (can be cached).

func (*MacOSProvider) GetStatsSummary

func (p *MacOSProvider) GetStatsSummary(ctx context.Context) (*statsv1alpha1.Summary, error)

GetStatsSummary gets the stats for the node, including running pods

func (*MacOSProvider) PortForward

func (p *MacOSProvider) PortForward(ctx context.Context, namespace, pod string, port int32, stream io.ReadWriteCloser) error

PortForward forwards a local port to a port on the pod

func (*MacOSProvider) RunInContainer

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

func (p *MacOSProvider) UpdatePod(ctx context.Context, pod *corev1.Pod) error

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

type OperatingSystems

type OperatingSystems map[string]bool //nolint:golint

func (OperatingSystems) Names

func (o OperatingSystems) Names() []string

Jump to

Keyboard shortcuts

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