Skip to content

Conversation

@RadekManak
Copy link
Contributor

@RadekManak RadekManak commented Nov 3, 2025

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.

@openshift-ci openshift-ci bot requested review from chrischdi and damdo November 3, 2025 13:01
@RadekManak RadekManak changed the title Implement Spot instances OCPCLOUD-3173: Implement Spot instances Nov 3, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 3, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Nov 3, 2025

@RadekManak: This pull request references OCPCLOUD-3173 which is a valid jira issue.

In response to this:

API
Enhancement

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.

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.

@damdo
Copy link
Member

damdo commented Nov 3, 2025

/test verify-deps

Copy link
Member

@damdo damdo left a 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
Comment on lines 132 to 133

replace github.com/openshift/api => github.com/de1987/api v0.0.0-20250922160536-7b31e8e46bdd
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: update before merging

Comment on lines 124 to 130
// preemptible and spot instances have separate quota with "PREEMPTIBLE_" prefix
if r.providerSpec.Preemptible || r.providerSpec.ProvisioningModel == machinev1.GCPSpotInstance {
metric = "PREEMPTIBLE_" + metric
}
Copy link
Member

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?

Copy link
Contributor Author

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.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 3, 2025

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 3, 2025
@damdo
Copy link
Member

damdo commented Nov 3, 2025

/retest

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Nov 4, 2025

@RadekManak: This pull request references OCPCLOUD-3173 which is a valid jira issue.

In response to this:

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.

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.

@damdo
Copy link
Member

damdo commented Nov 5, 2025

/assign @JoelSpeed

Comment on lines 83 to 88
default:
return string(model)
}
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Nov 5, 2025

@RadekManak: This pull request references OCPCLOUD-3173 which is a valid jira issue.

In response to this:

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.

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.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 6, 2025

@RadekManak: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/regression-clusterinfra-gcp-ipi-mapi d87b854 link false /test regression-clusterinfra-gcp-ipi-mapi
ci/prow/okd-scos-e2e-aws-ovn d87b854 link false /test okd-scos-e2e-aws-ovn

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.

@JoelSpeed
Copy link
Contributor

Changes here LGTM once the revendor is done on o/api

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants