feat: tag EBS volumes from PostgreSQL CR annotations

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>
This commit is contained in:
tcondeixa
2026-06-24 19:29:48 +02:00
co-authored by Claude Sonnet 4.6
parent df3224730f
commit eba55e124f
6 changed files with 174 additions and 2 deletions
@@ -169,6 +169,9 @@ configuration:
aws_region: eu-central-1
enable_ebs_gp3_migration: false
# enable_ebs_gp3_migration_max_size: 1000
# ebs_volume_tags_from_annotations:
# application: zalando.org/owning-application
# team: zalando.org/team
# gcp_credentials: ""
# kube_iam_role: ""
# log_s3_bucket: ""