controller

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: May 14, 2019 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FinalizerDeleteInstance = "machine-delete-finalizer"
	FinalizerDeleteNode     = "machine-node-delete-finalizer"

	// AnnotationMachineUninitialized indicates that a machine is not yet
	// ready to be worked on by the machine-controller. The machine-controller
	// will ignore all machines that have this anotation with any value
	// Its value should consist of one or more initializers, separated by a comma
	AnnotationMachineUninitialized = "machine-controller.kubermatic.io/initializers"

	NodeOwnerLabelName = "machine-controller/owned-by"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

Controller is the controller implementation for machine resources

func NewMachineController

func NewMachineController(
	kubeClient kubernetes.Interface,
	machineClient clusterv1alpha1clientset.Interface,
	nodeInformer cache.SharedIndexInformer,
	nodeLister listerscorev1.NodeLister,
	machineInformer cache.SharedIndexInformer,
	machineLister clusterlistersv1alpha1.MachineLister,
	secretSystemNsLister listerscorev1.SecretLister,
	pvLister listerscorev1.PersistentVolumeLister,
	clusterDNSIPs []net.IP,
	metrics *MetricsCollection,
	prometheusRegistry prometheus.Registerer,
	kubeconfigProvider KubeconfigProvider,
	joinClusterTimeout *time.Duration,
	externalCloudProvider bool,
	name string,
	bootstrapTokenServiceAccountName *types.NamespacedName,
	skipEvictionAfter time.Duration,
) (*Controller, error)

NewMachineController returns a new machine controller.

func (*Controller) ReadinessChecks

func (c *Controller) ReadinessChecks() map[string]healthcheck.Check

func (*Controller) Run

func (c *Controller) Run(threadiness int, stopCh <-chan struct{}) error

Run starts the control loop

type KubeconfigProvider

type KubeconfigProvider interface {
	GetKubeconfig() (*clientcmdapi.Config, error)
}

type MachineCollector

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

func NewMachineCollector

func NewMachineCollector(lister v1alpha1.MachineLister, kubeClient kubernetes.Interface) *MachineCollector

func (MachineCollector) Collect

func (mc MachineCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface.

func (MachineCollector) Describe

func (mc MachineCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements the prometheus.Collector interface.

type MetricsCollection

type MetricsCollection struct {
	Workers prometheus.Gauge
	Errors  prometheus.Counter
}

MetricsCollection is a struct of all metrics used in this controller.

func NewMachineControllerMetrics

func NewMachineControllerMetrics() *MetricsCollection

NewMachineControllerMetrics creates new MachineControllerMetrics with default values initialized, so metrics always show up.

Jump to

Keyboard shortcuts

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