vkubelet

package
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2018 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PodStatusReason_ProviderFailed = "ProviderFailed"
)

Variables

This section is empty.

Functions

func InstrumentHandler added in v0.6.2

func InstrumentHandler(h http.Handler) http.Handler

InstrumentHandler wraps an http.Handler and injects instrumentation into the request context.

func KubeletServerStart added in v0.5.2

func KubeletServerStart(p providers.Provider, l net.Listener, cert, key string)

KubeletServerStart starts the virtual kubelet HTTP server.

func MetricsServerStart added in v0.5.2

func MetricsServerStart(p providers.Provider, l net.Listener)

MetricsServerStart starts an HTTP server on the provided addr for serving the kubelset summary stats API.

func MetricsSummaryHandler added in v0.6.2

func MetricsSummaryHandler(p providers.Provider) http.Handler

MetricsSummaryHandler creates an http handler for serving pod metrics.

If the passed in provider does not implement providers.PodMetricsProvider, it will create handlers that just serves http.StatusNotImplemented

func NotFound

func NotFound(w http.ResponseWriter, r *http.Request)

NotFound provides a handler for cases where the requested endpoint doesn't exist

func NotImplemented added in v0.6.2

func NotImplemented(w http.ResponseWriter, r *http.Request)

NotImplemented provides a handler for cases where a provider does not implement a given API

func PodHandler added in v0.6.2

func PodHandler(p providers.Provider) http.Handler

PodHandler creates an http handler for interacting with pods/containers.

Types

type APIConfig added in v0.6.2

type APIConfig struct {
	CertPath string
	KeyPath  string
	Addr     string
}

type Config added in v0.6.2

type Config struct {
	APIConfig       APIConfig
	Client          *kubernetes.Clientset
	MetricsAddr     string
	Namespace       string
	NodeName        string
	Provider        providers.Provider
	ResourceManager *manager.ResourceManager
	Taint           *corev1.Taint
}

Config is used to configure a new server.

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(ctx context.Context, cfg Config) (s *Server, retErr error)

New creates a new virtual-kubelet server.

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

Run starts the server, registers it with Kubernetes and begins watching/reconciling the cluster. Run will block until Stop is called or a SIGINT or SIGTERM signal is received.

func (*Server) Stop

func (s *Server) Stop()

Stop shutsdown the server. It does not shutdown pods assigned to the virtual node.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL