Skip to content

Conversation

@lukasfrank
Copy link
Member

@lukasfrank lukasfrank commented Nov 25, 2024

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
@lukasfrank lukasfrank marked this pull request as ready for review June 12, 2025 07:06
@lukasfrank lukasfrank requested a review from a team as a code owner 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
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
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
Contributor

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

Copy link
Contributor

@kasabe28 kasabe28 left a comment

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
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
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
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"`

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: In Progress

Development

Successfully merging this pull request may close these issues.

Reservation-Based Scheduling for Machines (API)

4 participants