Documentation
¶
Index ¶
Constants ¶
View Source
const ( FinalizerDeleteInstance = "machine-delete-finalizer" FinalizerDeleteNode = "machine-node-delete-finalizer" ControllerName = "machine-controller" // 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" // AnnotationAutoscalerIdentifier is used by the cluster-autoscaler // cluster-api provider to match Nodes to Machines. AnnotationAutoscalerIdentifier = "cluster.k8s.io/machine" // ProviderID pattern. ProviderIDPattern = "kubermatic://%s/%s" )
Variables ¶
This section is empty.
Functions ¶
func Add ¶
func Add( ctx context.Context, log *zap.SugaredLogger, mgr manager.Manager, kubeClient kubernetes.Interface, numWorkers int, metrics *MetricsCollection, kubeconfigProvider KubeconfigProvider, providerData *cloudprovidertypes.ProviderData, joinClusterTimeout *time.Duration, name string, bootstrapTokenServiceAccountName *types.NamespacedName, skipEvictionAfter time.Duration, nodeSettings NodeSettings, useExternalBootstrap bool, nodePortRange string, overrideBootstrapKubeletAPIServer string, ) error
Types ¶
type KubeconfigProvider ¶
type KubeconfigProvider interface {
GetKubeconfig(context.Context, *zap.SugaredLogger) (*clientcmdapi.Config, error)
GetBearerToken() string
}
type MachineCollector ¶
type MachineCollector struct {
// contains filtered or unexported fields
}
func NewMachineCollector ¶
func NewMachineCollector(ctx context.Context, client ctrlruntimeclient.Client) *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
Provisioning prometheus.Histogram
Deprovisioning prometheus.Histogram
}
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.
func (*MetricsCollection) MustRegister ¶
func (mc *MetricsCollection) MustRegister(registerer prometheus.Registerer)
type NodeSettings ¶
type NodeSettings struct {
// Translates to --cluster-dns on the kubelet.
ClusterDNSIPs []net.IP
// If set, this proxy will be configured on all nodes.
HTTPProxy string
// If set this will be set as NO_PROXY on the node.
NoProxy string
// If set, those registries will be configured as insecure on the container runtime.
InsecureRegistries []string
// If set, these mirrors will be take for pulling all required images on the node.
RegistryMirrors []string
// Translates to --pod-infra-container-image on the kubelet. If not set, the kubelet will default it.
PauseImage string
// Translates to feature gates on the kubelet.
// Default: RotateKubeletServerCertificate=true
KubeletFeatureGates map[string]bool
// Used to set kubelet flag --cloud-provider=external
ExternalCloudProvider bool
// container runtime to install
ContainerRuntime containerruntime.Config
// Registry credentials secret object reference
RegistryCredentialsSecretRef string
}
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
Reconciler is the controller implementation for machine resources.
func (*Reconciler) ReadinessChecks ¶
func (r *Reconciler) ReadinessChecks(ctx context.Context) map[string]healthcheck.Check
Click to show internal directories.
Click to hide internal directories.