cri: github.com/virtual-kubelet/cri Index | Files

package cri

import "github.com/virtual-kubelet/cri"

Index

Package Files

client.go cri.go sys_linux.go

Constants

const CriSocketPath = "/run/containerd/containerd.sock"

TODO: Make these configurable

const PodConfigMapFilePerms = 0644
const PodConfigMapVolDir = "/configmaps"
const PodConfigMapVolPerms = 0755
const PodLogRoot = "/var/log/vk-cri/"
const PodLogRootPerms = 0755
const PodSecretFilePerms = 0644
const PodSecretVolDir = "/secrets"
const PodSecretVolPerms = 0755
const PodVolPerms = 0755
const PodVolRoot = "/run/vk-cri/volumes/"
const PodVolRootPerms = 0755

type CRIPod Uses

type CRIPod struct {
    // contains filtered or unexported fields
}

type CRIProvider Uses

type CRIProvider struct {
    // contains filtered or unexported fields
}

CRIProvider implements the virtual-kubelet provider interface and manages pods in a CRI runtime NOTE: CRIProvider is not inteded as an alternative to Kubelet, rather it's intended for testing and POC purposes

As such, it is far from functionally complete and never will be. It provides the minimum function necessary

func NewCRIProvider Uses

func NewCRIProvider(nodeName, operatingSystem string, internalIP string, resourceManager *manager.ResourceManager, daemonEndpointPort int32) (*CRIProvider, error)

Create a new CRIProvider

func (*CRIProvider) Capacity Uses

func (p *CRIProvider) Capacity(ctx context.Context) v1.ResourceList

Provider function to return the capacity of the node

func (*CRIProvider) CreatePod Uses

func (p *CRIProvider) CreatePod(ctx context.Context, pod *v1.Pod) error

Provider function to create a Pod

func (*CRIProvider) DeletePod Uses

func (p *CRIProvider) DeletePod(ctx context.Context, pod *v1.Pod) error

Provider function to delete a pod and its containers

func (*CRIProvider) GetContainerLogs Uses

func (p *CRIProvider) GetContainerLogs(ctx context.Context, namespace, podName, containerName string, opts api.ContainerLogOpts) (io.ReadCloser, error)

Provider function to read the logs of a container

func (*CRIProvider) GetPod Uses

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

Provider function to return a Pod spec - mostly used for its status

func (*CRIProvider) GetPodFullName Uses

func (p *CRIProvider) GetPodFullName(namespace string, pod string) string

Get full pod name as defined in the provider context TODO: Implementation

func (*CRIProvider) GetPodStatus Uses

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

Provider function to return the status of a Pod

func (*CRIProvider) GetPods Uses

func (p *CRIProvider) GetPods(ctx context.Context) ([]*v1.Pod, error)

Provider function to return all known pods TODO: Should this be all pods or just running pods?

func (*CRIProvider) NodeAddresses Uses

func (p *CRIProvider) NodeAddresses(ctx context.Context) []v1.NodeAddress

Provider function to return a list of node addresses

func (*CRIProvider) NodeConditions Uses

func (p *CRIProvider) NodeConditions(ctx context.Context) []v1.NodeCondition

Provider function to return node conditions TODO: For now, use the same node conditions as the MockProvider

func (*CRIProvider) NodeDaemonEndpoints Uses

func (p *CRIProvider) NodeDaemonEndpoints(ctx context.Context) *v1.NodeDaemonEndpoints

Provider function to return the daemon endpoint

func (*CRIProvider) OperatingSystem Uses

func (p *CRIProvider) OperatingSystem() string

Provider function to return the guest OS

func (*CRIProvider) RunInContainer Uses

func (p *CRIProvider) 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. TODO: Implementation

func (*CRIProvider) UpdatePod Uses

func (p *CRIProvider) UpdatePod(ctx context.Context, pod *v1.Pod) error

Update is currently not required or even called by VK, so not implemented

Package cri imports 25 packages (graph). Updated 2019-06-25. Refresh now. Tools for package owners.