-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Add CloudLabels as --extra-tags to aws-ebs-csi driver #10976
Conversation
Hi @codablock. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@@ -352,7 +352,7 @@ spec: | |||
- --endpoint=$(CSI_ENDPOINT) | |||
- --logtostderr | |||
- --k8s-tag-cluster-id={{ ClusterName }} | |||
- --extra-tags=KubernetesCluster={{ ClusterName }} | |||
- --extra-tags=KubernetesCluster={{ ClusterName }},{{ CloudLabels }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If cloudLabels
is empty, will the trailing comma be a problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I'm verifying in exactly this moment as I realised this as well after re-reviewing the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can add ClusterName
to CloudLabels
and will always be ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified: It works just fine with the trailing comma.
If still required, I can try to avoid that trailing comma. I checked if any ifs are used inside the templates and it looks like you've successfully avoided having any ifs/range, ... in the templates and I did not want to be the first one introducing it 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hakman That sounds good, but then I'd like to rename the CloudLabels
template var as it does not resemble the cloudLabels
from the cluster spec anymore. I'll call it "EbsCsiExtraTags" then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe rename it to CsiExtraTags
, to match the flag name.
This should be bumped to 0.8.0-kops.2
also:
version := "0.8.0-kops.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am good. We can always make the template functions more reusable later when there is need.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hakman Fixed the name and bumped the version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Please also squash the commits and this should be it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
9777b9e
to
599f19b
Compare
/ok-to-test |
I'm not sure what to do about the test failure...it seems unrelated. EDIT: I tried the |
It is related to Go 1.16 upgrade upstream. Don't worry. |
/retest |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hakman The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
1 similar comment
/retest |
…-upstream-release-1.20 Automated cherry pick of #10976: Add CloudLabels as --extra-tags to aws-ebs-csi driver
This PR adds
cloudLabels
from the cluster spec as tags to EBS volumes created by the aws-ebs-csi driver. This allows us to fulfil company wide policies on tagging rules.