Documentation ¶
Index ¶
- type Provider
- func (p *Provider) Capacity(ctx context.Context) v1.ResourceList
- func (p *Provider) CreatePod(ctx context.Context, pod *v1.Pod) error
- func (p *Provider) DeletePod(ctx context.Context, pod *v1.Pod) (err error)
- func (p *Provider) GetContainerLogs(ctx context.Context, namespace, podName, containerName string, ...) (io.ReadCloser, error)
- func (p *Provider) GetPod(ctx context.Context, namespace, name string) (pod *v1.Pod, err error)
- func (p *Provider) GetPodFullName(ctx context.Context, namespace string, pod string) string
- func (p *Provider) GetPodStatus(ctx context.Context, namespace, name string) (*v1.PodStatus, error)
- func (p *Provider) GetPods(ctx context.Context) ([]*v1.Pod, error)
- func (p *Provider) NodeAddresses(ctx context.Context) []v1.NodeAddress
- func (p *Provider) NodeConditions(ctx context.Context) []v1.NodeCondition
- func (p *Provider) NodeDaemonEndpoints(ctx context.Context) *v1.NodeDaemonEndpoints
- func (p *Provider) OperatingSystem() string
- func (p *Provider) RunInContainer(ctx context.Context, namespace, name, container string, cmd []string, ...) error
- func (p *Provider) UpdatePod(ctx context.Context, pod *v1.Pod) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements the virtual-kubelet provider interface and communicates with the Nomad API.
func NewProvider ¶
func NewProvider(rm *manager.ResourceManager, nodeName, operatingSystem string) (*Provider, error)
NewProvider creates a new Provider
func (*Provider) Capacity ¶
func (p *Provider) Capacity(ctx context.Context) v1.ResourceList
Capacity returns a resource list containing the capacity limits set for Nomad.
func (*Provider) GetContainerLogs ¶
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 ¶
GetPod returns the pod running in the Nomad cluster. returns nil if pod is not found.
func (*Provider) GetPodFullName ¶
GetPodFullName as defined in the provider context
func (*Provider) GetPodStatus ¶
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) NodeAddresses ¶
func (p *Provider) NodeAddresses(ctx context.Context) []v1.NodeAddress
NodeAddresses returns a list of addresses for the node status within Kubernetes.
func (*Provider) NodeConditions ¶
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 ¶
func (p *Provider) NodeDaemonEndpoints(ctx context.Context) *v1.NodeDaemonEndpoints
NodeDaemonEndpoints returns NodeDaemonEndpoints for the node status within Kubernetes.
func (*Provider) OperatingSystem ¶
OperatingSystem returns the operating system for this provider. This is a noop to default to Linux for now.
func (*Provider) RunInContainer ¶ added in v0.10.0
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