Skip to content

Conversation

@mrodm
Copy link
Contributor

@mrodm mrodm commented Mar 26, 2024

Set the right field to check for creation date in Storage Bucket resources.

@mrodm mrodm self-assigned this Mar 26, 2024
@mrodm mrodm changed the title [CI cleanupFix creation date tag for buckets [cleanup] Fix creation date tag for buckets Mar 26, 2024
@mrodm mrodm requested a review from a team March 26, 2024 17:05
Comment on lines +48 to +54
# It looks like tags are not reported by cloud-reaper for buckets
# - type: "regex"
# pointer: "/extra/tags/repo"
# param: "^(elastic-package|integrations)"
# - type: "="
# pointer: "/extra/tags/environment"
# param: "ci"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have some doubts for these tags in Storage Bucket resources.
@amannocci , are tags also reported/used by cloud-reaper to filter resources ?

At least it looks like that in the verbose output other tags a part from creation_date are not shown:

ObjectStorageBucket(
  name=xxx
  extra={'creation_date': '2024-03-26T06:57:28.000Z'}
)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tested adding this filter to force showing some queues:

          - type: "regex"
            pointer: "/extra/tags/repo"
            param: "^(elastic-package|integrations|beats)"            

but, cloud-reaper does not report anything

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Talked offline to @amannocci , and currently this is the expected behavior. cloud-reaper needs to make an additional API call to get all the tags set in Buckets.

Leaving the filters commented until this support is added into cloud-reaper.

filters:
- type: "<"
pointer: "/created_at"
pointer: "/extra/creation_date"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Creation date is not set in the same field as other resources. Updated to the right field.

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

cc @mrodm

@mrodm mrodm merged commit 6d9206a into elastic:main Mar 26, 2024
@mrodm mrodm deleted the update_cloudreaper_settings branch March 26, 2024 18:01
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