Documentation ¶
Index ¶
- Constants
- func KubeResourcesFromVchInfo(op trace.Operation, info *models.VCHInfo) v1.ResourceList
- func LocalInstance() bool
- func NilProxy(caller, proxyName string) error
- type CreateResponse
- type DockerClient
- type VicConfig
- type VicDockerClient
- type VicProvider
- func (v *VicProvider) Capacity() v1.ResourceList
- func (v *VicProvider) CreatePod(pod *v1.Pod) error
- func (v *VicProvider) DeletePod(pod *v1.Pod) error
- func (v *VicProvider) GetContainerLogs(namespace, podName, containerName string, tail int) (string, error)
- func (v *VicProvider) GetPod(namespace, name string) (*v1.Pod, error)
- func (v *VicProvider) GetPodStatus(namespace, name string) (*v1.PodStatus, error)
- func (v *VicProvider) GetPods() ([]*v1.Pod, error)
- func (v *VicProvider) NodeAddresses() []v1.NodeAddress
- func (v *VicProvider) NodeConditions() []v1.NodeCondition
- func (v *VicProvider) NodeDaemonEndpoints() *v1.NodeDaemonEndpoints
- func (v *VicProvider) OperatingSystem() string
- func (v *VicProvider) UpdatePod(pod *v1.Pod) error
Constants ¶
const ( // Name of filename used in the endpoint vm LogFilename = "virtual-kubelet" // PanicLevel level, highest level of severity. Logs and then calls panic with the // message passed to Debug, Info, ... PanicLevel uint8 = iota // FatalLevel level. Logs and then calls `os.Exit(1)`. It will exit even if the // logging level is set to Panic. FatalLevel // ErrorLevel level. Logs. Used for errors that should definitely be noted. // Commonly used for hooks to send errors to an error tracking service. ErrorLevel // WarnLevel level. Non-critical entries that deserve eyes. WarnLevel // InfoLevel level. General operational entries about what's going on inside the // application. InfoLevel // DebugLevel level. Usually only enabled when debugging. Very verbose logging. DebugLevel )
Variables ¶
This section is empty.
Functions ¶
func KubeResourcesFromVchInfo ¶
KubeResourcesFromVchInfo returns a K8s node resource list, given the VCHInfo
func LocalInstance ¶
func LocalInstance() bool
Types ¶
type CreateResponse ¶
type DockerClient ¶
type DockerClient interface { Ping(op trace.Operation) error CreateContainer(op trace.Operation, config string) error PullImage(op trace.Operation, image string) error }
Super simplistic docker client for the virtual kubelet to perform some operations
func NewVicDockerClient ¶
func NewVicDockerClient(personaAddr string) DockerClient
type VicConfig ¶
type VicDockerClient ¶
type VicDockerClient struct {
// contains filtered or unexported fields
}
func (*VicDockerClient) CreateContainer ¶
func (v *VicDockerClient) CreateContainer(op trace.Operation, config string) error
type VicProvider ¶
type VicProvider struct {
// contains filtered or unexported fields
}
func NewVicProvider ¶
func NewVicProvider(configFile string, rm *manager.ResourceManager, nodeName, operatingSystem string) (*VicProvider, error)
func (*VicProvider) Capacity ¶
func (v *VicProvider) Capacity() v1.ResourceList
Capacity returns a resource list with the capacity constraints of the provider.
func (*VicProvider) CreatePod ¶
func (v *VicProvider) CreatePod(pod *v1.Pod) error
CreatePod takes a Kubernetes Pod and deploys it within the provider.
func (*VicProvider) DeletePod ¶
func (v *VicProvider) DeletePod(pod *v1.Pod) error
DeletePod takes a Kubernetes Pod and deletes it from the provider.
func (*VicProvider) GetContainerLogs ¶
func (v *VicProvider) GetContainerLogs(namespace, podName, containerName string, tail int) (string, error)
GetContainerLogs retrieves the logs of a container by name from the provider.
func (*VicProvider) GetPod ¶
func (v *VicProvider) GetPod(namespace, name string) (*v1.Pod, error)
GetPod retrieves a pod by name from the provider (can be cached).
func (*VicProvider) GetPodStatus ¶
func (v *VicProvider) GetPodStatus(namespace, name string) (*v1.PodStatus, error)
GetPodStatus retrieves the status of a pod by name from the provider. This function needs to return a status or the reconcile loop will stop running.
func (*VicProvider) GetPods ¶
func (v *VicProvider) GetPods() ([]*v1.Pod, error)
GetPods retrieves a list of all pods running on the provider (can be cached).
func (*VicProvider) NodeAddresses ¶
func (v *VicProvider) NodeAddresses() []v1.NodeAddress
NodeAddresses returns a list of addresses for the node status within Kubernetes.
func (*VicProvider) NodeConditions ¶
func (v *VicProvider) NodeConditions() []v1.NodeCondition
NodeConditions returns a list of conditions (Ready, OutOfDisk, etc), which is polled periodically to update the node status within Kubernetes.
func (*VicProvider) NodeDaemonEndpoints ¶
func (v *VicProvider) NodeDaemonEndpoints() *v1.NodeDaemonEndpoints
NodeDaemonEndpoints returns NodeDaemonEndpoints for the node status within Kubernetes.
func (*VicProvider) OperatingSystem ¶
func (v *VicProvider) OperatingSystem() string
OperatingSystem returns the operating system the provider is for.