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

package huawei

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

Index

Package Files

cci.go cciMock.go config.go

type CCIMock Uses

type CCIMock struct {
    OnCreateProject func(*v1.Namespace) (int, interface{})
    OnCreatePod     func(*v1.Pod) (int, interface{})
    OnGetPods       func() (int, interface{})
    OnGetPod        func(string, string) (int, interface{})
    // contains filtered or unexported fields
}

CCIMock implements a CCI service mock server.

func NewCCIMock Uses

func NewCCIMock() *CCIMock

NewCCIMock creates a CCI service mock server.

func (*CCIMock) Close Uses

func (mock *CCIMock) Close()

Close terminates the CCI mock server.

func (*CCIMock) GetServerURL Uses

func (mock *CCIMock) GetServerURL() string

GetServerURL returns the mock server URL.

type CCIProvider Uses

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

CCIProvider implements the virtual-kubelet provider interface and communicates with Huawei's CCI APIs.

func NewCCIProvider Uses

func NewCCIProvider(config string, rm *manager.ResourceManager, nodeName, operatingSystem string, internalIP string, daemonEndpointPort int32) (*CCIProvider, error)

NewCCIProvider creates a new CCI provider.

func (*CCIProvider) Capacity Uses

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

Capacity returns a resource list with the capacity constraints of the huawei CCI provider.

func (*CCIProvider) CreatePod Uses

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

CreatePod takes a Kubernetes Pod and deploys it within the huawei CCI provider.

func (*CCIProvider) DeletePod Uses

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

DeletePod takes a Kubernetes Pod and deletes it from the huawei CCI provider.

func (*CCIProvider) GetContainerLogs Uses

func (p *CCIProvider) 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 huawei CCI provider.

func (*CCIProvider) GetPod Uses

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

GetPod retrieves a pod by name from the huawei CCI provider.

func (*CCIProvider) GetPodFullName Uses

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

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

func (*CCIProvider) GetPodStatus Uses

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

GetPodStatus retrieves the status of a pod by name from the huawei CCI provider.

func (*CCIProvider) GetPods Uses

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

GetPods retrieves a list of all pods running on the huawei CCI provider.

func (*CCIProvider) NodeAddresses Uses

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

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

func (*CCIProvider) NodeConditions Uses

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

NodeConditions returns a list of conditions (Ready, OutOfDisk, etc), which is polled periodically to update the node status within Kubernetes.

func (*CCIProvider) NodeDaemonEndpoints Uses

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

NodeDaemonEndpoints returns NodeDaemonEndpoints for the node status within Kubernetes.

func (*CCIProvider) OperatingSystem Uses

func (p *CCIProvider) OperatingSystem() string

OperatingSystem returns the operating system the huawei CCI provider is for.

func (*CCIProvider) RunInContainer Uses

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

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

UpdatePod takes a Kubernetes Pod and updates it within the huawei CCI provider.

type Client Uses

type Client struct {
    Signer     auth.Signer
    HTTPClient http.Client
}

Client represents the client config for Huawei.

Directories

PathSynopsis
auth

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