Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions helm/bundles/cortex-cinder/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ apiVersion: v2
name: cortex-cinder
description: A Helm chart deploying Cortex for Cinder.
type: application
version: 0.0.61
version: 0.0.62
appVersion: 0.1.0
dependencies:
# from: file://../../library/cortex-postgres
Expand All @@ -16,12 +16,12 @@ dependencies:
# from: file://../../library/cortex
- name: cortex
repository: oci://ghcr.io/cobaltcore-dev/cortex/charts
version: 0.0.48
version: 0.0.49
alias: cortex-knowledge-controllers
# from: file://../../library/cortex
- name: cortex
repository: oci://ghcr.io/cobaltcore-dev/cortex/charts
version: 0.0.48
version: 0.0.49
alias: cortex-scheduling-controllers

# Owner info adds a configmap to the kubernetes cluster with information on
Expand Down
4 changes: 2 additions & 2 deletions helm/bundles/cortex-crds/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ apiVersion: v2
name: cortex-crds
description: A Helm chart deploying Cortex CRDs.
type: application
version: 0.0.61
version: 0.0.62
appVersion: 0.1.0
dependencies:
# from: file://../../library/cortex
- name: cortex
repository: oci://ghcr.io/cobaltcore-dev/cortex/charts
version: 0.0.48
version: 0.0.49

# Owner info adds a configmap to the kubernetes cluster with information on
# the service owner. This makes it easier to find out who to contact in case
Expand Down
4 changes: 2 additions & 2 deletions helm/bundles/cortex-ironcore/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ apiVersion: v2
name: cortex-ironcore
description: A Helm chart deploying Cortex for IronCore.
type: application
version: 0.0.61
version: 0.0.62
appVersion: 0.1.0
dependencies:
# from: file://../../library/cortex
- name: cortex
repository: oci://ghcr.io/cobaltcore-dev/cortex/charts
version: 0.0.48
version: 0.0.49

# Owner info adds a configmap to the kubernetes cluster with information on
# the service owner. This makes it easier to find out who to contact in case
Expand Down
6 changes: 3 additions & 3 deletions helm/bundles/cortex-manila/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ apiVersion: v2
name: cortex-manila
description: A Helm chart deploying Cortex for Manila.
type: application
version: 0.0.61
version: 0.0.62
appVersion: 0.1.0
dependencies:
# from: file://../../library/cortex-postgres
Expand All @@ -16,12 +16,12 @@ dependencies:
# from: file://../../library/cortex
- name: cortex
repository: oci://ghcr.io/cobaltcore-dev/cortex/charts
version: 0.0.48
version: 0.0.49
alias: cortex-knowledge-controllers
# from: file://../../library/cortex
- name: cortex
repository: oci://ghcr.io/cobaltcore-dev/cortex/charts
version: 0.0.48
version: 0.0.49
alias: cortex-scheduling-controllers

# Owner info adds a configmap to the kubernetes cluster with information on
Expand Down
6 changes: 3 additions & 3 deletions helm/bundles/cortex-nova/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ apiVersion: v2
name: cortex-nova
description: A Helm chart deploying Cortex for Nova.
type: application
version: 0.0.61
version: 0.0.62
appVersion: 0.1.0
dependencies:
# from: file://../../library/cortex-postgres
Expand All @@ -16,12 +16,12 @@ dependencies:
# from: file://../../library/cortex
- name: cortex
repository: oci://ghcr.io/cobaltcore-dev/cortex/charts
version: 0.0.48
version: 0.0.49
alias: cortex-knowledge-controllers
# from: file://../../library/cortex
- name: cortex
repository: oci://ghcr.io/cobaltcore-dev/cortex/charts
version: 0.0.48
version: 0.0.49
alias: cortex-scheduling-controllers

# Owner info adds a configmap to the kubernetes cluster with information on
Expand Down
4 changes: 2 additions & 2 deletions helm/bundles/cortex-pods/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ apiVersion: v2
name: cortex-pods
description: A Helm chart deploying Cortex for Pods.
type: application
version: 0.0.61
version: 0.0.62
appVersion: 0.1.0
dependencies:
# from: file://../../library/cortex
- name: cortex
repository: oci://ghcr.io/cobaltcore-dev/cortex/charts
version: 0.0.48
version: 0.0.49

# Owner info adds a configmap to the kubernetes cluster with information on
# the service owner. This makes it easier to find out who to contact in case
Expand Down
4 changes: 2 additions & 2 deletions helm/library/cortex/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: cortex
description: A Helm chart to distribute cortex.
type: application
version: 0.0.48
appVersion: "sha-f3c2ce54"
version: 0.0.49
appVersion: "sha-7fda9569"
icon: "https://example.com/icon.png"
dependencies: []
2 changes: 1 addition & 1 deletion internal/scheduling/cinder/e2e_checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func checkCinderSchedulerReturnsValidHosts(
Hosts: []api.ExternalSchedulerHost{},
Weights: map[string]float64{},
}
apiURL := "http://cortex-cinder-scheduler:8080/scheduler/cinder/external"
apiURL := "http://localhost:8080/scheduler/cinder/external"
slog.Info("sending request to external scheduler", "apiURL", apiURL)

