Skip to content

feat: configurable platform-wide tags (SpringClean, cost allocation, compliance) #773

Description

@allamand

Problem

Currently, adding AWS resource tags to platform-managed resources requires:

  1. kro RGDs: Declaring each tag key individually in SimpleSchema and propagating one by one to each resource template
  2. CDK stack: Hardcoding tag values in the CDK code
  3. No single source of truth — tags must be duplicated across layers

This is brittle and doesn't scale for customers who need:

  • SpringClean protection (auto-delete: no)
  • Cost allocation (cost-center, team, project)
  • Compliance tags (data-classification, environment)

Proposed Solution

Layer 1: CDK (infrastructure resources)

A platformTags map in config.local.yaml (or cdk.json context) that gets applied to all CDK resources via Tags.of(stack).add():

# config.local.yaml
platformTags:
  auto-delete: "no"
  cost-center: "platform-engineering"
  managed-by: "peeks"

Layer 2: kro RGDs (Kubernetes-managed AWS resources)

A generic spec.awsTags field (map[string]string) in RGD schemas that gets merged/spread into the tags section of all AWS resources:

spec:
  awsTags:
    auto-delete: "no"
    cost-center: "1234"

Layer 3: Single source of truth

Ideally, config.local.yaml defines tags once, and they propagate to:

  • CDK via Tags.of()
  • kro RGDs via instance values (ArgoCD injects from config)
  • Helm charts via global values (for pod labels)

Current PR

PR #753 (feat(kro): add protectFromDeletion parameter) is a partial workaround that hardcodes a single auto-delete tag. It will be closed in favor of this more generic approach.

Tasks

  • Design: decide on config format and propagation mechanism
  • Verify kro CEL map spread capability (pending kro team response or SSAG)
  • Implement CDK tag propagation from config.local.yaml
  • Implement kro RGD awsTags field (if CEL supports it) or per-tag schema (if not)
  • Document: how customers add custom tags

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions