Skip to content

Add cronjob to cleanup preview environments #11473

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 1, 2022
Merged

Add cronjob to cleanup preview environments #11473

merged 1 commit into from
Aug 1, 2022

Conversation

nandajavarma
Copy link
Contributor

@nandajavarma nandajavarma commented Jul 19, 2022

Description

This PR adds the cronjob to cleanup the self-hosted preview environments that are older that 10 hours. The PR also uploads the KUBECONFIG file in case of k3s to the cloud storage. In the case of managed k8s cluster, there are new targets in Makefile that get the kubeconfig file to the local.

If we want to omit a gitpod setup from deletion, you can provide a custom subdomain name as a part of the tests, that start with gitpod-. For eg: gitpod-test. It is expected that these setups will be manually deleted.

Related Issue(s)

Fixes #11277

How to test

If you want to test the cron to cleanup the tests, you can run:

werft run github -j .werft/cleanup-installer-setups.yaml

Release Notes

NONE

Documentation

Werft options:

  • /werft with-preview

@nandajavarma nandajavarma changed the title Nvn/fix 11277 Add cronjob to cleanup preview environments Jul 19, 2022
@nandajavarma nandajavarma force-pushed the nvn/fix-11277 branch 4 times, most recently from 810dfd9 to 7ed155e Compare July 22, 2022 10:10
@nandajavarma nandajavarma force-pushed the nvn/fix-11277 branch 5 times, most recently from c30bce5 to e1efdf2 Compare July 28, 2022 09:42
@roboquat roboquat added size/XL and removed size/L labels Jul 28, 2022
@nandajavarma nandajavarma force-pushed the nvn/fix-11277 branch 2 times, most recently from 1921508 to 94b847a Compare July 28, 2022 10:49
@nandajavarma nandajavarma marked this pull request as ready for review July 28, 2022 11:01
@nandajavarma nandajavarma requested a review from a team July 28, 2022 11:01
@github-actions github-actions bot added the team: delivery Issue belongs to the self-hosted team label Jul 28, 2022
@nandajavarma nandajavarma force-pushed the nvn/fix-11277 branch 2 times, most recently from f21024d to d7c81e6 Compare July 29, 2022 14:38
Copy link
Contributor

@mrsimonemms mrsimonemms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/hold do we need the empty install/tests/install/infra/terraform/eks/providers.tf file?

Remove hold at will

@nandajavarma
Copy link
Contributor Author

nandajavarma commented Aug 1, 2022

/unhold @mrsimonemms the file is getting deleted in this PR. It got in as part of a faulty commit in an earlier PR.

@roboquat roboquat merged commit 03849f9 into main Aug 1, 2022
@roboquat roboquat deleted the nvn/fix-11277 branch August 1, 2022 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none size/XL team: delivery Issue belongs to the self-hosted team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clean up old self-hosted preview environments
3 participants