Files
virtual-kubelet/vkubelet/provider.go
Sam J Sharpe 922364ee5f Correct typo kuberentes->kubernetes (#58)
This seems to be a common typo, possibly exacerbated by copy-paste
of comment strings. I spotted it in the README.md at first, so I fixed
that and then checked the rest of the code and fixed a few more. They
are all in comments or documentation, so there's no code issue.

FYI, there's still some in the vendor directory, but I haven't fixed
those as they'd get replaced by any new `go get` I think:

$ ack uberentes
vendor/k8s.io/apimachinery/hack/godep-deps.sh
20:# 2. godep restore based on k8s.io/kuberentes provided manifest

vendor/k8s.io/client-go/CHANGELOG.md
120:* Included bug fixes in k8s.io/kuberentes release-1.5 branch, up to

vendor/k8s.io/client-go/kubernetes/fake/register.go
64://     clientsetscheme "k8s.io/client-go/kuberentes/scheme"

vendor/k8s.io/client-go/kubernetes/scheme/register.go
64://     clientsetscheme "k8s.io/client-go/kuberentes/scheme"

Sorry, this isn't the most exciting commit in the world :-(
2018-01-11 12:37:04 -08:00

56 lines
2.0 KiB
Go

package vkubelet
import (
"github.com/virtual-kubelet/virtual-kubelet/providers/azure"
"github.com/virtual-kubelet/virtual-kubelet/providers/hypersh"
"github.com/virtual-kubelet/virtual-kubelet/providers/web"
"k8s.io/api/core/v1"
)
// Compile time proof that our implementations meet the Provider interface.
var _ Provider = (*azure.ACIProvider)(nil)
var _ Provider = (*hypersh.HyperProvider)(nil)
var _ Provider = (*web.BrokerProvider)(nil)
// Provider contains the methods required to implement a virtual-kubelet 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
}