kubernetes-sigs / aws-load-balancer-controller

A Kubernetes controller for Elastic Load Balancers
https://kubernetes-sigs.github.io/aws-load-balancer-controller/
Apache License 2.0
3.93k stars 1.46k forks source link

Automatically Add Tag for WAF ARN to ALB when created or updated #2928

Closed wiceywkus closed 1 year ago

wiceywkus commented 1 year ago

Problem Description I need to associate WAF costs to ALB costs. I.e. the total cost of the "ingress" is really ALB+WAF costs. By putting a Tag on the ALB to connect it to the WAF that is associated with the ALB, those 2 costs can then be linked together.

Please Would it possible when the ALB Controller is setting up the Tags for the ALB to include the WAF ARN, if present, as a "well-known" Tag like "alb.aws.com/wafv2-acl-arn"?

Other approaches I can create the ARN mappings myself via AWS CLI commands and add a 3rd data set to map them together. (I'd rather cut out the middleman.)

wiceywkus commented 1 year ago

and can we extend the Ingress YAML schema to include the ALB ARN in the .status in addition to the hostname.

kishorj commented 1 year ago

You could specify the appropriate tag via the ingress annotation alb.ingress.kubernetes.io/tags, for more details please refer to the live docs [link].

The status field definition comes from upstream kubernetes, we won't be able to extend to include arbitrary info.

M00nF1sh commented 1 year ago

closing this as the Tags can already be specified in Ingress YAML