Skip to content

Commit bde75d7

Browse files
authored
Merge branch 'main' into add-prom-for-failover-res
2 parents 722e0cd + 904b83f commit bde75d7

File tree

25 files changed

+1274
-405
lines changed

25 files changed

+1274
-405
lines changed

api/external/cinder/messages.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,23 @@ func (r ExternalSchedulerRequest) GetTraceLogArgs() []slog.Attr {
5050
slog.String("project", r.Context.ProjectID),
5151
}
5252
}
53-
func (r ExternalSchedulerRequest) FilterHosts(includedHosts map[string]float64) lib.FilterWeigherPipelineRequest {
53+
func (r ExternalSchedulerRequest) Filter(includedHosts map[string]float64) lib.FilterWeigherPipelineRequest {
5454
filteredHosts := make([]ExternalSchedulerHost, 0, len(includedHosts))
5555
for _, host := range r.Hosts {
5656
if _, exists := includedHosts[host.VolumeHost]; exists {
5757
filteredHosts = append(filteredHosts, host)
5858
}
5959
}
6060
r.Hosts = filteredHosts
61+
// Also filter the weights map to only include the hosts that are still
62+
// in the request, and update the weights accordingly.
63+
filteredWeights := make(map[string]float64, len(includedHosts))
64+
for host, weight := range includedHosts {
65+
if _, exists := includedHosts[host]; exists {
66+
filteredWeights[host] = weight
67+
}
68+
}
69+
r.Weights = filteredWeights
6170
return r
6271
}
6372

api/external/ironcore/messages.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func (r MachinePipelineRequest) GetWeights() map[string]float64 {
3232
func (r MachinePipelineRequest) GetTraceLogArgs() []slog.Attr {
3333
return []slog.Attr{}
3434
}
35-
func (r MachinePipelineRequest) FilterHosts(includedHosts map[string]float64) lib.FilterWeigherPipelineRequest {
35+
func (r MachinePipelineRequest) Filter(includedHosts map[string]float64) lib.FilterWeigherPipelineRequest {
3636
filteredPools := make([]ironcorev1alpha1.MachinePool, 0, len(includedHosts))
3737
for _, pool := range r.Pools {
3838
if _, exists := includedHosts[pool.Name]; exists {

api/external/manila/messages.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,23 @@ func (r ExternalSchedulerRequest) GetTraceLogArgs() []slog.Attr {
5050
slog.String("project", r.Context.ProjectID),
5151
}
5252
}
53-
func (r ExternalSchedulerRequest) FilterHosts(includedHosts map[string]float64) lib.FilterWeigherPipelineRequest {
53+
func (r ExternalSchedulerRequest) Filter(includedHosts map[string]float64) lib.FilterWeigherPipelineRequest {
5454
filteredHosts := make([]ExternalSchedulerHost, 0, len(includedHosts))
5555
for _, host := range r.Hosts {
5656
if _, exists := includedHosts[host.ShareHost]; exists {
5757
filteredHosts = append(filteredHosts, host)
5858
}
5959
}
6060
r.Hosts = filteredHosts
61+
// Also filter the weights map to only include the hosts that are still
62+
// in the request, and update the weights accordingly.
63+
filteredWeights := make(map[string]float64, len(includedHosts))
64+
for host, weight := range includedHosts {
65+
if _, exists := includedHosts[host]; exists {
66+
filteredWeights[host] = weight
67+
}
68+
}
69+
r.Weights = filteredWeights
6170
return r
6271
}
6372

api/external/nova/messages.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,23 @@ func (r ExternalSchedulerRequest) GetTraceLogArgs() []slog.Attr {
6161
slog.String("project", r.Context.ProjectID),
6262
}
6363
}
64-
func (r ExternalSchedulerRequest) FilterHosts(includedHosts map[string]float64) lib.FilterWeigherPipelineRequest {
64+
func (r ExternalSchedulerRequest) Filter(includedHosts map[string]float64) lib.FilterWeigherPipelineRequest {
6565
filteredHosts := make([]ExternalSchedulerHost, 0, len(includedHosts))
6666
for _, host := range r.Hosts {
6767
if _, exists := includedHosts[host.ComputeHost]; exists {
6868
filteredHosts = append(filteredHosts, host)
6969
}
7070
}
7171
r.Hosts = filteredHosts
72+
// Also filter the weights map to only include the hosts that are still
73+
// in the request, and update the weights accordingly.
74+
filteredWeights := make(map[string]float64, len(includedHosts))
75+
for host, weight := range includedHosts {
76+
if _, exists := includedHosts[host]; exists {
77+
filteredWeights[host] = weight
78+
}
79+
}
80+
r.Weights = filteredWeights
7281
return r
7382
}
7483

api/external/pods/messages.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func (r PodPipelineRequest) GetWeights() map[string]float64 {
3434
func (r PodPipelineRequest) GetTraceLogArgs() []slog.Attr {
3535
return []slog.Attr{}
3636
}
37-
func (r PodPipelineRequest) FilterHosts(includedHosts map[string]float64) lib.FilterWeigherPipelineRequest {
37+
func (r PodPipelineRequest) Filter(includedHosts map[string]float64) lib.FilterWeigherPipelineRequest {
3838
filteredNodes := make([]corev1.Node, 0, len(includedHosts))
3939
for _, node := range r.Nodes {
4040
if _, exists := includedHosts[node.Name]; exists {

api/v1alpha1/datasource_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ type OpenStackDatasource struct {
167167
Cinder CinderDatasource `json:"cinder"`
168168

169169
// How often to sync the datasource.
170-
// +kubebuilder:default="60s"
170+
// +kubebuilder:default="600s"
171171
SyncInterval metav1.Duration `json:"syncInterval"`
172172

173173
// Keystone credentials secret ref for authenticating with openstack.

helm/bundles/cortex-cinder/Chart.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ apiVersion: v2
55
name: cortex-cinder
66
description: A Helm chart deploying Cortex for Cinder.
77
type: application
8-
version: 0.0.48
8+
version: 0.0.51
99
appVersion: 0.1.0
1010
dependencies:
1111
# from: file://../../library/cortex-postgres
@@ -16,12 +16,12 @@ dependencies:
1616
# from: file://../../library/cortex
1717
- name: cortex
1818
repository: oci://ghcr.io/cobaltcore-dev/cortex/charts
19-
version: 0.0.35
19+
version: 0.0.38
2020
alias: cortex-knowledge-controllers
2121
# from: file://../../library/cortex
2222
- name: cortex
2323
repository: oci://ghcr.io/cobaltcore-dev/cortex/charts
24-
version: 0.0.35
24+
version: 0.0.38
2525
alias: cortex-scheduling-controllers
2626

2727
# Owner info adds a configmap to the kubernetes cluster with information on

helm/bundles/cortex-crds/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ apiVersion: v2
55
name: cortex-crds
66
description: A Helm chart deploying Cortex CRDs.
77
type: application
8-
version: 0.0.48
8+
version: 0.0.51
99
appVersion: 0.1.0
1010
dependencies:
1111
# from: file://../../library/cortex
1212
- name: cortex
1313
repository: oci://ghcr.io/cobaltcore-dev/cortex/charts
14-
version: 0.0.35
14+
version: 0.0.38
1515

1616
# Owner info adds a configmap to the kubernetes cluster with information on
1717
# the service owner. This makes it easier to find out who to contact in case

helm/bundles/cortex-ironcore/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ apiVersion: v2
55
name: cortex-ironcore
66
description: A Helm chart deploying Cortex for IronCore.
77
type: application
8-
version: 0.0.48
8+
version: 0.0.51
99
appVersion: 0.1.0
1010
dependencies:
1111
# from: file://../../library/cortex
1212
- name: cortex
1313
repository: oci://ghcr.io/cobaltcore-dev/cortex/charts
14-
version: 0.0.35
14+
version: 0.0.38
1515

1616
# Owner info adds a configmap to the kubernetes cluster with information on
1717
# the service owner. This makes it easier to find out who to contact in case

helm/bundles/cortex-manila/Chart.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ apiVersion: v2
55
name: cortex-manila
66
description: A Helm chart deploying Cortex for Manila.
77
type: application
8-
version: 0.0.48
8+
version: 0.0.51
99
appVersion: 0.1.0
1010
dependencies:
1111
# from: file://../../library/cortex-postgres
@@ -16,12 +16,12 @@ dependencies:
1616
# from: file://../../library/cortex
1717
- name: cortex
1818
repository: oci://ghcr.io/cobaltcore-dev/cortex/charts
19-
version: 0.0.35
19+
version: 0.0.38
2020
alias: cortex-knowledge-controllers
2121
# from: file://../../library/cortex
2222
- name: cortex
2323
repository: oci://ghcr.io/cobaltcore-dev/cortex/charts
24-
version: 0.0.35
24+
version: 0.0.38
2525
alias: cortex-scheduling-controllers
2626

2727
# Owner info adds a configmap to the kubernetes cluster with information on

0 commit comments

Comments
 (0)