Skip to content

Support generating tags via codegen #2368

Open
@rushmash91

Description

@rushmash91

Currently, the code generator does not support generating tags for AWS resources. Adding this functionality would greatly improve the usability of ACK controllers, as tagging is a crucial feature for many AWS services.

Proposed Solution

  1. Extend the generator.yaml configuration to include a tags section where users can specify default tags or tag policies.

  2. Modify the code generation logic to:

    • Add tag-related fields to the resource Spec structs
    • Include tag operations in the resource manager's Create, Update, and Delete methods
    • Generate appropriate CRD schema for tag fields
  3. Update the reconciliation logic to handle tag differences between the desired and actual state of resources.

Example generator.yaml Configuration

resources:
  Repository:
    fields:
      Tags:
        type: map[string]string
    operations:
      Create:
        - TagResource
      Update:
        - TagResource
        - UntagResource
      Delete:
        - UntagResource

Benefits

  • Improved resource management capabilities for ACK controllers

Metadata

Metadata

Assignees

Labels

area/code-generationIssues or PRs as related to controllers or docs code generationkind/enhancementCategorizes issue or PR as related to existing feature enhancements.service/allIndicates issues or PRs related to all the service controllers.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions