Skip to content

Conversation

@nmarukovich
Copy link
Contributor

@nmarukovich nmarukovich commented Oct 31, 2025

PR provides the automatic deletion aks resources based on tags.
To use this script for your aks cluster please add tags during cluster creation:
--tags team=cloud delete-cluster-after-hours=1 creation-time=$(date -u +%s)

@nmarukovich nmarukovich marked this pull request as ready for review November 2, 2025 20:12
…rcona-Lab/jenkins-pipelines into K8SPXC-1650_delete_resources_in_azure
@nmarukovich nmarukovich requested a review from gkech November 5, 2025 11:22
@@ -0,0 +1,7 @@
# To redeploy function run in cmd folder:
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add to README where this script will be executed, where to check its logs, how to run it.
From DM: this is the only way to redeploy the functions.
It would be to have here smth like:

  1. The code is deployed and executed at (link)
  2. Logs of execution are (link/how to check if not obvious from the 1st)
  3. The script can not be redeployed/changed through interface. To redeploy download the script (how?) and run below (where?)

@@ -0,0 +1,169 @@
# Remove expired AKS clusters (Azure, cluster-only)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice to have for future:

  1. There is a case where the cloud tag is present but the TTL is not correct (creatio time is missing/incorrect format). It would be good to receive a notification about such clusters to recheck why this happens and maybe update scripts corrspondingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants