Skip to content

Added Reservation API, poollet and broker implementation - #1172

Closed
lukasfrank wants to merge 29 commits into
ironcore-dev:mainfrom
lukasfrank:feat/reservations
Closed

Added Reservation API, poollet and broker implementation#1172
lukasfrank wants to merge 29 commits into
ironcore-dev:mainfrom
lukasfrank:feat/reservations

Conversation

@lukasfrank

@lukasfrank lukasfrank commented Nov 25, 2024

Copy link
Copy Markdown
Member

Proposed Changes

  • Updated broker
  • Updated poollet
  • Updated api

Implements #1128

# Conflicts:
#	client-go/applyconfigurations/utils.go
#	client-go/informers/externalversions/compute/v1alpha1/reservation.go
#	client-go/ironcore/versioned/typed/compute/v1alpha1/fake/fake_reservation.go
#	client-go/ironcore/versioned/typed/compute/v1alpha1/reservation.go
@hardikdr hardikdr added this to Roadmap May 5, 2025
@lukasfrank lukasfrank self-assigned this May 23, 2025
Comment thread api/compute/v1alpha1/machinereservation_types.go Outdated
Comment thread api/compute/v1alpha1/machinereservation_types.go
Comment thread api/compute/v1alpha1/machinereservation_types.go
Comment thread api/compute/v1alpha1/machinereservation_types.go Outdated
@lukasfrank
lukasfrank marked this pull request as ready for review June 12, 2025 07:06
@lukasfrank
lukasfrank requested a review from a team June 12, 2025 07:06
@lukasfrank lukasfrank moved this to In Progress in Roadmap Jun 24, 2025
@lukasfrank lukasfrank added area/iaas Issues related to IronCore IaaS development. area/compute Compute and virtualization specific issues and enhancements. labels Jun 24, 2025
@lukasfrank lukasfrank added this to the H1/2025 milestone Jun 24, 2025
@lukasfrank lukasfrank linked an issue Jun 24, 2025 that may be closed by this pull request
# Conflicts:
#	iri/apis/machine/v1alpha1/api.pb.go
@lukasfrank
lukasfrank force-pushed the feat/reservations branch from 47a99e4 to 5ce43e7 Compare July 8, 2025 07:37
# Conflicts:
#	broker/machinebroker/server/server_suite_test.go
#	iri/apis/machine/v1alpha1/api.pb.go
#	poollet/machinepoollet/api/v1alpha1/common_types.go
_, iriReservation := GetSingleMapEntry(srv.Reservations)

By("inspecting the iri reservation")
Expect(iriReservation.Metadata.Labels).To(HaveKeyWithValue(fmt.Sprintf("%s%s", machinepoolletv1alpha1.MachineDownwardAPIPrefix, fooDownwardAPILabel), fooAnnotationValue))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
Expect(iriReservation.Metadata.Labels).To(HaveKeyWithValue(fmt.Sprintf("%s%s", machinepoolletv1alpha1.MachineDownwardAPIPrefix, fooDownwardAPILabel), fooAnnotationValue))
Expect(iriReservation.Metadata.Labels).To(HaveKeyWithValue(poolletutils.DownwardAPILabel(machinepoolletv1alpha1.MachineDownwardAPIPrefix, fooDownwardAPILabel), fooAnnotationValue))

The above function can be reused here to construct the label.

iriReservation.Status.State = iri.ReservationState_RESERVATION_STATE_ACCEPTED
srv.SetReservations([]*testingmachine.FakeReservation{iriReservation})

//By("ensuring the ironcore reservation status is pending accepted")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we remove this commented code?

@Rohit-0505

Copy link
Copy Markdown
Contributor

Can we also put a sample yaml in the config/samples and update the usage doc?

@kasabe28 kasabe28 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can add docs and gen files also


const (
// ReservationStatePending means the Reservation is being reconciled.
ReservationStatePending ReservationState = "Pending"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bound state is missing as per proposal

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

all filenames should follow same pattern either starting with machinereservation or reservation considering future enhancements for volume reservation.

}

type ReservationPoolStatus struct {
Name string `json:"ref,omitempty"`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
Name string `json:"ref,omitempty"`
Name string `json:"name,omitempty"`

@lukasfrank

Copy link
Copy Markdown
Member Author

Moving this into future

@lukasfrank lukasfrank closed this Jun 18, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Roadmap Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/compute Compute and virtualization specific issues and enhancements. area/iaas Issues related to IronCore IaaS development. ok-to-🐳 size/XXL

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Reservation-Based Scheduling for Machines (API)

5 participants