Closed Neha-dot-Yadav closed 7 months ago
/cc @Rajalakshmi-Girish
please review this PR when its ready
Also, have you tried testing this job by running test-pj
like it is mentioned here? Let me know if you want me to run it before merging
@Neha-dot-Yadav I see the last line #28 commented out. But, you have mentioned the ID's related service instance name
rh-upstream-hypershift-agent-ci
in the description of this change. Would like like to uncomment last line?
Have commented it just for testing, as with the current purge condition, the bastian VM is also getting deleted(as it was created before 24h). So, looking at, how we can make it conditional to exclude that VM.
Also, have you tried testing this job by running
test-pj
like it is mentioned here? Let me know if you want me to run it before merging
@Rajalakshmi-Girish have not tested it yet, as still working on adding that condition. Let's hold the merge till then.
Have commented it just for testing, as with the current purge condition, the bastian VM is also getting deleted(as it was created before 24h). So, looking at, how we can make it conditional to exclude that VM.
I see pvsadm having a flag --regexp
string Regular Expressions for filtering the selection
If your VMs from CI have a common name to filter out, you many use this regexp flag and delete only those. (I haven't tried using this flag earlier :| )
Have commented it just for testing, as with the current purge condition, the bastian VM is also getting deleted(as it was created before 24h). So, looking at, how we can make it conditional to exclude that VM.
I see pvsadm having a flag
--regexp
stringRegular Expressions for filtering the selection
If your VMs from CI have a common name to filter out, you many use this regexp flag and delete only those. (I haven't tried using this flag earlier :| )
Thanks, using that approach, and testing it. Let's see!
Was tested by running test-pj
https://prow.ppc64le-cloud.cis.ibm.net/job-history/s3/ppc64le-prow-logs/logs/test-periodic-hypershift-powervs-cleanup
/approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: mkumatag, Neha-dot-Yadav, Rajalakshmi-Girish
The full list of commands accepted by this bot can be found here.
The pull request process is described here
@Neha-dot-Yadav: Updated the job-config
configmap in namespace prow
at cluster default
using the following files:
cleanup-hypershift-periodics.yaml
using file config/jobs/periodic/housekeeping/cleanup-hypershift-periodics.yaml
This PR has a periodic job which cleans up all stale VMs present in Hypershift
rh-upstream-hypershift-agent-ci
,rh-upstream-hypershift-cluster-bot-pvs
,rh-upstream-hypershift-powervs-ci-e2e-pvs
service instances which are older than 24h(1 day).