Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApiServerHandler ¶
func ApiServerHandler(w http.ResponseWriter, req *http.Request)
func ApiserverStart ¶
func ApiserverStart(provider Provider)
Types ¶
type Provider ¶
type Provider interface { // CreatePod takes a Kubernetes Pod and deploys it within the provider. CreatePod(pod *v1.Pod) error // UpdatePod takes a Kubernetes Pod and updates it within the provider. UpdatePod(pod *v1.Pod) error // DeletePod takes a Kubernetes Pod and deletes it from the provider. DeletePod(pod *v1.Pod) error // GetPod retrieves a pod by name from the provider (can be cached). GetPod(namespace, name string) (*v1.Pod, error) // GetContainerLogs retrieves the logs of a container by name from the provider. GetContainerLogs(namespace, podName, containerName string, tail int) (string, error) // GetPodStatus retrieves the status of a pod by name from the provider. GetPodStatus(namespace, name string) (*v1.PodStatus, error) // GetPods retrieves a list of all pods running on the provider (can be cached). GetPods() ([]*v1.Pod, error) // Capacity returns a resource list with the capacity constraints of the provider. Capacity() v1.ResourceList // NodeConditions returns a list of conditions (Ready, OutOfDisk, etc), which is polled periodically to update the node status // within Kubernetes. NodeConditions() []v1.NodeCondition // NodeAddresses returns a list of addresses for the node status // within Kubernetes. NodeAddresses() []v1.NodeAddress // NodeDaemonEndpoints returns NodeDaemonEndpoints for the node status // within Kubernetes. NodeDaemonEndpoints() *v1.NodeDaemonEndpoints // OperatingSystem returns the operating system the provider is for. OperatingSystem() string }
Provider contains the methods required to implement a virtual-kubelet provider.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server masquarades itself as a kubelet and allows for the virtual node to be backed by non-vm/node providers.
func New ¶
func New(nodeName, operatingSystem, namespace, kubeConfig, taint, provider, providerConfig string) (*Server, error)
New creates a new virtual-kubelet server.
Click to show internal directories.
Click to hide internal directories.