Skip to content

feat: EBS Volume tags from annotations with mapping#3124

Draft
tcondeixa wants to merge 5 commits into
masterfrom
update-ebs-tags-from-cr-annotations
Draft

feat: EBS Volume tags from annotations with mapping#3124
tcondeixa wants to merge 5 commits into
masterfrom
update-ebs-tags-from-cr-annotations

Conversation

@tcondeixa

@tcondeixa tcondeixa commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

This is another approach to solve the same problem as #3123, but the other approach seems cleaner and more generic.

  • Adds ebs_volume_tags_from_annotations config option mapping CR annotation keys to EBS volume tag names
  • 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

Configuration

ebs_volume_tags_from_annotations: "application:myorg.org/owning-application,team:myorg.org/team"

Test plan

  • Configure ebs_volume_tags_from_annotations in operator config
  • Create a PostgreSQL CR with the mapped annotations
  • Verify EBS volumes are tagged with the correct values after a sync cycle
  • Update annotation value and verify the EBS tag is updated on the next sync
  • Verify no CreateTags calls are made when tags already match

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

tcondeixa and others added 5 commits June 24, 2026 19:29
Adds a configurable mapping between PostgreSQL CR annotations and EBS
volume tags. The operator reads the configured annotation keys from the
CR metadata and applies them as tags on the associated EBS volumes during
each sync cycle.

Tags are compared against existing EBS tags (extracted from DescribeVolumes,
which is already called for volume management) and CreateTags is only called
when a tag is missing or has a different value, avoiding unnecessary AWS API
calls on steady state.

Configuration example in the operator ConfigMap/OperatorConfiguration:

  aws_or_gcp:
    ebs_volume_tags_from_annotations:
      application: zalando.org/owning-application
      team: zalando.org/team

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: tcondeixa <tscondeixa@gmail.com>
@tcondeixa tcondeixa changed the title feat: Update ebs tags from cr annotations feat: EBS Volume tags from annotations with mapping Jun 29, 2026
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.

1 participant