Skip to content
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

Merged
merged 16 commits into from
Jun 21, 2024

Conversation

oharan2
Copy link
Contributor

@oharan2 oharan2 commented Jun 2, 2024

Main flow:

  1. Fetching OCP resources using RedHatQe/wrapnapi

  2. Filtering resources using the kubernetes.io/cluster/* tag regex

  3. Resources without associated EC2 Instances considered as leftovers

    • Filtered by the last time modified
  4. Resources associated with EC2 Instances are filtered by their EC2 Instances time modified

  5. For simplicity- deletion process will be separated by a following PR

@oharan2
Copy link
Contributor Author

oharan2 commented Jun 2, 2024

Depends on #481

Copy link
Contributor

@omkarkhatavkar omkarkhatavkar left a comment

Choose a reason for hiding this comment

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

minor ones

settings.yaml.template Outdated Show resolved Hide resolved
settings.yaml.template Outdated Show resolved Hide resolved
cloudwash/providers/aws.py Outdated Show resolved Hide resolved
@oharan2 oharan2 requested a review from omkarkhatavkar June 11, 2024 11:31
@oharan2
Copy link
Contributor Author

oharan2 commented Jun 11, 2024

/verified

Copy link
Collaborator

@jyejare jyejare left a comment

Choose a reason for hiding this comment

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

ACK pending comments.

cloudwash/cli.py Outdated Show resolved Hide resolved
cloudwash/providers/aws.py Outdated Show resolved Hide resolved
cloudwash/providers/aws.py Outdated Show resolved Hide resolved
cloudwash/providers/aws.py Outdated Show resolved Hide resolved
cloudwash/utils.py Outdated Show resolved Hide resolved
settings.yaml.template Show resolved Hide resolved
@oharan2
Copy link
Contributor Author

oharan2 commented Jun 19, 2024

/verified

@jyejare
Copy link
Collaborator

jyejare commented Jun 19, 2024

@oharan2 Could you paste some logs that cleaned up OCP resources from AWS from multiple regions.

@oharan2 oharan2 requested a review from jyejare June 19, 2024 17:12
@oharan2
Copy link
Contributor Author

oharan2 commented Jun 20, 2024

/verified

Copy link
Collaborator

@jyejare jyejare left a 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.

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])
Copy link
Collaborator

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'

Copy link
Contributor Author

@oharan2 oharan2 Jun 20, 2024

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)

@oharan2 oharan2 requested a review from jyejare June 20, 2024 15:49
@jyejare jyejare merged commit 40024b8 into RedHatQE:master Jun 21, 2024
5 checks passed
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