Skip to content

Refactor to use a cleanup object for timeouts: stopAfterInactivity, deleteAfterInactivity, and deleteAfterCreation.#1145

Draft
vmoliterno wants to merge 82 commits into
netgroup-polito:masterfrom
AlessandroCC:chore/renaming-fix
Draft

Refactor to use a cleanup object for timeouts: stopAfterInactivity, deleteAfterInactivity, and deleteAfterCreation.#1145
vmoliterno wants to merge 82 commits into
netgroup-polito:masterfrom
AlessandroCC:chore/renaming-fix

Conversation

@vmoliterno

Copy link
Copy Markdown
Contributor

This pull request introduces a significant refactor and enhancement of the template creation modal's cleanup timeout configuration in the frontend application. The changes standardize and expand how cleanup timeouts are handled, moving from two flat fields to a structured cleanup object with three distinct timeout options. Default values for these timeouts are now injected via Helm and exposed to the frontend through environment variables. The UI for configuring these timeouts is also improved with clearer controls, validation, and user guidance.

Key changes include:

Backend/Configuration:

  • Added a new defaultTimeouts.cleanup section in both deploy/crownlabs/values.yaml and frontend/deploy/frontend-app/values.yaml to define default values for stopAfterInactivity, deleteAfterInactivity, and deleteAfterCreation timeouts. [1] [2]

Frontend Logic & State Management:

  • Refactored the template creation modal (ModalCreateTemplate.tsx) to use a cleanup object for timeouts, supporting three distinct settings: stopAfterInactivity, deleteAfterInactivity, and deleteAfterCreation. All related state management, form handling, and value parsing logic were updated accordingly. [1] [2] [3] [4] [5]

AlessandroCC and others added 30 commits May 4, 2026 10:46
…tored delete to destroy, changed values for staging test in values.yaml
- Added missing configuration flags to instance-automation operator, including
  destruction notification intervals and testing overrides.
- Refactored InstanceInactiveTerminationReconciler to improve readability
  and robustness of the destruction logic for powered-off instances.
- Standardized logging across destruction helper functions and added proper
  error handling for annotation parsing.
- Fixed a bug where destruction notifications used the wrong interval flag.
- Integrated LastPoweredOffTimestampAnnotation in the termination reconciler
  to ensure the destruction countdown starts whenever an instance is stopped.
- Updated Helm chart templates and values to correctly propagate the new
  automation configurations to the deployed containers.
feat: add DestroyAfterInactivity feature for permanent VM destruction
Fixed CI errors
Added tests and changed prometheusURL
… the instances will be deleted after the destroyAfterInactivity time even if value for email notification is false
…ModalCreateTemplate view and logic to connect this value to backend
Added modification to front-end to gather destroyAfterInactivity value
@vmoliterno vmoliterno requested a review from a team as a code owner June 12, 2026 10:34
@QcFe QcFe marked this pull request as draft June 16, 2026 15:51
@vmoliterno vmoliterno changed the base branch from master to copilot/bugfix-exam-agent-api-inconsistency June 17, 2026 12:42
@vmoliterno vmoliterno changed the base branch from copilot/bugfix-exam-agent-api-inconsistency to master June 17, 2026 12:42
@MarcoRiki

Copy link
Copy Markdown
Contributor

/deploy-staging

@MarcoRiki

Copy link
Copy Markdown
Contributor

/deploy-staging

@kingmakerbot

Copy link
Copy Markdown
Collaborator

Your staging environment has been correctly deployed.
You can access the application frontend and Qlkube APIs using the following URLs:

@MarcoRiki

Copy link
Copy Markdown
Contributor

/deploy-staging

@MarcoRiki

Copy link
Copy Markdown
Contributor

/deploy-staging

@kingmakerbot

Copy link
Copy Markdown
Collaborator

Your staging environment has been correctly deployed.
You can access the application frontend and Qlkube APIs using the following URLs:

1 similar comment
@kingmakerbot

Copy link
Copy Markdown
Collaborator

Your staging environment has been correctly deployed.
You can access the application frontend and Qlkube APIs using the following URLs:

@MarcoRiki

Copy link
Copy Markdown
Contributor

/deploy-staging

@kingmakerbot

Copy link
Copy Markdown
Collaborator

Your staging environment has been correctly deployed.
You can access the application frontend and Qlkube APIs using the following URLs:

@MarcoRiki

Copy link
Copy Markdown
Contributor

/deploy-staging

@kingmakerbot

Copy link
Copy Markdown
Collaborator

Something went wrong while deploying your staging environment!
Please check the ArgoCD-CrownNG repo actions for more details.

@kingmakerbot

Copy link
Copy Markdown
Collaborator

Your staging environment has been correctly deployed.
You can access the application frontend and Qlkube APIs using the following URLs:

…ler with one single PatchObject in the reconciler, using the mutation function enforceInstanceMetadata
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cloudprog This is a specification for a Cloud Programming course project sig/api sig/ui size/XXL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants