-
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
Add ENI support for nodes(for Fargate nodes) #223
Conversation
81732b1
to
d352941
Compare
@@ -1732,6 +1777,10 @@ func (c *Cloud) InstanceTypeByProviderID(ctx context.Context, providerID string) | |||
return "", err | |||
} | |||
|
|||
if isFargateNode(string(instanceID)) { | |||
return "", nil |
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.
Any reason we didn't create a custom "fargate" instance type? Not saying we should but just wondering if we explored that option. It might be nice from an API consumer's perspective to not have to check the provider ID to determine why an instance type is empty. Also it could be useful as fargate evolves to be able to have different instance types, if there is any information we want to expose about the instance. Of course, that can come later.
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 point but we don't want to populate this information as Fargate abstracts the instance types. But should be easy to add our own definition for instance-type as "fargate" if we need to. But in future it might affect if Fargate has some plan to expose the task type as "compute-optimized", "memory-optimized", etc. My suggestion is to keep it simple for now and add the type as "fargate" later if needed. Do you agree as well?
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.
Yeah, exposing the task type would be be a good future reason to fill this in. In that case, setting it to "fargate" shouldn't affect anything negatively, but we can keep it simple for now and wait until someone asks for something like that.
Did you test the node controller/node addresses with the kubelet cloud provider set to external? |
Yes we tested on EKS Fargate enabled cluster :) |
02fb84c
to
87c90e1
Compare
Thanks. Looks like you need to fix the gofmt error, then I'll lgtm. |
/cc @wongma7 |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nckturner, SaranBalaji90 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 |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR adds support for adding Fargate worker nodes to Kubernetes cluster. To add Fargate worker nodes, node providerID should have the prefix "fargate-" followed by ENI IP address..
Special notes for your reviewer:
This code doesn't change anything for EC2 worker nodes and only performs Describe interface for Fargate worker nodes.
Does this PR introduce a user-facing change?: