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) EnsureGroupSnapshotExist() (controller.OperationResult, error)
- func (a *Adapter) EnsureIntegrationPipelineRunsExist() (controller.OperationResult, error)
- func (a *Adapter) EnsureOverrideSnapshotValid() (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(context context.Context, snapshot *applicationapiv1alpha1.Snapshot, application *applicationapiv1alpha1.Application, logger h.IntegrationLogger, loader loader.ObjectLoader, client client.Client, ) *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 is created
func (*Adapter) EnsureGroupSnapshotExist ¶
func (a *Adapter) EnsureGroupSnapshotExist() (controller.OperationResult, error)
EnsureGroupSnapshotExist is an operation that ensure the group snapshot is created for component snapshots once a new component snapshot is created for an pull request and there are multiple existing PRs belonging to the same PR group
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) EnsureOverrideSnapshotValid ¶
func (a *Adapter) EnsureOverrideSnapshotValid() (controller.OperationResult, error)
EnsureOverrideSnapshotValid is an operation that ensure the manually created override snapshot have valid digest and git source in snapshotComponents, mark it as invalid otherwise
func (*Adapter) EnsureRerunPipelineRunsExist ¶
func (a *Adapter) EnsureRerunPipelineRunsExist() (controller.OperationResult, error)
EnsureRerunPipelineRunsExist is responsible for recreating integration test pipelineruns 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 { EnsureGroupSnapshotExist() (controller.OperationResult, error) EnsureAllReleasesExist() (controller.OperationResult, error) EnsureRerunPipelineRunsExist() (controller.OperationResult, error) EnsureIntegrationPipelineRunsExist() (controller.OperationResult, error) EnsureGlobalCandidateImageUpdated() (controller.OperationResult, error) EnsureOverrideSnapshotValid() (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