snapshot

package
v0.0.0-...-f6f9c28 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const SnapshotRetryTimeout = time.Duration(3 * time.Hour)

Variables

This section is empty.

Functions

func SetupController

func SetupController(manager ctrl.Manager, log *logr.Logger) error

SetupController creates a new Integration controller and adds it to the Manager.

Types

type Adapter

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

Adapter holds the objects needed to reconcile a Release.

func NewAdapter

NewAdapter creates and returns an Adapter instance.

func (*Adapter) EnsureAllReleasesExist

func (a *Adapter) EnsureAllReleasesExist() (controller.OperationResult, error)

EnsureAllReleasesExist is an operation that will ensure that all pipeline Releases associated to the Snapshot and the Application's ReleasePlans exist. Otherwise, it will create new Releases for each ReleasePlan.

func (*Adapter) EnsureGlobalCandidateImageUpdated

func (a *Adapter) EnsureGlobalCandidateImageUpdated() (controller.OperationResult, error)

EnsureGlobalCandidateImageUpdated is an operation that ensure the ContainerImage in the Global Candidate List being updated when the Snapshot passed all the integration tests

func (*Adapter) EnsureIntegrationPipelineRunsExist

func (a *Adapter) EnsureIntegrationPipelineRunsExist() (controller.OperationResult, error)

EnsureIntegrationPipelineRunsExist is an operation that will ensure that all Integration pipeline runs associated with the Snapshot and the Application's IntegrationTestScenarios exist.

func (*Adapter) EnsureRerunPipelineRunsExist

func (a *Adapter) EnsureRerunPipelineRunsExist() (controller.OperationResult, error)

EnsureRerunPipelineRunsExist is responsible for recreating integration test pipelines triggered by users

func (*Adapter) HandlePipelineCreationError

func (a *Adapter) HandlePipelineCreationError(err error, integrationTestScenario *v1beta2.IntegrationTestScenario, testStatuses *intgteststat.SnapshotIntegrationTestStatuses) (controller.OperationResult, error)

func (*Adapter) RequeueIfYoungerThanThreshold

func (a *Adapter) RequeueIfYoungerThanThreshold(retErr error) (controller.OperationResult, error)

RequeueIfYoungerThanThreshold checks if the adapter' snapshot is younger than the threshold defined in the function. If it is, the function returns an operation result instructing the reconciler to requeue the object and the error message passed to the function. If not, the function returns an operation result instructing the reconciler NOT to requeue the object.

type AdapterInterface

type AdapterInterface interface {
	EnsureAllReleasesExist() (controller.OperationResult, error)
	EnsureRerunPipelineRunsExist() (controller.OperationResult, error)
	EnsureIntegrationPipelineRunsExist() (controller.OperationResult, error)
	EnsureGlobalCandidateImageUpdated() (controller.OperationResult, error)
}

AdapterInterface is an interface defining all the operations that should be defined in an Integration adapter.

type Reconciler

type Reconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
}

Reconciler reconciles an Snapshot object

func NewSnapshotReconciler

func NewSnapshotReconciler(client client.Client, logger *logr.Logger, scheme *runtime.Scheme) *Reconciler

NewSnapshotReconciler creates and returns a Reconciler.

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

type ScenarioOptions

type ScenarioOptions struct {
	IsReRun bool
}

configuration options for scenario

Jump to

Keyboard shortcuts

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