Skip to content

Commit cfa43ef

Browse files
authored
Use new external customer trait (#681)
1 parent 4879885 commit cfa43ef

7 files changed

Lines changed: 12 additions & 12 deletions

File tree

helm/bundles/cortex-nova/templates/pipelines_kvm.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ spec:
5151
description: |
5252
This step prefix-matches the domain name for external customer domains and
5353
filters out hosts that are not intended for external customers. It considers
54-
the `CUSTOM_EXTERNAL_CUSTOMER_SUPPORTED` trait on hosts as well as the
54+
the `CUSTOM_EXTERNAL_CUSTOMER_EXCLUSIVE` trait on hosts as well as the
5555
`domain_name` scheduler hint from the nova request spec.
5656
params:
5757
- {key: domainNamePrefixes, stringListValue: ["iaas-"]}
@@ -190,7 +190,7 @@ spec:
190190
description: |
191191
This step prefix-matches the domain name for external customer domains and
192192
filters out hosts that are not intended for external customers. It considers
193-
the `CUSTOM_EXTERNAL_CUSTOMER_SUPPORTED` trait on hosts as well as the
193+
the `CUSTOM_EXTERNAL_CUSTOMER_EXCLUSIVE` trait on hosts as well as the
194194
`domain_name` scheduler hint from the nova request spec.
195195
params:
196196
- {key: domainNamePrefixes, stringListValue: ["iaas-"]}
@@ -463,7 +463,7 @@ spec:
463463
description: |
464464
This step prefix-matches the domain name for external customer domains and
465465
filters out hosts that are not intended for external customers. It considers
466-
the `CUSTOM_EXTERNAL_CUSTOMER_SUPPORTED` trait on hosts as well as the
466+
the `CUSTOM_EXTERNAL_CUSTOMER_EXCLUSIVE` trait on hosts as well as the
467467
`domain_name` scheduler hint from the nova request spec.
468468
params:
469469
- {key: domainNamePrefixes, stringListValue: ["iaas-"]}
@@ -534,7 +534,7 @@ spec:
534534
description: |
535535
This step prefix-matches the domain name for external customer domains and
536536
filters out hosts that are not intended for external customers. It considers
537-
the `CUSTOM_EXTERNAL_CUSTOMER_SUPPORTED` trait on hosts as well as the
537+
the `CUSTOM_EXTERNAL_CUSTOMER_EXCLUSIVE` trait on hosts as well as the
538538
`domain_name` scheduler hint from the nova request spec.
539539
params:
540540
- {key: domainNamePrefixes, stringListValue: ["iaas-"]}

internal/knowledge/extractor/plugins/compute/host_details.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ SELECT
3535
ELSE false
3636
END AS decommissioned,
3737
CASE
38-
WHEN ht.traits LIKE '%CUSTOM_EXTERNAL_CUSTOMER_SUPPORTED%' THEN true
38+
WHEN ht.traits LIKE '%CUSTOM_EXTERNAL_CUSTOMER_EXCLUSIVE%' THEN true
3939
ELSE false
4040
END AS external_customer,
4141
CASE

internal/knowledge/extractor/plugins/compute/host_details_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func TestHostDetailsExtractor_Extract(t *testing.T) {
8080
// VMware host traits
8181
&placement.Trait{ResourceProviderUUID: "uuid1", Name: "CUSTOM_HW_SAPPHIRE_RAPIDS"},
8282
&placement.Trait{ResourceProviderUUID: "uuid1", Name: "CUSTOM_HANA_EXCLUSIVE_HOST"},
83-
&placement.Trait{ResourceProviderUUID: "uuid1", Name: "CUSTOM_EXTERNAL_CUSTOMER_SUPPORTED"},
83+
&placement.Trait{ResourceProviderUUID: "uuid1", Name: "CUSTOM_EXTERNAL_CUSTOMER_EXCLUSIVE"},
8484
// KVM host traits
8585
&placement.Trait{ResourceProviderUUID: "uuid2", Name: "CUSTOM_NUMASIZE_C48_M729"},
8686
// Ironic host traits

internal/knowledge/kpis/plugins/compute/resource_capacity_kvm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ func hostLabelsFromHypervisor(hypervisor hv1.Hypervisor) kvmHostLabels {
277277
workloadType = "hana"
278278
case "CUSTOM_DECOMMISSIONING":
279279
decommissioned = true
280-
case "CUSTOM_EXTERNAL_CUSTOMER_SUPPORTED":
280+
case "CUSTOM_EXTERNAL_CUSTOMER_EXCLUSIVE":
281281
externalCustomer = true
282282
}
283283
}

internal/knowledge/kpis/plugins/compute/resource_capacity_kvm_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ func TestKVMResourceCapacityKPI_Collect(t *testing.T) {
379379
},
380380
Traits: []string{
381381
"CUSTOM_DECOMMISSIONING",
382-
"CUSTOM_EXTERNAL_CUSTOMER_SUPPORTED",
382+
"CUSTOM_EXTERNAL_CUSTOMER_EXCLUSIVE",
383383
},
384384
},
385385
},

internal/scheduling/nova/plugins/filters/filter_external_customer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func (s *FilterExternalCustomerStep) Run(traceLog *slog.Logger, request api.Exte
6565
for _, hv := range hvs.Items {
6666
traits := hv.Status.Traits
6767
traits = append(traits, hv.Spec.CustomTraits...)
68-
if !slices.Contains(traits, "CUSTOM_EXTERNAL_CUSTOMER_SUPPORTED") {
68+
if !slices.Contains(traits, "CUSTOM_EXTERNAL_CUSTOMER_EXCLUSIVE") {
6969
continue
7070
}
7171
hvsWithTrait[hv.Name] = struct{}{}

internal/scheduling/nova/plugins/filters/filter_external_customer_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ func TestFilterExternalCustomerStep_Run(t *testing.T) {
2626
Name: "host1",
2727
},
2828
Status: hv1.HypervisorStatus{
29-
Traits: []string{"CUSTOM_EXTERNAL_CUSTOMER_SUPPORTED"},
29+
Traits: []string{"CUSTOM_EXTERNAL_CUSTOMER_EXCLUSIVE"},
3030
},
3131
},
3232
&hv1.Hypervisor{
3333
ObjectMeta: v1.ObjectMeta{
3434
Name: "host2",
3535
},
3636
Status: hv1.HypervisorStatus{
37-
Traits: []string{"CUSTOM_EXTERNAL_CUSTOMER_SUPPORTED", "SOME_OTHER_TRAIT"},
37+
Traits: []string{"CUSTOM_EXTERNAL_CUSTOMER_EXCLUSIVE", "SOME_OTHER_TRAIT"},
3838
},
3939
},
4040
&hv1.Hypervisor{
@@ -58,7 +58,7 @@ func TestFilterExternalCustomerStep_Run(t *testing.T) {
5858
Name: "host5",
5959
},
6060
Status: hv1.HypervisorStatus{
61-
Traits: []string{"CUSTOM_EXTERNAL_CUSTOMER_SUPPORTED"},
61+
Traits: []string{"CUSTOM_EXTERNAL_CUSTOMER_EXCLUSIVE"},
6262
},
6363
},
6464
}

0 commit comments

Comments
 (0)