Documentation ¶
Overview ¶
Package web provides an implementation of the virtual kubelet provider interface by forwarding all calls to a web endpoint. The web endpoint to which requests must be forwarded must be specified through an environment variable called `WEB_ENDPOINT_URL`. This endpoint must implement the following HTTP APIs:
- POST /createPod
- PUT /updatePod
- DELETE /deletePod
- GET /getPod?namespace=[namespace]&name=[pod name]
- GE /getContainerLogs?namespace=[namespace]&podName=[pod name]&containerName=[container name]&tail=[tail value]
- GET /getPodStatus?namespace=[namespace]&name=[pod name]
- GET /getPods
- GET /capacity
- GET /nodeConditions
- GET /nodeAddresses
Index ¶
- type BrokerProvider
- func (p *BrokerProvider) Capacity() v1.ResourceList
- func (p *BrokerProvider) CreatePod(pod *v1.Pod) error
- func (p *BrokerProvider) DeletePod(pod *v1.Pod) error
- func (p *BrokerProvider) GetContainerLogs(namespace, podName, containerName string, tail int) (string, error)
- func (p *BrokerProvider) GetPod(namespace, name string) (*v1.Pod, error)
- func (p *BrokerProvider) GetPodStatus(namespace, name string) (*v1.PodStatus, error)
- func (p *BrokerProvider) GetPods() ([]*v1.Pod, error)
- func (p *BrokerProvider) NodeAddresses() []v1.NodeAddress
- func (p *BrokerProvider) NodeConditions() []v1.NodeCondition
- func (p *BrokerProvider) NodeDaemonEndpoints() *v1.NodeDaemonEndpoints
- func (p *BrokerProvider) OperatingSystem() string
- func (p *BrokerProvider) UpdatePod(pod *v1.Pod) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrokerProvider ¶
type BrokerProvider struct {
// contains filtered or unexported fields
}
BrokerProvider implements the virtual-kubelet provider interface by forwarding kubelet calls to a web endpoint.
func NewBrokerProvider ¶
func NewBrokerProvider(nodeName, operatingSystem string, daemonEndpointPort int32) (*BrokerProvider, error)
NewBrokerProvider creates a new BrokerProvider
func (*BrokerProvider) Capacity ¶
func (p *BrokerProvider) Capacity() v1.ResourceList
Capacity returns a resource list containing the capacity limits
func (*BrokerProvider) CreatePod ¶
func (p *BrokerProvider) CreatePod(pod *v1.Pod) error
CreatePod accepts a Pod definition and forwards the call to the web endpoint
func (*BrokerProvider) DeletePod ¶
func (p *BrokerProvider) DeletePod(pod *v1.Pod) error
DeletePod accepts a Pod definition and forwards the call to the web endpoint
func (*BrokerProvider) GetContainerLogs ¶
func (p *BrokerProvider) GetContainerLogs(namespace, podName, containerName string, tail int) (string, error)
GetContainerLogs returns the logs of a container running in a pod by name.
func (*BrokerProvider) GetPod ¶
func (p *BrokerProvider) GetPod(namespace, name string) (*v1.Pod, error)
GetPod returns a pod by name that is being managed by the web server
func (*BrokerProvider) GetPodStatus ¶
func (p *BrokerProvider) GetPodStatus(namespace, name string) (*v1.PodStatus, error)
GetPodStatus retrieves the status of a given pod by name.
func (*BrokerProvider) GetPods ¶
func (p *BrokerProvider) GetPods() ([]*v1.Pod, error)
GetPods retrieves a list of all pods scheduled to run.
func (*BrokerProvider) NodeAddresses ¶
func (p *BrokerProvider) NodeAddresses() []v1.NodeAddress
NodeAddresses returns a list of addresses for the node status within Kubernetes.
func (*BrokerProvider) NodeConditions ¶
func (p *BrokerProvider) NodeConditions() []v1.NodeCondition
NodeConditions returns a list of conditions (Ready, OutOfDisk, etc), for updates to the node status
func (*BrokerProvider) NodeDaemonEndpoints ¶
func (p *BrokerProvider) NodeDaemonEndpoints() *v1.NodeDaemonEndpoints
NodeDaemonEndpoints returns NodeDaemonEndpoints for the node status within Kubernetes.
func (*BrokerProvider) OperatingSystem ¶
func (p *BrokerProvider) OperatingSystem() string
OperatingSystem returns the operating system for this provider.