Documentation ¶
Index ¶
- func BuildRemoteExecutionInstanceName(container v1.Container, pod *v1.Pod) string
- func BuildRemoteExecutionPodName(pod *v1.Pod) string
- func PrepareContainerData(p *KNOCProvider, ctx context.Context, client *simplessh.Client, ...) error
- func RemoteExecution(p *KNOCProvider, ctx context.Context, mode int8, imageLocation string, ...) error
- type KNOCConfig
- type KNOCProvider
- func (p *KNOCProvider) ConfigureNode(ctx context.Context, n *v1.Node)
- func (p *KNOCProvider) CreatePod(ctx context.Context, pod *v1.Pod) error
- func (p *KNOCProvider) DeletePod(ctx context.Context, pod *v1.Pod) (err error)
- func (p *KNOCProvider) GetContainerLogs(ctx context.Context, namespace, podName, containerName string, ...) (io.ReadCloser, error)
- func (p *KNOCProvider) GetPod(ctx context.Context, namespace, name string) (pod *v1.Pod, err error)
- func (p *KNOCProvider) GetPodStatus(ctx context.Context, namespace, name string) (*v1.PodStatus, error)
- func (p *KNOCProvider) GetPods(ctx context.Context) ([]*v1.Pod, error)
- func (p *KNOCProvider) GetStatsSummary(ctx context.Context) (*stats.Summary, error)
- func (p *KNOCProvider) NotifyPods(ctx context.Context, f func(*v1.Pod))
- func (p *KNOCProvider) RunInContainer(ctx context.Context, namespace, name, container string, cmd []string, ...) error
- func (p *KNOCProvider) UpdatePod(ctx context.Context, pod *v1.Pod) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrepareContainerData ¶
Types ¶
type KNOCConfig ¶
type KNOCProvider ¶
type KNOCProvider struct {
// contains filtered or unexported fields
}
KNOCProvider implements the virtual-kubelet provider interface and stores pods in memory.
func NewProvider ¶
func NewProvider(providerConfig, nodeName, operatingSystem string, internalIP string, rm *manager.ResourceManager, daemonEndpointPort int32) (*KNOCProvider, error)
NewProvider creates a new Provider, which implements the PodNotifier interface
func NewProviderConfig ¶
func NewProviderConfig(config KNOCConfig, nodeName, operatingSystem string, internalIP string, rm *manager.ResourceManager, daemonEndpointPort int32) (*KNOCProvider, error)
NewProviderConfig creates a new KNOCV0Provider. KNOC legacy provider does not implement the new asynchronous podnotifier interface
func (*KNOCProvider) ConfigureNode ¶
func (p *KNOCProvider) ConfigureNode(ctx context.Context, n *v1.Node)
func (*KNOCProvider) GetContainerLogs ¶
func (p *KNOCProvider) 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 (*KNOCProvider) GetPodStatus ¶
func (p *KNOCProvider) GetPodStatus(ctx context.Context, namespace, name string) (*v1.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 (*KNOCProvider) GetStatsSummary ¶
GetStatsSummary returns dummy stats for all pods known by this provider.
func (*KNOCProvider) NotifyPods ¶
func (p *KNOCProvider) NotifyPods(ctx context.Context, f func(*v1.Pod))
NotifyPods is called to set a pod notifier callback function. This should be called before any operations are done within the provider.
func (*KNOCProvider) RunInContainer ¶
func (p *KNOCProvider) RunInContainer(ctx context.Context, namespace, name, container 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.