vkubelet

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2018 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

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
}

APIConfig is used to configure the API server of the virtual kubelet.

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
	PodSyncWorkers  int
	PodInformer     corev1informers.PodInformer
}

Config is used to configure a new server.

type PodController added in v0.7.3

type PodController struct {
	// contains filtered or unexported fields
}

PodController is the controller implementation for Pod resources.

func NewPodController added in v0.7.3

func NewPodController(server *Server) *PodController

NewPodController returns a new instance of PodController.

func (*PodController) Run added in v0.7.3

func (pc *PodController) Run(ctx context.Context, threadiness int) error

Run will set up the event handlers for types we are interested in, as well as syncing informer caches and starting workers. It will block until stopCh is closed, at which point it will shutdown the work queue and wait for workers to finish processing their current work items.

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 creates and starts an instance of the pod controller, blocking until it stops.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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