requestBody := must.Return(json.Marshal(request))
Expand Down
2 changes: 1 addition & 1 deletion internal/scheduling/manila/e2e_checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func checkManilaSchedulerReturnsValidHosts(
Hosts: hosts,
Weights: weights,
}
apiURL := "http://cortex-manila-scheduler:8080/scheduler/manila/external"
apiURL := "http://localhost:8080/scheduler/manila/external"
slog.Info("sending request to external scheduler", "apiURL", apiURL)

requestBody := must.Return(json.Marshal(request))
Expand Down
2 changes: 1 addition & 1 deletion internal/scheduling/nova/e2e_checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ func checkNovaSchedulerReturnsValidHosts(
req api.ExternalSchedulerRequest,
) []string {

apiURL := "http://cortex-nova-scheduler:8080/scheduler/nova/external"
apiURL := "http://localhost:8080/scheduler/nova/external"
slog.Info("sending request to external scheduler", "apiURL", apiURL)

requestBody := must.Return(json.Marshal(req))
Expand Down
33 changes: 27 additions & 6 deletions internal/scheduling/reservations/commitments/api/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"context"
"encoding/json"
"fmt"
"math"
"net/http"
"strconv"
"strings"
Expand Down Expand Up @@ -75,12 +76,22 @@ func (api *HTTPAPI) recordInfoMetrics(statusCode int, startTime time.Time) {
}

// resourceAttributes holds the custom attributes for a resource in the info API response.
// Ratio values are in GiB per vCPU, matching the RAM resource unit (UnitGibibytes).
type resourceAttributes struct {
RamCoreRatio *uint64 `json:"ramCoreRatio,omitempty"`
RamCoreRatioMin *uint64 `json:"ramCoreRatioMin,omitempty"`
RamCoreRatioMax *uint64 `json:"ramCoreRatioMax,omitempty"`
}

// mibToGiB converts a MiB pointer value to GiB, rounded to the nearest integer. Returns nil if v is nil.
func mibToGiB(v *uint64) *uint64 {
if v == nil {
return nil
}
gib := uint64(math.Round(float64(*v) / 1024))
return &gib
}

// buildServiceInfo constructs the ServiceInfo response with metadata for all flavor groups.
// For each flavor group, three resources are registered:
// - _ram: RAM resource (unit = multiples of smallest flavor RAM, HandlesCommitments=true only if fixed ratio)
Expand Down Expand Up @@ -110,11 +121,13 @@ func (api *HTTPAPI) buildServiceInfo(ctx context.Context, logger logr.Logger) (l
}
flavorListStr := strings.Join(flavorNames, ", ")

// Build attributes JSON with ratio info (shared across all resource types)
// Build attributes JSON with ratio info (shared across all resource types).
// Ratios are stored in MiB/vCPU in the knowledge CRD; convert to GiB/vCPU here
// so the values match the GiB unit used by the RAM resource.
attrs := resourceAttributes{
RamCoreRatio: groupData.RamCoreRatio,
RamCoreRatioMin: groupData.RamCoreRatioMin,
RamCoreRatioMax: groupData.RamCoreRatioMax,
RamCoreRatio: mibToGiB(groupData.RamCoreRatio),
RamCoreRatioMin: mibToGiB(groupData.RamCoreRatioMin),
RamCoreRatioMax: mibToGiB(groupData.RamCoreRatioMax),
}
attrsJSON, err := json.Marshal(attrs)
if err != nil {
Expand Down Expand Up @@ -146,13 +159,17 @@ func (api *HTTPAPI) buildServiceInfo(ctx context.Context, logger logr.Logger) (l

// === 2. Cores Resource ===
coresResourceName := liquid.ResourceName(commitments.ResourceNameCores(groupName))
coresTopology := liquid.AZAwareTopology
if resCfg.Cores.HandlesCommitments {
coresTopology = liquid.AZSeparatedTopology
}
resources[coresResourceName] = liquid.ResourceInfo{
DisplayName: fmt.Sprintf(
"CPU cores (usable by: %s)",
flavorListStr,
),
Unit: liquid.UnitNone,
Topology: liquid.AZAwareTopology,
Topology: coresTopology,
NeedsResourceDemand: false,
HasCapacity: resCfg.Cores.HasCapacity,
HasQuota: resCfg.Cores.HasQuota,
Expand All @@ -162,13 +179,17 @@ func (api *HTTPAPI) buildServiceInfo(ctx context.Context, logger logr.Logger) (l

// === 3. Instances Resource ===
instancesResourceName := liquid.ResourceName(commitments.ResourceNameInstances(groupName))
instancesTopology := liquid.AZAwareTopology
if resCfg.Instances.HandlesCommitments {
instancesTopology = liquid.AZSeparatedTopology
}
resources[instancesResourceName] = liquid.ResourceInfo{
DisplayName: fmt.Sprintf(
"instances (usable by: %s)",
flavorListStr,
),
Unit: liquid.UnitNone,
Topology: liquid.AZAwareTopology,
Topology: instancesTopology,
NeedsResourceDemand: false,
HasCapacity: resCfg.Instances.HasCapacity,
HasQuota: resCfg.Instances.HasQuota,
Expand Down
Loading
Loading