seedstatuscontroller

package
v2.25.3 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package seedstatuscontroller contains a controller that is responsible for managing the basic parts of the SeedStatus:

  • status.versions.kubermatic
  • status.versions.cluster
  • status.conditions.SeedConditionKubeconfigValid
  • status.phase
  • status.clusters

It does so by checking the kubeconfig for a seed and combining the other conditions set by other controllers to compute the current phase.

Index

Constants

View Source
const (
	// SeedKubeconfigUnavailableReason is the reason for the SeedConditionKubeconfigValid
	// in case the kubeconfig does not exist and no client can be constructed.
	SeedKubeconfigUnavailableReason = "KubeconfigUnavailable"
	// SeedKubeconfigUnavailableReason is the reason for the SeedConditionKubeconfigValid
	// in case the seed cluster was not yet prepared by the admin to be a seed (i.e. a
	// manual step is missing). This condition is not used anymore since KKP 2.21.
	SeedClusterUninitializedReason = "ClusterUninitialized"
	// SeedKubeconfigInvalidReason is the reason for the SeedConditionKubeconfigValid
	// in case no functioning client could be constructed using the given kubeconfig.
	SeedKubeconfigInvalidReason = "KubeconfigInvalid"
	// SeedKubeconfigValidReason is the reason for the SeedConditionKubeconfigValid
	// in case everything is OK.
	SeedKubeconfigValidReason = "KubeconfigValid"
)
View Source
const (
	// ControllerName is the name of this very controller.
	ControllerName = "kkp-seed-status-controller"
)

Variables

This section is empty.

Functions

func Add

func Add(
	ctx context.Context,
	mgr manager.Manager,
	numWorkers int,
	log *zap.SugaredLogger,
	namespace string,
	seedKubeconfigGetter provider.SeedKubeconfigGetter,
	versions kubermatic.Versions,
) error

Add creates a new seed status controller and sets up watches.

Types

type Reconciler

type Reconciler struct {
	ctrlruntimeclient.Client
	// contains filtered or unexported fields
}

Reconciler watches the seed status and updates the phase, versions and the SeedConditionKubeconfigValid condition.

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)

Jump to

Keyboard shortcuts

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