Documentation ¶
Index ¶
- Constants
- Variables
- type MacOSProvider
- func (p *MacOSProvider) AttachToContainer(ctx context.Context, namespace, podName, containerName string, ...) error
- func (p *MacOSProvider) ConfigureNode(ctx context.Context, n *corev1.Node)
- func (p *MacOSProvider) CreatePod(ctx context.Context, pod *corev1.Pod) error
- func (p *MacOSProvider) DeletePod(ctx context.Context, pod *corev1.Pod) error
- func (p *MacOSProvider) GetContainerLogs(ctx context.Context, namespace, podName, containerName string, ...) (io.ReadCloser, error)
- func (p *MacOSProvider) GetMetricsResource(ctx context.Context) ([]*dto.MetricFamily, error)
- func (p *MacOSProvider) GetPod(ctx context.Context, namespace, name string) (*corev1.Pod, error)
- func (p *MacOSProvider) GetPodStatus(ctx context.Context, namespace, name string) (*corev1.PodStatus, error)
- func (p *MacOSProvider) GetPods(ctx context.Context) ([]*corev1.Pod, error)
- func (p *MacOSProvider) GetStatsSummary(ctx context.Context) (*statsv1alpha1.Summary, error)
- func (p *MacOSProvider) PortForward(ctx context.Context, namespace, pod string, port int32, ...) error
- func (p *MacOSProvider) RunInContainer(ctx context.Context, namespace, podName, containerName string, cmd []string, ...) error
- func (p *MacOSProvider) UpdatePod(ctx context.Context, pod *corev1.Pod) error
- type OperatingSystems
Constants ¶
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" )
const (
DefaultPods = 110
)
Variables ¶
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 ¶
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 ¶
CreatePod takes a Kubernetes Pod and deploys it within the MacOS provider.
func (*MacOSProvider) DeletePod ¶
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) 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 ¶
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.
type OperatingSystems ¶
func (OperatingSystems) Names ¶
func (o OperatingSystems) Names() []string