-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add support for collecting deletable OCP leftovers from AWS #134
Conversation
Depends on #481 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor ones
/verified |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK pending comments.
Co-authored-by: Jitendra Yejare <jyejare@redhat.com>
…ist_ocp_resources
…o list_ocp_resources
/verified |
@oharan2 Could you paste some logs that cleaned up OCP resources from AWS from multiple regions. |
/verified |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks good except the clusters listing in deletable resources. I asked the followup question in slack, please check.
cloudwash/providers/aws.py
Outdated
if filtered_leftovers: | ||
dry_data["OCPS"]["delete"].extend(filtered_leftovers) | ||
# Print cluster_name only if it's resources are deletable | ||
dry_data["OCPS"]["clusters"].extend([cluster_name]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh! not something we are looking for adding into the list of clusters.
Still if you want to print the clusters, You could add that to the line saying:
Resources from the region: us-east-1
as
Resources from the region: us-east-1 and clusters: 'ods-qe-aws-01-pool-zn-qdns7', 'testgsno-pool-shph9-pcbfk'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted, will be resolved in the OCP resources deletion PR (WIP)
This reverts commit f6dc711.
Main flow:
Fetching OCP resources using RedHatQe/wrapnapi
Filtering resources using the
kubernetes.io/cluster/*
tag regexResources without associated EC2 Instances considered as leftovers
Resources associated with EC2 Instances are filtered by their EC2 Instances time modified
For simplicity- deletion process will be separated by a following PR