Documentation ¶
Index ¶
- Constants
- type MacOSVZProvider
- func (p *MacOSVZProvider) AttachToContainer(ctx context.Context, namespace, podName, containerName string, ...) (err error)
- func (p *MacOSVZProvider) ConfigureNode(ctx context.Context, n *corev1.Node) error
- func (p *MacOSVZProvider) CreatePod(ctx context.Context, pod *corev1.Pod) (err error)
- func (p *MacOSVZProvider) DeletePod(ctx context.Context, pod *corev1.Pod) (err error)
- func (p *MacOSVZProvider) GetContainerLogs(ctx context.Context, namespace, podName, containerName string, ...) (in io.ReadCloser, err error)
- func (p *MacOSVZProvider) GetMetricsResource(ctx context.Context) (mf []*dto.MetricFamily, err error)
- func (p *MacOSVZProvider) GetPod(ctx context.Context, namespace, name string) (pod *corev1.Pod, err error)
- func (p *MacOSVZProvider) GetPodStatus(ctx context.Context, namespace, name string) (ps *corev1.PodStatus, err error)
- func (p *MacOSVZProvider) GetPods(ctx context.Context) (pods []*corev1.Pod, err error)
- func (p *MacOSVZProvider) GetStatsSummary(ctx context.Context) (s *statsv1alpha1.Summary, err error)
- func (p *MacOSVZProvider) PortForward(ctx context.Context, namespace, pod string, port int32, ...) (err error)
- func (p *MacOSVZProvider) RunInContainer(ctx context.Context, namespace, podName, containerName string, cmd []string, ...) (err error)
- func (p *MacOSVZProvider) UpdatePod(ctx context.Context, pod *corev1.Pod) (err error)
- type MacOSVZProviderConfig
Constants ¶
const ( ComponentName = "macos-vz-kubelet" // Timeout for deleting VZ group on failure. DefaultDeleteVZGroupGracePeriodSeconds int64 = 10 )
const ( // DefaultPods is the default number of pods that can be run on a node. // Limiting number of pods to Apple Virtualization.framework internal limit DefaultPods = resourcemanager.MaxVirtualMachines // LabelCPUModelName is the label name for the CPU model name LabelCPUModelName = "feature.node.kubernetes.io/cpu-model.name" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MacOSVZProvider ¶
type MacOSVZProvider struct {
// contains filtered or unexported fields
}
func NewMacOSVZProvider ¶
func NewMacOSVZProvider(ctx context.Context, vzClient client.VzClientInterface, config MacOSVZProviderConfig) (p *MacOSVZProvider, err error)
NewMacOSVZProvider creates a new MacOSVZ provider.
func (*MacOSVZProvider) AttachToContainer ¶
func (p *MacOSVZProvider) AttachToContainer(ctx context.Context, namespace, podName, containerName string, attach api.AttachIO) (err 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 (*MacOSVZProvider) ConfigureNode ¶
ConfigureNode takes a Kubernetes node object and applies provider specific configurations to the object.
func (*MacOSVZProvider) CreatePod ¶
CreatePod takes a Kubernetes Pod and deploys it within the MacOS provider.
func (*MacOSVZProvider) DeletePod ¶
DeletePod takes a Kubernetes Pod and deletes it from the provider.
func (*MacOSVZProvider) GetContainerLogs ¶
func (p *MacOSVZProvider) GetContainerLogs(ctx context.Context, namespace, podName, containerName string, opts api.ContainerLogOpts) (in io.ReadCloser, err error)
GetContainerLogs retrieves the logs of a container by name from the provider.
func (*MacOSVZProvider) GetMetricsResource ¶
func (p *MacOSVZProvider) GetMetricsResource(ctx context.Context) (mf []*dto.MetricFamily, err error)
GetMetricsResource gets the metrics for the node, including running pods
func (*MacOSVZProvider) GetPod ¶
func (p *MacOSVZProvider) GetPod(ctx context.Context, namespace, name string) (pod *corev1.Pod, err error)
GetPod retrieves a pod by name from the provider (can be cached).
func (*MacOSVZProvider) GetPodStatus ¶
func (p *MacOSVZProvider) GetPodStatus(ctx context.Context, namespace, name string) (ps *corev1.PodStatus, err error)
GetPodStatus retrieves the status of a pod by name from the provider.
func (*MacOSVZProvider) GetPods ¶
GetPods retrieves a list of all pods running on the provider (can be cached).
func (*MacOSVZProvider) GetStatsSummary ¶
func (p *MacOSVZProvider) GetStatsSummary(ctx context.Context) (s *statsv1alpha1.Summary, err error)
GetStatsSummary gets the stats for the node, including running pods
func (*MacOSVZProvider) PortForward ¶
func (p *MacOSVZProvider) PortForward(ctx context.Context, namespace, pod string, port int32, stream io.ReadWriteCloser) (err error)
PortForward forwards a local port to a port on the pod
func (*MacOSVZProvider) RunInContainer ¶
func (p *MacOSVZProvider) RunInContainer(ctx context.Context, namespace, podName, containerName string, cmd []string, attach api.AttachIO) (err 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 MacOSVZProviderConfig ¶
type MacOSVZProviderConfig struct { NodeName string Platform string InternalIP string DaemonEndpointPort int32 K8sClient kubernetes.Interface EventRecorder event.EventRecorder PodsLister corev1listers.PodLister }