Documentation ¶
Index ¶
- type AuthConfig
- type ECIProvider
- func (p *ECIProvider) Capacity(ctx context.Context) v1.ResourceList
- func (p *ECIProvider) CreatePod(ctx context.Context, pod *v1.Pod) error
- func (p *ECIProvider) DeletePod(ctx context.Context, pod *v1.Pod) error
- func (p *ECIProvider) ExecInContainer(name string, uid types.UID, container string, cmd []string, in io.Reader, ...) error
- func (p *ECIProvider) GetCgs() []eci.ContainerGroup
- func (p *ECIProvider) GetContainerLogs(ctx context.Context, namespace, podName, containerName string, tail int) (string, error)
- func (p *ECIProvider) GetPod(ctx context.Context, namespace, name string) (*v1.Pod, error)
- func (p *ECIProvider) GetPodFullName(namespace string, pod string) string
- func (p *ECIProvider) GetPodStatus(ctx context.Context, namespace, name string) (*v1.PodStatus, error)
- func (p *ECIProvider) GetPods(ctx context.Context) ([]*v1.Pod, error)
- func (p *ECIProvider) NodeAddresses(ctx context.Context) []v1.NodeAddress
- func (p *ECIProvider) NodeConditions(ctx context.Context) []v1.NodeCondition
- func (p *ECIProvider) NodeDaemonEndpoints(ctx context.Context) *v1.NodeDaemonEndpoints
- func (p *ECIProvider) OperatingSystem() string
- func (p *ECIProvider) 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 AuthConfig ¶
type AuthConfig struct { Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` Auth string `json:"auth,omitempty"` Email string `json:"email,omitempty"` ServerAddress string `json:"serveraddress,omitempty"` IdentityToken string `json:"identitytoken,omitempty"` RegistryToken string `json:"registrytoken,omitempty"` }
AuthConfig is the secret returned from an ImageRegistryCredential
type ECIProvider ¶
type ECIProvider struct {
// contains filtered or unexported fields
}
ECIProvider implements the virtual-kubelet provider interface and communicates with Alibaba Cloud's ECI APIs.
func NewECIProvider ¶
func NewECIProvider(config string, rm *manager.ResourceManager, nodeName, operatingSystem string, internalIP string, daemonEndpointPort int32) (*ECIProvider, error)
NewECIProvider creates a new ECIProvider.
func (*ECIProvider) Capacity ¶
func (p *ECIProvider) Capacity(ctx context.Context) v1.ResourceList
Capacity returns a resource list containing the capacity limits set for ECI.
func (*ECIProvider) ExecInContainer ¶
func (p *ECIProvider) ExecInContainer(name string, uid types.UID, container string, cmd []string, in io.Reader, out, errstream io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize, timeout time.Duration) error
ExecInContainer executes a command in a container in the pod, copying data between in/out/err and the container's stdin/stdout/stderr.
func (*ECIProvider) GetCgs ¶
func (p *ECIProvider) GetCgs() []eci.ContainerGroup
func (*ECIProvider) GetContainerLogs ¶
func (p *ECIProvider) GetContainerLogs(ctx context.Context, namespace, podName, containerName string, tail int) (string, error)
GetContainerLogs returns the logs of a pod by name that is running inside ECI.
func (*ECIProvider) GetPod ¶
GetPod returns a pod by name that is running inside ECI returns nil if a pod by that name is not found.
func (*ECIProvider) GetPodFullName ¶
func (p *ECIProvider) GetPodFullName(namespace string, pod string) string
Get full pod name as defined in the provider context
func (*ECIProvider) GetPodStatus ¶
func (p *ECIProvider) GetPodStatus(ctx context.Context, namespace, name string) (*v1.PodStatus, error)
GetPodStatus returns the status of a pod by name that is running inside ECI returns nil if a pod by that name is not found.
func (*ECIProvider) NodeAddresses ¶
func (p *ECIProvider) NodeAddresses(ctx context.Context) []v1.NodeAddress
NodeAddresses returns a list of addresses for the node status within Kubernetes.
func (*ECIProvider) NodeConditions ¶
func (p *ECIProvider) NodeConditions(ctx context.Context) []v1.NodeCondition
NodeConditions returns a list of conditions (Ready, OutOfDisk, etc), for updates to the node status within Kubernetes.
func (*ECIProvider) NodeDaemonEndpoints ¶
func (p *ECIProvider) NodeDaemonEndpoints(ctx context.Context) *v1.NodeDaemonEndpoints
NodeDaemonEndpoints returns NodeDaemonEndpoints for the node status within Kubernetes.
func (*ECIProvider) OperatingSystem ¶
func (p *ECIProvider) OperatingSystem() string
OperatingSystem returns the operating system that was provided by the config.