Skip to content

Allow K8s Service to override controller default tags by annotation #4030

@jtackaberry

Description

@jtackaberry

Is your feature request related to a problem?

We define default tags at the AWS LB controller level, with the intention that these tags should be used as, well, defaults for the environment if the LoadBalancer type K8s Service doesn't specify service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags.

Unfortunately that annotation doesn't override default tags, which I understand is clearly documented but doesn't actually provide the behavior we need, which is that default tags are defaults unless they are overridden by more granular resources.

Describe the solution you'd like

Even though IMO this violates the Principle of Least Astonishment, I accept that the behavior of service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags is by now well established and probably can't change without disruption, so I propose a new Service annotation service.beta.kubernetes.io/aws-load-balancer-resource-tags-overrides or some such, where the defaults defined at the controller level are used but can be overridden by any tags specified in this new annotation.

Describe alternatives you've considered

We'll have to drop default tags entirely from the AWS LB controller and instead vigilantly police all K8s Service objects for compliance instead. This isn't ideal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions