plant

package
v1.7.1-0...-23dd39d Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const FinalizerName = "core.gardener.cloud/plant"

FinalizerName is the name of the Plant finalizer.

View Source
const Unknown = "<unknown>"

Unknown is a constant to be used for unknown cloud info

Variables

This section is empty.

Functions

func NewPlantReconciler

func NewPlantReconciler(l logrus.FieldLogger, clientMap clientmap.ClientMap, gardenClient client.Client, config *config.PlantControllerConfiguration, secretsLister kubecorev1listers.SecretLister) reconcile.Reconciler

NewPlantReconciler creates a new instance of a reconciler which reconciles Plants.

Types

type Controller

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

Controller controls Plant.

func NewController

func NewController(
	ctx context.Context,
	clientMap clientmap.ClientMap,
	kubeInformerFactory kubeinformers.SharedInformerFactory,
	config *config.ControllerManagerConfiguration,
) (
	*Controller,
	error,
)

NewController instantiates a new Plant controller.

func (*Controller) CollectMetrics

func (c *Controller) CollectMetrics(ch chan<- prometheus.Metric)

CollectMetrics implements gardenmetrics.ControllerMetricsCollector interface

func (*Controller) Run

func (c *Controller) Run(ctx context.Context, workers int)

Run runs the Controller until the given stop channel can be read from.

func (*Controller) RunningWorkers

func (c *Controller) RunningWorkers() int

RunningWorkers returns the number of running workers.

type HealthChecker

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

HealthChecker contains the condition thresholds.

func NewHealthChecker

func NewHealthChecker(plantClient client.Client, discoveryClient discovery.DiscoveryInterface) *HealthChecker

NewHealthChecker creates a new health checker.

func (*HealthChecker) CheckAPIServerAvailability

func (h *HealthChecker) CheckAPIServerAvailability(ctx context.Context, condition gardencorev1beta1.Condition) gardencorev1beta1.Condition

CheckAPIServerAvailability checks if the API server of a Plant cluster is reachable and measure the response time.

func (*HealthChecker) CheckPlantClusterNodes

func (h *HealthChecker) CheckPlantClusterNodes(ctx context.Context, condition gardencorev1beta1.Condition) gardencorev1beta1.Condition

CheckPlantClusterNodes checks whether cluster nodes in the given listers are complete and healthy.

type StatusCloudInfo

type StatusCloudInfo struct {
	CloudType  string
	Region     string
	K8sVersion string
}

StatusCloudInfo contains the cloud info for the plant status

func FetchCloudInfo

func FetchCloudInfo(ctx context.Context, plantClient client.Client, discoveryClient discovery.DiscoveryInterface, logger logrus.FieldLogger) (*StatusCloudInfo, error)

FetchCloudInfo deduces the cloud info from the plant cluster

Jump to

Keyboard shortcuts

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