Documentation ¶
Overview ¶
Package instautoctrl contains the controller for Instance Termination and Submission automations.
Package instautoctrl contains the controller for Instance Termination and Submission automations.
Package instautoctrl contains the controller for Instance Termination and Submission automations.
Package instautoctrl contains the controller for Instance Termination and Submission automations.
Index ¶
- func CheckEnvironmentValidity(instance *clv1alpha2.Instance, environment *clv1alpha2.Environment) error
- func RetrieveEnvironment(ctx context.Context, c client.Client, instance *clv1alpha2.Instance) (*clv1alpha2.Environment, error)
- type InstanceSubmissionReconciler
- func (r *InstanceSubmissionReconciler) CheckLabelSelectors(ctx context.Context, instance *clv1alpha2.Instance) (bool, error)
- func (r *InstanceSubmissionReconciler) EnforceInstanceSubmissionJob(ctx context.Context, instance *clv1alpha2.Instance, ...) (jobStatus *batch.JobStatus, err error)
- func (r *InstanceSubmissionReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *InstanceSubmissionReconciler) SetupWithManager(mgr ctrl.Manager, concurrency int) error
- type InstanceTerminationReconciler
- func (r *InstanceTerminationReconciler) CheckInstanceTermination(ctx context.Context, instance *clv1alpha2.Instance) (bool, error)
- func (r *InstanceTerminationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *InstanceTerminationReconciler) SetupWithManager(mgr ctrl.Manager, concurrency int) error
- func (r *InstanceTerminationReconciler) TerminateInstance(ctx context.Context, instance *clv1alpha2.Instance) error
- type StatusCheckResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckEnvironmentValidity ¶
func CheckEnvironmentValidity(instance *clv1alpha2.Instance, environment *clv1alpha2.Environment) error
CheckEnvironmentValidity checks whether the given environment is valid and returns it (there must be one environment that must be persistent and contestDestination within instance spec customization urls must be present).
func RetrieveEnvironment ¶
func RetrieveEnvironment(ctx context.Context, c client.Client, instance *clv1alpha2.Instance) (*clv1alpha2.Environment, error)
RetrieveEnvironment retrieves the template associated to the given instance.
Types ¶
type InstanceSubmissionReconciler ¶
type InstanceSubmissionReconciler struct { client.Client EventsRecorder record.EventRecorder Scheme *runtime.Scheme NamespaceWhitelist metav1.LabelSelector ContainerEnvOpts forge.ContainerEnvOpts // This function, if configured, is deferred at the beginning of the Reconcile. // Specifically, it is meant to be set to GinkgoRecover during the tests, // in order to lead to a controlled failure in case the Reconcile panics. ReconcileDeferHook func() }
InstanceSubmissionReconciler watches for instances to be terminated.
func (*InstanceSubmissionReconciler) CheckLabelSelectors ¶
func (r *InstanceSubmissionReconciler) CheckLabelSelectors(ctx context.Context, instance *clv1alpha2.Instance) (bool, error)
CheckLabelSelectors checks whether the given instance is eligible for reconciliation.
func (*InstanceSubmissionReconciler) EnforceInstanceSubmissionJob ¶
func (r *InstanceSubmissionReconciler) EnforceInstanceSubmissionJob(ctx context.Context, instance *clv1alpha2.Instance, environment *clv1alpha2.Environment) (jobStatus *batch.JobStatus, err error)
EnforceInstanceSubmissionJob ensures that the submission job for the given instance is present.
func (*InstanceSubmissionReconciler) Reconcile ¶
func (r *InstanceSubmissionReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile reconciles the status of the InstanceSnapshot resource.
func (*InstanceSubmissionReconciler) SetupWithManager ¶
func (r *InstanceSubmissionReconciler) SetupWithManager(mgr ctrl.Manager, concurrency int) error
SetupWithManager registers a new controller for InstanceSubmissionReconciler resources.
type InstanceTerminationReconciler ¶
type InstanceTerminationReconciler struct { client.Client EventsRecorder record.EventRecorder Scheme *runtime.Scheme NamespaceWhitelist metav1.LabelSelector StatusCheckRequestTimeout time.Duration InstanceStatusCheckInterval time.Duration // This function, if configured, is deferred at the beginning of the Reconcile. // Specifically, it is meant to be set to GinkgoRecover during the tests, // in order to lead to a controlled failure in case the Reconcile panics. ReconcileDeferHook func() }
InstanceTerminationReconciler watches for instances to be terminated.
func (*InstanceTerminationReconciler) CheckInstanceTermination ¶
func (r *InstanceTerminationReconciler) CheckInstanceTermination(ctx context.Context, instance *clv1alpha2.Instance) (bool, error)
CheckInstanceTermination checks if the Instance has to be terminated.
func (*InstanceTerminationReconciler) Reconcile ¶
func (r *InstanceTerminationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile reconciles the status of the InstanceSnapshot resource.
func (*InstanceTerminationReconciler) SetupWithManager ¶
func (r *InstanceTerminationReconciler) SetupWithManager(mgr ctrl.Manager, concurrency int) error
SetupWithManager registers a new controller for InstanceTerminationReconciler resources.
func (*InstanceTerminationReconciler) TerminateInstance ¶
func (r *InstanceTerminationReconciler) TerminateInstance(ctx context.Context, instance *clv1alpha2.Instance) error
TerminateInstance terminates the Instance.