Documentation ¶
Index ¶
- Constants
- func SetupController(manager ctrl.Manager, log *logr.Logger) error
- type Adapter
- func (a *Adapter) EnsureAllReleasesExist() (controller.OperationResult, error)
- func (a *Adapter) EnsureGlobalCandidateImageUpdated() (controller.OperationResult, error)
- func (a *Adapter) EnsureIntegrationPipelineRunsExist() (controller.OperationResult, error)
- func (a *Adapter) EnsureRerunPipelineRunsExist() (controller.OperationResult, error)
- func (a *Adapter) HandlePipelineCreationError(err error, integrationTestScenario *v1beta2.IntegrationTestScenario, ...) (controller.OperationResult, error)
- func (a *Adapter) RequeueIfYoungerThanThreshold(retErr error) (controller.OperationResult, error)
- type AdapterInterface
- type Reconciler
- type ScenarioOptions
Constants ¶
const SnapshotRetryTimeout = time.Duration(3 * time.Hour)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter holds the objects needed to reconcile a Release.
func NewAdapter ¶
func NewAdapter(snapshot *applicationapiv1alpha1.Snapshot, application *applicationapiv1alpha1.Application, component *applicationapiv1alpha1.Component, logger h.IntegrationLogger, loader loader.ObjectLoader, client client.Client, context context.Context) *Adapter
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 ¶
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.
type ScenarioOptions ¶
type ScenarioOptions struct {
IsReRun bool
}
configuration options for scenario