File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -113,8 +113,8 @@ spec:
113
113
- name
114
114
type : object
115
115
x-kubernetes-validations :
116
- - message : port is required when kind is 'Service' and unset(default
117
- to 'Service')
116
+ - message : port is required when kind is 'Service' or unspecified
117
+ (defaults to 'Service')
118
118
rule : self.kind != 'Service' || has(self.port)
119
119
selector :
120
120
description : |-
Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ import (
23
23
"time"
24
24
25
25
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
26
-
27
26
v1 "sigs.k8s.io/gateway-api-inference-extension/api/v1"
28
27
)
29
28
@@ -69,19 +68,17 @@ func TestValidateInferencePool(t *testing.T) {
69
68
mutate : func (ip * v1.InferencePool ) {
70
69
// By setting Kind to an empty string, we rely on the API server's default value of "Service".
71
70
ip .Spec .EndpointPickerRef .Kind = ""
72
- ip .Spec .EndpointPickerRef .Name = "vllm-llama3-8b-instruct-epp"
73
71
ip .Spec .EndpointPickerRef .Port = nil
74
72
},
75
- wantErrors : []string {"port is required when kind is 'Service' and unset(default to 'Service')" },
73
+ wantErrors : []string {"port is required when kind is 'Service' or unspecified (defaults to 'Service')" },
76
74
},
77
75
{
78
76
desc : "fails validation when kind is explicitly 'Service' and port is missing" ,
79
77
mutate : func (ip * v1.InferencePool ) {
80
78
ip .Spec .EndpointPickerRef .Kind = "Service"
81
- ip .Spec .EndpointPickerRef .Name = "vllm-llama3-8b-instruct-epp"
82
79
ip .Spec .EndpointPickerRef .Port = nil
83
80
},
84
- wantErrors : []string {"port is required when kind is 'Service' and unset(default to 'Service')" },
81
+ wantErrors : []string {"port is required when kind is 'Service' or unspecified (defaults to 'Service')" },
85
82
},
86
83
}
87
84
You can’t perform that action at this time.
0 commit comments