-
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
Spotinst: New hybrid integration mode #7252
Spotinst: New hybrid integration mode #7252
Conversation
Hi @liranp. 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. |
/ok-to-test |
928f3ec
to
7bbd43f
Compare
@@ -34,6 +33,10 @@ import ( | |||
) | |||
|
|||
const ( | |||
// InstanceGroupLabelManaged is the metadata label used on the instance | |||
// group to specify that the Spotinst provider should be used to upon creation. | |||
InstanceGroupLabelManaged = "spotinst.io/managed" |
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.
This is a cool idea. One thing we could also do (with the move to adopt cluster-api), is to actually create a "provider" or "manager" or "strategy" field on the InstanceGroup. My personal choice would be provider
, but I don't have strong feelings.
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, I agree. It'd be great.
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.
BTW, do you think we should change the metadata label to spotinst.io/hybrid: "true"
(instead of spotinst.io/managed: "true"
) so it will better match the feature flag?
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 do like the idea of matching the feature flag there
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.
Well, we already have customers that use this feature using a custom build of kops and we prefer to not introduce a breaking change by renaming the label. So, we've changed the implementation to support both cases.
upup/pkg/fi/cloudup/apply_cluster.go
Outdated
AWSModelContext: awsModelContext, | ||
} | ||
|
||
spotinstModelBuilder := &spotinstmodel.InstanceGroupModelBuilder{ |
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.
Moving this outside the featureflag looks scary, but it's fine :-)
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.
Got it, fixed.
Looks good. One query on the deletion logic. cluster-api is also going to have similar switching of behaviour, so we could define a field on the InstanceGroup that switches how an instancegroup is created (AWS ASG vs SpotInst vs cluster-api). But that doesn't need to block this PR. |
7bbd43f
to
163f878
Compare
@justinsb Thank you so much! I'd love to hear your opinion about changing the metadata label. Not sure which one is better. |
@justinsb Sorry to bother you, but can you please go over this? Thanks! |
163f878
to
fdb6a98
Compare
Anyone? Thanks! |
fdb6a98
to
6e897b8
Compare
6e897b8
to
07aef9a
Compare
Bumping... anyone? Thanks. |
07aef9a
to
24fe9e0
Compare
/retest |
1ca8767
to
9df66ec
Compare
cb4b21e
to
d1d4152
Compare
/assign @rdrgmnzs |
Bumping... anyone? Thanks. |
d1d4152
to
ebe0bce
Compare
/retest |
Bumping... anyone? Thanks. |
Bump as well, would like to see this in the official binary instead of using a custom one. |
@liranp: you cannot LGTM your own PR. In response to this:
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. |
ebe0bce
to
ef96a0b
Compare
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
ef96a0b
to
04d83c6
Compare
/remove-lifecycle stale |
this looks good to me, sorry for the delay! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liranp, rifelpet 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 |
Thank you so much, @rifelpet! |
@liranp Will you provide documentation? |
Description
This PR allows users to gradually integrate with Spotinst.
When the Spotinst feature flag is toggled on (
export KOPS_FEATURE_FLAGS="+Spotinst"
), kops manages all instance groups through the Spotinst API using both Spotinst Elastigroup and Spotinst Ocean.The new hybrid integration mode allows users to continue managing their instance groups through AWS Auto Scaling Groups, except for specific instance groups labeled with a predefined metadata label.
Usage