Skip to content

Tag the chart's AWS load balancers for Partner Revenue Measurement - #1030

Merged
davidmckayv merged 2 commits into
mainfrom
aws-prm-tagging
Nov 5, 2026
Merged

davidmckayv merged 2 commits into
mainfrom
aws-prm-tagging

Conversation

@davidmckayv

Copy link
Copy Markdown
Contributor

What

The load balancers this chart has AWS create now carry CopilotKit's AWS Partner Revenue Measurement tag, aws-apn-id-058264219587=pc:avjdxr516uh0mgsqob730tzgy. This is the same tag, with the same rules, that the bundled Intelligence already puts on its own Ingress. The key and value are constants in the chart, so the tag is always on and has no setting.

  • Ingress: alb.ingress.kubernetes.io/tags, rendered for every ingress class because other controllers ignore it. A shared Ingress group is tagged too.
  • Server Service, when server.service.type is LoadBalancer: service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags, which both the AWS Load Balancer Controller and the in-tree AWS provider read. Services of other types get no tag.

How the tag merges with existing tags:

  • The operator's own tags are kept, in order, with ours appended.
  • Other partners' aws-apn-id-<account> tags are kept, and so is a legacy aws-apn-id that carries another partner's value.
  • A legacy aws-apn-id carrying our value is replaced by the suffixed key, so nothing is counted twice.
  • The render fails only if our key is given a different value.

Not tagged:

  • The HTTPRoute path, because the load balancer belongs to the operator's Gateway.
  • EBS volumes, which Intelligence does not tag either.

There is no user-agent marker, because OpenBot has no AWS SDK. The README has a new "AWS usage attribution" section.

Testing

  • tests/chart-aws-attribution.test.ts (19 tests) renders the real chart with helm template and covers each rule above on both surfaces, including the refusal. Against main's templates, 17 fail. With this change, all 19 pass.
  • The CI chart job's steps for all six targets, bun test tests/chart-*.test.ts, biome format, biome lint --error-on-warnings and typecheck:tests all pass, using Bun 1.4.3 and Helm 3.19.0.

The load balancers this chart has AWS create now carry CopilotKit's
Partner Revenue Measurement tag, aws-apn-id-058264219587 =
pc:avjdxr516uh0mgsqob730tzgy, so the AWS usage OpenBot drives is
credited to CopilotKit. It is the same key and value, and the same
rules, as the bundled Intelligence's own Ingress. Constants in the
chart, always on, no setting.

- Ingress: alb.ingress.kubernetes.io/tags, rendered for every ingress
  class, since other controllers ignore it.
- The server Service, when its type is LoadBalancer:
  service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags,
  read by the AWS Load Balancer Controller and the in-tree AWS provider.

The operator's own tags are kept in order with ours appended, other
partners' aws-apn-id-<account> tags and a legacy aws-apn-id carrying
another partner's value are kept, a legacy aws-apn-id carrying our value
is replaced by the suffixed key, and the render fails only when our key
is given a different value.

tests/chart-aws-attribution.test.ts renders the real chart with helm
template and pins each of those on both surfaces.
@davidmckayv
davidmckayv merged commit 56b1f0b into main Nov 5, 2026
38 of 40 checks passed
@davidmckayv
davidmckayv deleted the aws-prm-tagging branch November 5, 2026 21:31
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