Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply tags to resources created by Karpenter #1508

Closed
wants to merge 1 commit into from
Closed

Conversation

dewjam
Copy link
Contributor

@dewjam dewjam commented Mar 14, 2022

1. Issue, if available:
#1488

2. Description of changes:
As part of issue #1488, it was discovered that default tags are not being applied to AWS resources per the Karpenter documentation. This change applies the default tags to fleets, instances, volumes and launch templates.

karpenter.sh/provisioner-name: <provisioner-name>
karpenter.sh/cluster/<cluster-name>: owned
kubernetes.io/cluster/<cluster-name>: owned
Name: karpenter.sh/cluster/<cluster-name>/provisioner/<provisioner-name>

3. How was this change tested?
Added some tests to ensure resources created by Karpenter have the default tags. Also manually tested and validated all resources have the default tags:

        {
            "Key": "karpenter.sh/cluster/dewaard-karpenter-demo",
            "Value": "owned"
        },
        {
            "Key": "Name",
            "Value": "karpenter.sh/cluster/dewaard-karpenter-demo/provisioner/default"
        },
        {
            "Key": "karpenter.sh/provisioner-name",
            "Value": "default"
        },
        {
            "Key": "kubernetes.io/cluster/dewaard-karpenter-demo",
            "Value": "owned"
        }

4. Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: link to issue
  • No

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@netlify
Copy link

netlify bot commented Mar 14, 2022

✔️ Deploy Preview for karpenter-docs-prod canceled.

🔨 Explore the source changes: 4839c40

🔍 Inspect the deploy log: https://app.netlify.com/sites/karpenter-docs-prod/deploys/622f797709f46a0009e4d3db

@tzneal
Copy link
Contributor

tzneal commented Mar 14, 2022

Is 'karpenter.sh/provisioner-name' not mentioned in the docs, or am I just missing it?

@akestner
Copy link
Contributor

Let's make sure to close the gap between the changes we're making here and the documentation (and vice versa)

@dewjam
Copy link
Contributor Author

dewjam commented Mar 18, 2022

We have decided to keep the current tagging strategy as it's written in our code, instead of what is in the docs. I will follow-up with a new PR updating Karpenter documentation.

I also created issue #1525 specifically for discussion surrounding Karpenter resource tagging.

@dewjam dewjam closed this Mar 18, 2022
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.

3 participants