Skip to content

feat: EBS Volumes tags inherit from labels #3123

Open
tcondeixa wants to merge 5 commits into
masterfrom
update-ebs-tags-inherit-labels
Open

feat: EBS Volumes tags inherit from labels #3123
tcondeixa wants to merge 5 commits into
masterfrom
update-ebs-tags-inherit-labels

Conversation

@tcondeixa

@tcondeixa tcondeixa commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

This is another approach to solve the same problem as #3124

  • Adds ebs_tags_inherit_labels config option to propagate labels to EBS volume tags
  • Tags are compared against existing EBS tags (already fetched via DescribeVolumes) — CreateTags is only called when a tag is missing or has changed value
  • Tagging runs after populateVolumeMetaData in both mixed and ebs storage resize modes
  • Labels from the ebs_tags_inherit_labels that are not in the PostgreSQL CR and are in the EBS tags are removed

NOTE: This requires to add ec2:CreateTags and ec2:DeleteTags to the operator IAM role policy

Configuration

ebs_tags_inherit_labels: "application,team"

Test plan

  • Configure ebs_tags_inherit_labels in operator config
  • Create a PostgreSQL CR with the inherit labels
  • Verify EBS volumes are tagged with the correct values after a sync cycle
  • Update label value and verify the EBS tag is updated on the next sync
  • Verify no CreateTags calls are made when tags already match
  • Remove one of the inherit labels from the PostgreSQL CR
  • Verify EBS volume don't have the removed label

Co-Authored-By: Claude Sonnet 4.6
Signed-off-by: tcondeixa tscondeixa@gmail.com

@tcondeixa tcondeixa changed the title ebs_tags_from_labels to add tags to EBS Volumes feat: ebs_tags_from_labels to add tags to EBS Volumes Jun 29, 2026
@tcondeixa tcondeixa changed the title feat: ebs_tags_from_labels to add tags to EBS Volumes feat: EBS Volumes tags inherit from labels Jun 29, 2026
@tcondeixa tcondeixa marked this pull request as ready for review June 29, 2026 16:05
@tcondeixa

Copy link
Copy Markdown
Collaborator Author

As an option we can make the config more generic with the possibility to extend it later (e.g. aws_tags_inherit_labels), so the labels can be extended to other aws resources.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant