-
Notifications
You must be signed in to change notification settings - Fork 26
OCPCLOUD-3173: Implement Spot instances #133
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
base: main
Are you sure you want to change the base?
Conversation
|
@RadekManak: This pull request references OCPCLOUD-3173 which is a valid jira issue. 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 openshift-eng/jira-lifecycle-plugin repository. |
|
/test verify-deps |
damdo
left a comment
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 @RadekManak !
/approve
looks reasonable to me. Left a comment.
@JoelSpeed also asked to see new webhooks on the Machine API Operator regarding this addition (here?), would you be able to put up a PR for those too? TY
go.mod
Outdated
|
|
||
| replace github.com/openshift/api => github.com/de1987/api v0.0.0-20250922160536-7b31e8e46bdd |
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.
TODO: update before merging
| // preemptible and spot instances have separate quota with "PREEMPTIBLE_" prefix | ||
| if r.providerSpec.Preemptible || r.providerSpec.ProvisioningModel == machinev1.GCPSpotInstance { | ||
| metric = "PREEMPTIBLE_" + metric | ||
| } |
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.
Do we need a specific one for SPOT or is this 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.
Both spot and preemptible use the PREEMPTIBLE_ quota.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: damdo 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 |
|
@RadekManak: This pull request references OCPCLOUD-3173 which is a valid jira issue. 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 openshift-eng/jira-lifecycle-plugin repository. |
|
/assign @JoelSpeed |
| default: | ||
| return string(model) | ||
| } |
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.
There should be no other valid values right? So shouldn't this panic? How do we know this is the correct behaviour?
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.
You're right, the default probably won't work and might introduce unexpected behavior. I changed the function to return error instead.
|
@RadekManak: This pull request references OCPCLOUD-3173 which is a valid jira issue. 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 openshift-eng/jira-lifecycle-plugin repository. |
|
@RadekManak: The following tests failed, say
Full PR test history. Your PR dashboard. 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-sigs/prow repository. I understand the commands that are listed here. |
|
Changes here LGTM once the revendor is done on o/api |
API
Enhancement
Webhooks
This PR implements Spot provisioning model. It reuses most of the code for preemptible instances, as they are the legacy option for interruptible instances. There is no difference between them from OpenShift perspective.