Skip to content

Ignore custom tags #2673

@michaelhtm

Description

@michaelhtm

Describe the bug
ACK controllers normally ignore the tags they apply by default. (eg. services.k8s.aws/controller-version)
If the user passes other tags via the controller flag argument (--resource-tags), we don't ignore them, and we end up showing them in the resource.

Steps to reproduce

  • Run controller with --resource-tags set to some custom tag key/value pair
  • Create a resource
  • The tags appear in the ACK resource spec

Expected outcome
The tags should not appear in the spec, but they should exist in AWS

Suggested fix
Instead of hardcoding the tag keys, we should use the arg value passed on startup, if not empty.
https://github.com/aws-controllers-k8s/eks-controller/blob/main/pkg/resource/cluster/tags.go#L30

This can remain unchanged
https://github.com/aws-controllers-k8s/eks-controller/blob/main/pkg/resource/cluster/tags.go#L77

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/code-generationIssues or PRs as related to controllers or docs code generationkind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions