-
Notifications
You must be signed in to change notification settings - Fork 319
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
Issue# 306: Added tagging controller #308
Conversation
Welcome @nguyenkndinh! |
Hi @nguyenkndinh. 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. |
cmd/aws-cloud-controller-manager/controllers/tagging/tagging-controller.go
Outdated
Show resolved
Hide resolved
cmd/aws-cloud-controller-manager/controllers/aws_controllermanager.go
Outdated
Show resolved
Hide resolved
cmd/aws-cloud-controller-manager/controllers/aws_controllermanager.go
Outdated
Show resolved
Hide resolved
cmd/aws-cloud-controller-manager/controllers/tagging/tagging-controller.go
Outdated
Show resolved
Hide resolved
cmd/aws-cloud-controller-manager/controllers/aws_controllermanager.go
Outdated
Show resolved
Hide resolved
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.
Good start. Let's also add a separate docs/controllers.md
which gives some background information.
* Remove route controller again * Print out clusterName for new nodes * tag new nodes when it comes online * only process a node once * check taggNodes size * add debugging * use node name as key * delete k,v from taggedNodes if node no longer exists * log if delete is done * Get a list of nodes and tag them if havent * get instance IDs of the nodes that need tagging * use MapToAWSInstanceID instead * restored v1 aws * restored from master * tag instance with a random tag * add klog * tag and untag node resources * Prepare for pr * Initialize nodeMap
Last thing that would be extremely beneficial is an E2E job which just creates a single tag and checks for its existence. |
@nckturner regarding #308 (comment), could you pls advise how I can do that? |
Yeah just create file similar to the loadbalancer test: https://github.com/kubernetes/cloud-provider-aws/blob/master/tests/e2e/loadbalancer.go |
We will add an e2e test after we figure out how to pass the tagging controller's flags to kops (currently arbitrary tags are not supported, so only a subset of recognized ccm flags can be passed). We are also taking a todo on handling non-retry-able errors correctly, i.e. avoiding a situation where a tag is improperly formatted and the controller spams the createTag API forever. Can you create an issue in this repository @nguyenkndinh? /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nckturner, nguyenkndinh, saurav-agarwalla 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 |
@nckturner Thanks for your feedbacks. I've created the following issue to track the remaining TODOs: #325 |
…34: Stop retrying failed workitem after a certain amount of (#357) * Add tagging controller * Stop retrying failed workitem after a certain amount of retries Added metrics * Changes to make tagging controller compatible with K8s 1.22 Co-authored-by: Nguyen Dinh <[email protected]> Co-authored-by: Nicholas Turner <[email protected]>
…34: Stop retrying failed workitem after a certain amount of (#358) * Add tagging controller * Stop retrying failed workitem after a certain amount of retries Added metrics * Changes to make tagging controller compatible with K8s 1.21 Co-authored-by: Nguyen Dinh <[email protected]> Co-authored-by: Nicholas Turner <[email protected]>
What type of PR is this?
/kind feature
What this PR does / why we need it: This is the first in the series for creating a tagging controller to tag resources that join or leave a cluster for better cost estimation. This PR creates a skeleton for the upcoming tagging controller so that more details can be added in subsequent PRs.
Which issue(s) this PR fixes:
#306
Special notes for your reviewer:
Tested in an EC2 instance using local-up-cluster.sh, and checking
/tmp/cloud-controller-manager.log
to see if the controller was initialized.Does this PR introduce a user-facing change?:
NONE