openstack-zun: github.com/virtual-kubelet/openstack-zun Index | Files

package openstack

import "github.com/virtual-kubelet/openstack-zun"

Index

Package Files

config.go types.go zun.go

type CapsuleSpec Uses

type CapsuleSpec struct {
    Volumes       []Volume    `json:"volumes,omitempty"`
    Containers    []Container `json:"containers,omitempty"`
    RestartPolicy string      `json:"restartPolicy,omitempty"`
}

CapsuleSpec

type CapsuleTemplate Uses

type CapsuleTemplate struct {
    Spec     CapsuleSpec `json:"spec,omitempty"`
    Kind     string      `json:"kind,omitempty"`
    Metadata Metadata    `json:"metadata,omitempty"`
}

type Container Uses

type Container struct {
    //	Name    string `json:"name" protobuf:"bytes,1,opt,name=name"`
    Image      string   `json:"image,omitempty" protobuf:"bytes,2,opt,name=image"`
    Command    []string `json:"command,omitempty" protobuf:"bytes,3,rep,name=command"`
    Args       []string `json:"args,omitempty" protobuf:"bytes,4,rep,name=args"`
    WorkingDir string   `json:"workDir,omitempty" protobuf:"bytes,5,opt,name=workingDir"`
    //	Ports   []ContainerPort `json:"ports,omitempty" patchStrategy:"merge" patchMergeKey:"containerPort" protobuf:"bytes,6,rep,name=ports"`
    Env map[string]string `json:"env,omitempty"`
    //ENV is different with Kubernetes
    //	Env     []EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,6,rep,name=env"`
    Resources ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,7,opt,name=resources"`
    //	VolumeMounts []VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,8,rep,name=volumeMounts"`
    ImagePullPolicy string `json:"imagePullPolicy,omitempty" protobuf:"bytes,8,opt,name=imagePullPolicy"`
}

type Metadata Uses

type Metadata struct {
    Labels map[string]string `json:"labels,omitempty"`
    Name   string            `json:"name,omitempty"`
}

type ResourceList Uses

type ResourceList map[ResourceName]float64

type ResourceName Uses

type ResourceName string

type ResourceRequirements Uses

type ResourceRequirements struct {
    Limits ResourceList `json:"requests,omitempty" protobuf:"bytes,1,rep,name=limits"`
}

ResourceRequirements describes the compute resource requirements.

type Volume Uses

type Volume struct {
    Name string `json:"name,omitempty"`
}

type ZunProvider Uses

type ZunProvider struct {
    ZunClient *gophercloud.ServiceClient
    // contains filtered or unexported fields
}

ZunProvider implements the virtual-kubelet provider interface and communicates with OpenStack's Zun APIs.

func NewZunProvider Uses

func NewZunProvider(config string, rm *manager.ResourceManager, nodeName string, operatingSystem string, daemonEndpointPort int32) (*ZunProvider, error)

NewZunProvider creates a new ZunProvider.

func (*ZunProvider) Capacity Uses

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

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

func (*ZunProvider) CreatePod Uses

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

CreatePod accepts a Pod definition and creates an Zun deployment

func (*ZunProvider) DeletePod Uses

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

DeletePod deletes the specified pod out of Zun.

func (*ZunProvider) GetContainerLogs Uses

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

func (*ZunProvider) GetPod Uses

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

GetPod returns a pod by name that is running inside Zun returns nil if a pod by that name is not found.

func (*ZunProvider) GetPodStatus Uses

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

GetPodStatus returns the status of a pod by name that is running inside Zun returns nil if a pod by that name is not found.

func (*ZunProvider) GetPods Uses

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

GetPods returns a list of all pods known to be running within Zun.

func (*ZunProvider) NodeAddresses Uses

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

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

func (*ZunProvider) NodeConditions Uses

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

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

func (*ZunProvider) NodeDaemonEndpoints Uses

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

NodeDaemonEndpoints returns NodeDaemonEndpoints for the node status within Kubernetes.

func (*ZunProvider) OperatingSystem Uses

func (p *ZunProvider) OperatingSystem() string

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

func (*ZunProvider) RunInContainer Uses

func (p *ZunProvider) 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.

func (*ZunProvider) UpdatePod Uses

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

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

Package openstack imports 22 packages (graph). Updated 2019-10-31. Refresh now. Tools for package owners.