Documentation ¶
Overview ¶
Package provider contains methods implementing virtual-kubelet provider
Index ¶
- type LiqoProvider
- func (p *LiqoProvider) ConfigureNode(ctx context.Context, n *v1.Node)
- func (p *LiqoProvider) CreatePod(ctx context.Context, homePod *corev1.Pod) error
- func (p *LiqoProvider) DeletePod(ctx context.Context, pod *corev1.Pod) (err error)
- func (p *LiqoProvider) GetContainerLogs(ctx context.Context, homeNamespace, homePodName, containerName string, ...) (io.ReadCloser, error)
- func (p *LiqoProvider) GetNetworkReadyChan() chan struct{}
- func (p *LiqoProvider) GetPod(ctx context.Context, namespace, name string) (pod *corev1.Pod, err error)
- func (p *LiqoProvider) GetPodStatus(ctx context.Context, namespace, name string) (*corev1.PodStatus, error)
- func (p *LiqoProvider) GetPods(ctx context.Context) ([]*corev1.Pod, error)
- func (p *LiqoProvider) GetStatsSummary(ctx context.Context) (*stats.Summary, error)
- func (p *LiqoProvider) NotifyPods(ctx context.Context, notifier func(*corev1.Pod))
- func (p *LiqoProvider) RunInContainer(ctx context.Context, homeNamespace, homePodName, containerName string, ...) error
- func (p *LiqoProvider) SetProviderStopper(stopper chan struct{})
- func (p *LiqoProvider) UpdatePod(ctx context.Context, pod *corev1.Pod) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LiqoProvider ¶
type LiqoProvider struct {
// contains filtered or unexported fields
}
LiqoProvider implements the virtual-kubelet provider interface and stores pods in memory.
func NewLiqoProvider ¶
func NewLiqoProvider(ctx context.Context, nodeName, foreignClusterID, homeClusterID, internalIP string, daemonEndpointPort int32, kubeconfig string, informerResyncPeriod time.Duration, ipamGRPCServer string) (*LiqoProvider, error)
NewLiqoProvider creates a new NewLiqoProvider instance.
func (*LiqoProvider) ConfigureNode ¶
func (p *LiqoProvider) ConfigureNode(ctx context.Context, n *v1.Node)
func (*LiqoProvider) GetContainerLogs ¶
func (p *LiqoProvider) GetContainerLogs(ctx context.Context, homeNamespace, homePodName, containerName string, opts api.ContainerLogOpts) (io.ReadCloser, error)
GetContainerLogs retrieves the logs of a container by name from the provider.
func (*LiqoProvider) GetNetworkReadyChan ¶ added in v0.3.0
func (p *LiqoProvider) GetNetworkReadyChan() chan struct{}
GetNetworkReadyChan reetrun the chan where to notify that the network connectivity has been established.
func (*LiqoProvider) GetPod ¶
func (p *LiqoProvider) GetPod(ctx context.Context, namespace, name string) (pod *corev1.Pod, err error)
GetPod returns a pod by name that is stored in memory.
func (*LiqoProvider) GetPodStatus ¶
func (p *LiqoProvider) GetPodStatus(ctx context.Context, namespace, name string) (*corev1.PodStatus, error)
GetPodStatus is currently not implemented, panic if the method gets invoked. GetPodStatus should only be called by the virtual kubelet if the provider does not implement the PodNotifier interface. The LiqoProvider implements PodNotifier interface so we don't expect GetPodStatus to get called.
func (*LiqoProvider) GetStatsSummary ¶
GetStatsSummary returns dummy stats for all pods known by this provider.
func (*LiqoProvider) NotifyPods ¶
func (p *LiqoProvider) NotifyPods(ctx context.Context, notifier func(*corev1.Pod))
NotifyPods is called to set a pod informing callback function. This should be called before any operations are ready within the provider.
func (*LiqoProvider) RunInContainer ¶
func (p *LiqoProvider) RunInContainer(ctx context.Context, homeNamespace, homePodName, 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 (*LiqoProvider) SetProviderStopper ¶ added in v0.3.0
func (p *LiqoProvider) SetProviderStopper(stopper chan struct{})
SetProviderStopper sets the provided chan as the stopper for the API reflector.