From 022fba6274b4f77077225fda6af124b400b3743d Mon Sep 17 00:00:00 2001 From: Malte Viering Date: Wed, 25 Mar 2026 10:53:17 +0100 Subject: [PATCH 1/3] wide view of failover reservations --- api/v1alpha1/reservation_types.go | 4 ++++ .../files/crds/cortex.cloud_reservations.yaml | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/api/v1alpha1/reservation_types.go b/api/v1alpha1/reservation_types.go index 97950a395..6ff3988a1 100644 --- a/api/v1alpha1/reservation_types.go +++ b/api/v1alpha1/reservation_types.go @@ -211,6 +211,10 @@ type ReservationStatus struct { // +kubebuilder:printcolumn:name="Type",type="string",JSONPath=".metadata.labels['reservations\\.cortex\\.cloud/type']" // +kubebuilder:printcolumn:name="Host",type="string",JSONPath=".status.host" // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Resources",type="string",JSONPath=".spec.resources",priority=1 +// +kubebuilder:printcolumn:name="LastChanged",type="date",JSONPath=".status.failoverReservation.lastChanged",priority=1 +// +kubebuilder:printcolumn:name="AcknowledgedAt",type="date",JSONPath=".status.failoverReservation.acknowledgedAt",priority=1 +// +kubebuilder:printcolumn:name="Allocations",type="string",JSONPath=".status.failoverReservation.allocations",priority=1 // Reservation is the Schema for the reservations API type Reservation struct { diff --git a/helm/library/cortex/files/crds/cortex.cloud_reservations.yaml b/helm/library/cortex/files/crds/cortex.cloud_reservations.yaml index ab622c1c0..bb673e10f 100644 --- a/helm/library/cortex/files/crds/cortex.cloud_reservations.yaml +++ b/helm/library/cortex/files/crds/cortex.cloud_reservations.yaml @@ -24,6 +24,22 @@ spec: - jsonPath: .status.conditions[?(@.type=='Ready')].status name: Ready type: string + - jsonPath: .spec.resources + name: Resources + priority: 1 + type: string + - jsonPath: .status.failoverReservation.lastChanged + name: LastChanged + priority: 1 + type: date + - jsonPath: .status.failoverReservation.acknowledgedAt + name: AcknowledgedAt + priority: 1 + type: date + - jsonPath: .status.failoverReservation.allocations + name: Allocations + priority: 1 + type: string name: v1alpha1 schema: openAPIV3Schema: From 1866bbfb24a7c33b4f99b4693588c88a16bf1b50 Mon Sep 17 00:00:00 2001 From: mblos Date: Wed, 25 Mar 2026 13:29:06 +0100 Subject: [PATCH 2/3] adding columns for cr reservations --- api/v1alpha1/reservation_types.go | 5 +++++ .../files/crds/cortex.cloud_reservations.yaml | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/api/v1alpha1/reservation_types.go b/api/v1alpha1/reservation_types.go index 6ff3988a1..ed0453972 100644 --- a/api/v1alpha1/reservation_types.go +++ b/api/v1alpha1/reservation_types.go @@ -211,6 +211,11 @@ type ReservationStatus struct { // +kubebuilder:printcolumn:name="Type",type="string",JSONPath=".metadata.labels['reservations\\.cortex\\.cloud/type']" // +kubebuilder:printcolumn:name="Host",type="string",JSONPath=".status.host" // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="ResourceGroup",type="string",JSONPath=".spec.committedResourceReservation.resourceGroup" +// +kubebuilder:printcolumn:name="Project",type="string",JSONPath=".spec.committedResourceReservation.projectID" +// +kubebuilder:printcolumn:name="AZ",type="string",JSONPath=".spec.availabilityZone" +// +kubebuilder:printcolumn:name="StartTime",type="string",JSONPath=".spec.startTime",priority=1 +// +kubebuilder:printcolumn:name="EndTime",type="string",JSONPath=".spec.endTime" // +kubebuilder:printcolumn:name="Resources",type="string",JSONPath=".spec.resources",priority=1 // +kubebuilder:printcolumn:name="LastChanged",type="date",JSONPath=".status.failoverReservation.lastChanged",priority=1 // +kubebuilder:printcolumn:name="AcknowledgedAt",type="date",JSONPath=".status.failoverReservation.acknowledgedAt",priority=1 diff --git a/helm/library/cortex/files/crds/cortex.cloud_reservations.yaml b/helm/library/cortex/files/crds/cortex.cloud_reservations.yaml index bb673e10f..b517ddf0b 100644 --- a/helm/library/cortex/files/crds/cortex.cloud_reservations.yaml +++ b/helm/library/cortex/files/crds/cortex.cloud_reservations.yaml @@ -24,6 +24,22 @@ spec: - jsonPath: .status.conditions[?(@.type=='Ready')].status name: Ready type: string + - jsonPath: .spec.committedResourceReservation.resourceGroup + name: ResourceGroup + type: string + - jsonPath: .spec.committedResourceReservation.projectID + name: Project + type: string + - jsonPath: .spec.availabilityZone + name: AZ + type: string + - jsonPath: .spec.startTime + name: StartTime + priority: 1 + type: string + - jsonPath: .spec.endTime + name: EndTime + type: string - jsonPath: .spec.resources name: Resources priority: 1 From 7463487f01c41339f63913c5f957deb769a21638 Mon Sep 17 00:00:00 2001 From: mblos Date: Wed, 25 Mar 2026 13:50:40 +0100 Subject: [PATCH 3/3] fix allocations --- api/v1alpha1/reservation_types.go | 3 ++- .../cortex/files/crds/cortex.cloud_reservations.yaml | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/api/v1alpha1/reservation_types.go b/api/v1alpha1/reservation_types.go index ed0453972..e0f141ebc 100644 --- a/api/v1alpha1/reservation_types.go +++ b/api/v1alpha1/reservation_types.go @@ -219,7 +219,8 @@ type ReservationStatus struct { // +kubebuilder:printcolumn:name="Resources",type="string",JSONPath=".spec.resources",priority=1 // +kubebuilder:printcolumn:name="LastChanged",type="date",JSONPath=".status.failoverReservation.lastChanged",priority=1 // +kubebuilder:printcolumn:name="AcknowledgedAt",type="date",JSONPath=".status.failoverReservation.acknowledgedAt",priority=1 -// +kubebuilder:printcolumn:name="Allocations",type="string",JSONPath=".status.failoverReservation.allocations",priority=1 +// +kubebuilder:printcolumn:name="CR Allocations",type="string",JSONPath=".status.committedResourceReservation.allocations",priority=1 +// +kubebuilder:printcolumn:name="HA Allocations",type="string",JSONPath=".status.failoverReservation.allocations",priority=1 // Reservation is the Schema for the reservations API type Reservation struct { diff --git a/helm/library/cortex/files/crds/cortex.cloud_reservations.yaml b/helm/library/cortex/files/crds/cortex.cloud_reservations.yaml index b517ddf0b..64931bc4d 100644 --- a/helm/library/cortex/files/crds/cortex.cloud_reservations.yaml +++ b/helm/library/cortex/files/crds/cortex.cloud_reservations.yaml @@ -52,8 +52,12 @@ spec: name: AcknowledgedAt priority: 1 type: date + - jsonPath: .status.committedResourceReservation.allocations + name: CR Allocations + priority: 1 + type: string - jsonPath: .status.failoverReservation.allocations - name: Allocations + name: HA Allocations priority: 1 type: string name: v1alpha1