instances

package
v0.103.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AutomaticReconcileDefaultDuration specifies the default automatic reconcile duration.
	AutomaticReconcileDefaultDuration = 12 * time.Hour
)

Variables

View Source
var (
	// ClusterKubeconfigExportLabel is the label for the cluster kubeconfig export data object.
	ClusterKubeconfigExportLabel = fmt.Sprintf("%s=%s", lsv1alpha1.DataObjectKeyLabel, lsinstallation.UserKubeconfigExportName)
	// ClusterEndpointExportLabel is the label for the cluster api export data object.
	ClusterEndpointExportLabel = fmt.Sprintf("%s=%s", lsv1alpha1.DataObjectKeyLabel, lsinstallation.ClusterEndpointExportName)
)

Functions

func AddControllerToManager

func AddControllerToManager(logger logging.Logger, mgr manager.Manager, config *config.LandscaperServiceConfiguration) error

AddControllerToManager adds the instances controller to the manager

func InstallationSpecDeepEquals

func InstallationSpecDeepEquals(specA, specB *lsv1alpha1.InstallationSpec) bool

InstallationSpecDeepEquals test whether two installation specs are deeply equal.

func NewController

NewController returns a new instances controller

Types

type Controller

type Controller struct {
	operation.Operation

	UniqueIDFunc func() string

	ReconcileFunc    func(ctx context.Context, instance *lssv1alpha1.Instance) error
	HandleDeleteFunc func(ctx context.Context, instance *lssv1alpha1.Instance) (reconcile.Result, error)
	ListShootsFunc   func(ctx context.Context, instance *lssv1alpha1.Instance) (*unstructured.UnstructuredList, error)
	// contains filtered or unexported fields
}

Controller is the instances controller

func NewTestActuator

func NewTestActuator(op operation.Operation, logger logging.Logger) *Controller

NewTestActuator creates a new controller for testing purposes.

func (*Controller) NewUniqueID

func (c *Controller) NewUniqueID() string

NewUniqueID creates a new unique id string with a length of 8.

func (*Controller) Reconcile

func (c *Controller) Reconcile(ctx context.Context, req reconcile.Request) (reconcile.Result, error)

Reconcile reconciles requests for instances

type TestKubeClientExtractor

type TestKubeClientExtractor struct {
}

func (*TestKubeClientExtractor) GetKubeClientFromServiceTargetConfig

func (t *TestKubeClientExtractor) GetKubeClientFromServiceTargetConfig(_ context.Context, _ string, _ string, client client.Client) (client.Client, error)

Jump to

Keyboard shortcuts

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