virtual-kubelet: github.com/virtual-kubelet/virtual-kubelet/providers/nomad Index | Files

package nomad

import "github.com/virtual-kubelet/virtual-kubelet/providers/nomad"

Index

Package Files

helpers.go nomad.go

type Provider Uses

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

Provider implements the virtual-kubelet provider interface and communicates with the Nomad API.

func NewProvider Uses

func NewProvider(rm *manager.ResourceManager, nodeName, operatingSystem string) (*Provider, error)

NewProvider creates a new Provider

func (*Provider) Capacity Uses

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

Capacity returns a resource list containing the capacity limits set for Nomad.

func (*Provider) CreatePod Uses

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

CreatePod accepts a Pod definition and creates a Nomad job

func (*Provider) DeletePod Uses

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

DeletePod accepts a Pod definition and deletes a Nomad job.

func (*Provider) GetContainerLogs Uses

func (p *Provider) 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 (*Provider) GetPod Uses

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

GetPod returns the pod running in the Nomad cluster. returns nil if pod is not found.

func (*Provider) GetPodFullName Uses

func (p *Provider) GetPodFullName(ctx context.Context, namespace string, pod string) string

GetPodFullName as defined in the provider context

func (*Provider) GetPodStatus Uses

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

GetPodStatus returns the status of a pod by name that is running as a job in the Nomad cluster returns nil if a pod by that name is not found.

func (*Provider) GetPods Uses

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

GetPods returns a list of all pods known to be running in Nomad nodes.

func (*Provider) NodeAddresses Uses

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

NodeAddresses returns a list of addresses for the node status within Kubernetes.

func (*Provider) NodeConditions Uses

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

NodeConditions returns a list of conditions (Ready, OutOfDisk, etc), for updates to the node status within Kubernetes.

func (*Provider) NodeDaemonEndpoints Uses

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

NodeDaemonEndpoints returns NodeDaemonEndpoints for the node status within Kubernetes.

func (*Provider) OperatingSystem Uses

func (p *Provider) OperatingSystem() string

OperatingSystem returns the operating system for this provider. This is a noop to default to Linux for now.

func (*Provider) RunInContainer Uses

func (p *Provider) 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 (*Provider) UpdatePod Uses

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

UpdatePod is a noop, nomad does not support live updates of a pod.

Package nomad imports 16 packages (graph). Updated 2019-05-20. Refresh now. Tools for package owners.