lifecycle

package
v1.9.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Overview

Package lifecycle contains the handlers for the lifecycle hooks.

The implementation of the handlers is specifically designed for Cluster API E2E tests use cases. When implementing custom RuntimeExtension, it is only required to expose HandlerFunc with the signature defined in sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExtensionHandlers added in v1.3.0

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

ExtensionHandlers provides a common struct shared across the lifecycle hook handlers; this is convenient because in Cluster API's E2E tests all of them are using a controller runtime client and the same set of func to work with the config map where preloaded answers for lifecycle hooks are stored. NOTE: it is not mandatory to use a ExtensionHandlers in custom RuntimeExtension, what is important is to expose HandlerFunc with the signature defined in sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.

func NewExtensionHandlers added in v1.3.0

func NewExtensionHandlers(client client.Client) *ExtensionHandlers

NewExtensionHandlers returns a ExtensionHandlers for the lifecycle hooks handlers.

func (*ExtensionHandlers) DoAfterClusterUpgrade added in v1.3.0

DoAfterClusterUpgrade implements the HandlerFunc for the AfterClusterUpgrade hook. The hook answers with the response stored in a well know config map, thus allowing E2E tests to control the hook behaviour during a test. NOTE: custom RuntimeExtension, must implement the body of this func according to the specific use case.

func (*ExtensionHandlers) DoAfterControlPlaneInitialized added in v1.3.0

DoAfterControlPlaneInitialized implements the HandlerFunc for the AfterControlPlaneInitialized hook. The hook answers with the response stored in a well know config map, thus allowing E2E tests to control the hook behaviour during a test. NOTE: custom RuntimeExtension, must implement the body of this func according to the specific use case.

func (*ExtensionHandlers) DoAfterControlPlaneUpgrade added in v1.3.0

DoAfterControlPlaneUpgrade implements the HandlerFunc for the AfterControlPlaneUpgrade hook. The hook answers with the response stored in a well know config map, thus allowing E2E tests to control the hook behaviour during a test. NOTE: custom RuntimeExtension, must implement the body of this func according to the specific use case.

func (*ExtensionHandlers) DoBeforeClusterCreate added in v1.3.0

DoBeforeClusterCreate implements the HandlerFunc for the BeforeClusterCreate hook. The hook answers with the response stored in a well know config map, thus allowing E2E tests to control the hook behaviour during a test. NOTE: custom RuntimeExtension, must implement the body of this func according to the specific use case.

func (*ExtensionHandlers) DoBeforeClusterDelete added in v1.3.0

DoBeforeClusterDelete implements the HandlerFunc for the BeforeClusterDelete hook. The hook answers with the response stored in a well know config map, thus allowing E2E tests to control the hook behaviour during a test. NOTE: custom RuntimeExtension, must implement the body of this func according to the specific use case.

func (*ExtensionHandlers) DoBeforeClusterUpgrade added in v1.3.0

DoBeforeClusterUpgrade implements the HandlerFunc for the BeforeClusterUpgrade hook. The hook answers with the response stored in a well know config map, thus allowing E2E tests to control the hook behaviour during a test. NOTE: custom RuntimeExtension, must implement the body of this func according to the specific use case.

Jump to

Keyboard shortcuts

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