extension

package
v1.105.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultInterval is the default interval for retry operations.
	DefaultInterval = 5 * time.Second
	// DefaultSevereThreshold is the default threshold until an error reported by another component is treated as 'severe'.
	DefaultSevereThreshold = 30 * time.Second
	// DefaultTimeout is the default timeout and defines how long Gardener should wait
	// for a successful reconciliation of an Extension resource.
	DefaultTimeout = 3 * time.Minute
)

Variables

View Source
var TimeNow = time.Now

TimeNow returns the current time. Exposed for testing.

Functions

This section is empty.

Types

type Extension

type Extension struct {
	extensionsv1alpha1.Extension
	// Timeout is the maximum waiting time for the Extension status to report readiness.
	Timeout time.Duration
	// Lifecycle defines when an extension resource should be updated during different operations.
	Lifecycle *gardencorev1beta1.ControllerResourceLifecycle
}

Extension contains information about the desired Extension resources as well as configuration information.

type Interface

type Interface interface {
	// DeleteStaleResources deletes unused Extension resources from the shoot namespace in the seed.
	DeleteStaleResources(context.Context) error
	// WaitCleanupStaleResources waits until all unused Extension resources are cleaned up.
	WaitCleanupStaleResources(context.Context) error
	// Extensions returns the map of extensions where the key is the type and the value is an Extension structure.
	Extensions() map[string]Extension

	// DeployBeforeKubeAPIServer deploys extensions that should be handled before the kube-apiserver.
	DeployBeforeKubeAPIServer(context.Context) error
	// RestoreBeforeKubeAPIServer restores extensions that should be handled before the kube-apiserver.
	RestoreBeforeKubeAPIServer(context.Context, *gardencorev1beta1.ShootState) error
	// WaitBeforeKubeAPIServer waits until all extensions that should be handled before the kube-apiserver are deployed and report readiness.
	WaitBeforeKubeAPIServer(context.Context) error

	// DeployAfterKubeAPIServer deploys extensions that should be handled after the kube-apiserver.
	DeployAfterKubeAPIServer(ctx context.Context) error
	// RestoreAfterKubeAPIServer restores extensions that should be handled after the kube-apiserver.
	RestoreAfterKubeAPIServer(ctx context.Context, shootState *gardencorev1beta1.ShootState) error
	// WaitAfterKubeAPIServer waits until all extensions that should be handled after the kube-apiserver are deployed and report readiness.
	WaitAfterKubeAPIServer(ctx context.Context) error

	// DeployAfterWorker deploys extensions that should be handled after the workers.
	DeployAfterWorker(ctx context.Context) error
	// RestoreAfterWorker restores extensions that should be handled after the workers.
	RestoreAfterWorker(ctx context.Context, shootState *gardencorev1beta1.ShootState) error
	// WaitAfterWorker waits until all extensions that should be handled after the workers are deployed and report readiness.
	WaitAfterWorker(ctx context.Context) error

	// DestroyBeforeKubeAPIServer deletes the extensions that should be handled before the kube-apiserver.
	DestroyBeforeKubeAPIServer(context.Context) error
	// WaitCleanupBeforeKubeAPIServer waits until the extensions that should be handled before the kube-apiserver are cleaned up.
	WaitCleanupBeforeKubeAPIServer(context.Context) error

	// DestroyAfterKubeAPIServer deletes the extensions that should be handled after the kube-apiserver.
	DestroyAfterKubeAPIServer(context.Context) error
	// WaitCleanupAfterKubeAPIServer waits until the extensions that should be handled after the kube-apiserver are cleaned up.
	WaitCleanupAfterKubeAPIServer(context.Context) error

	// WaitCleanup waits until all extensions are cleaned up.
	WaitCleanup(ctx context.Context) error

	// MigrateBeforeKubeAPIServer migrates all Extension resources that should be handled before the kube-apiserver.
	MigrateBeforeKubeAPIServer(ctx context.Context) error
	// WaitMigrateBeforeKubeAPIServer waits until all Extension resources that should be handled before the kube-apiserver are migrated.
	WaitMigrateBeforeKubeAPIServer(ctx context.Context) error

	// MigrateAfterKubeAPIServer migrates all Extension resources that should be handled after the kube-apiserver.
	MigrateAfterKubeAPIServer(ctx context.Context) error
	// WaitMigrateAfterKubeAPIServer waits until all Extension resources that should be handled after the kube-apiserver are migrated.
	WaitMigrateAfterKubeAPIServer(ctx context.Context) error
}

Interface contains references to an Extension deployer.

func New

func New(
	log logr.Logger,
	client client.Client,
	values *Values,
	waitInterval time.Duration,
	waitSevereThreshold time.Duration,
	waitTimeout time.Duration,
) Interface

New creates a new instance of Extension deployer.

type Values

type Values struct {
	// Namespace is the namespace into which the Extension resources should be deployed.
	Namespace string
	// Extensions is the map of extensions where the key is the type and the value is an Extension structure.
	Extensions map[string]Extension
}

Values contains the values used to create an Extension resources.

Directories

Path Synopsis
Package extension is a generated GoMock package.
Package extension is a generated GoMock package.

Jump to

Keyboard shortcuts

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