Skip to content

Commit 82def1e

Browse files
kevin-shelagajenshushashankram
authored
[1.18 Backport] gateway params externaltrafficpolicy (#10552)
Signed-off-by: Shashank Ram <[email protected]> Co-authored-by: Jenny Shu <[email protected]> Co-authored-by: Shashank Ram <[email protected]>
1 parent 7b889c5 commit 82def1e

File tree

18 files changed

+163
-14
lines changed

18 files changed

+163
-14
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
changelog:
2+
- type: FIX
3+
issueLink: https://github.com/k8sgateway/k8sgateway/issues/9879
4+
resolvesIssue: true
5+
description: >-
6+
Add ability to configure proxy service External Traffic Policy via Gateway Params

docs/content/reference/api/github.com/solo-io/gloo/projects/gateway2/api/v1alpha1/gateway_parameters.md

+7
Original file line numberDiff line numberDiff line change
@@ -7657,6 +7657,13 @@ Resource Types:
76577657
<br/>
76587658
</td>
76597659
<td>false</td>
7660+
</tr><tr>
7661+
<td><b>externalTrafficPolicy</b></td>
7662+
<td>string</td>
7663+
<td>
7664+
<br/>
7665+
</td>
7666+
<td>false</td>
76607667
</tr><tr>
76617668
<td><b>extraAnnotations</b></td>
76627669
<td>map[string]string</td>

docs/content/reference/values.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
|kubeGateway.gatewayParameters.glooGateway.service.type|string|LoadBalancer|K8s service type. If set to null, a default of LoadBalancer will be imposed.|
4343
|kubeGateway.gatewayParameters.glooGateway.service.extraLabels.NAME|string||Extra labels to add to the service.|
4444
|kubeGateway.gatewayParameters.glooGateway.service.extraAnnotations.NAME|string||Extra annotations to add to the service.|
45+
|kubeGateway.gatewayParameters.glooGateway.service.externalTrafficPolicy|string||Set the external traffic policy on the provisioned service.|
4546
|kubeGateway.gatewayParameters.glooGateway.serviceAccount.extraLabels.NAME|string||Extra labels to add to the service account.|
4647
|kubeGateway.gatewayParameters.glooGateway.serviceAccount.extraAnnotations.NAME|string||Extra annotations to add to the service account.|
4748
|kubeGateway.gatewayParameters.glooGateway.sdsContainer.image.tag|string|<release_version, ex: 1.2.3>|The image tag for the container.|
@@ -1002,7 +1003,7 @@
10021003
|gatewayProxies.NAME.service.httpsNodePort|int||HTTPS nodeport for the gateway service if using type NodePort|
10031004
|gatewayProxies.NAME.service.clusterIP|string||static clusterIP (or `None`) when `gatewayProxies[].gatewayProxy.service.type` is `ClusterIP`|
10041005
|gatewayProxies.NAME.service.extraAnnotations.NAME|string|||
1005-
|gatewayProxies.NAME.service.externalTrafficPolicy|string|||
1006+
|gatewayProxies.NAME.service.externalTrafficPolicy|string||Set the external traffic policy on the provisioned service.|
10061007
|gatewayProxies.NAME.service.name|string||Custom name override for the service resource of the proxy|
10071008
|gatewayProxies.NAME.service.httpsFirst|bool||List HTTPS port before HTTP|
10081009
|gatewayProxies.NAME.service.loadBalancerIP|string||IP address of the load balancer|
@@ -1255,7 +1256,7 @@
12551256
|gatewayProxies.gatewayProxy.service.httpsNodePort|int||HTTPS nodeport for the gateway service if using type NodePort|
12561257
|gatewayProxies.gatewayProxy.service.clusterIP|string||static clusterIP (or `None`) when `gatewayProxies[].gatewayProxy.service.type` is `ClusterIP`|
12571258
|gatewayProxies.gatewayProxy.service.extraAnnotations.NAME|string|||
1258-
|gatewayProxies.gatewayProxy.service.externalTrafficPolicy|string|||
1259+
|gatewayProxies.gatewayProxy.service.externalTrafficPolicy|string||Set the external traffic policy on the provisioned service.|
12591260
|gatewayProxies.gatewayProxy.service.name|string||Custom name override for the service resource of the proxy|
12601261
|gatewayProxies.gatewayProxy.service.httpsFirst|bool||List HTTPS port before HTTP|
12611262
|gatewayProxies.gatewayProxy.service.loadBalancerIP|string||IP address of the load balancer|

install/helm/gloo/crds/gateway.gloo.solo.io_gatewayparameters.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -2075,6 +2075,8 @@ spec:
20752075
properties:
20762076
clusterIP:
20772077
type: string
2078+
externalTrafficPolicy:
2079+
type: string
20782080
extraAnnotations:
20792081
additionalProperties:
20802082
type: string

install/helm/gloo/generate/values.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,10 @@ type ProvisionedDeployment struct {
369369
}
370370

371371
type ProvisionedService struct {
372-
Type *string `json:"type,omitempty" desc:"K8s service type. If set to null, a default of LoadBalancer will be imposed."`
373-
ExtraLabels map[string]string `json:"extraLabels,omitempty" desc:"Extra labels to add to the service."`
374-
ExtraAnnotations map[string]string `json:"extraAnnotations,omitempty" desc:"Extra annotations to add to the service."`
372+
Type *string `json:"type,omitempty" desc:"K8s service type. If set to null, a default of LoadBalancer will be imposed."`
373+
ExtraLabels map[string]string `json:"extraLabels,omitempty" desc:"Extra labels to add to the service."`
374+
ExtraAnnotations map[string]string `json:"extraAnnotations,omitempty" desc:"Extra annotations to add to the service."`
375+
ExternalTrafficPolicy *string `json:"externalTrafficPolicy,omitempty" desc:"Set the external traffic policy on the provisioned service."`
375376
}
376377

377378
type ProvisionedServiceAccount struct {
@@ -717,7 +718,7 @@ type GatewayProxyService struct {
717718
HttpsNodePort *int `json:"httpsNodePort,omitempty" desc:"HTTPS nodeport for the gateway service if using type NodePort"`
718719
ClusterIP *string "json:\"clusterIP,omitempty\" desc:\"static clusterIP (or `None`) when `gatewayProxies[].gatewayProxy.service.type` is `ClusterIP`\""
719720
ExtraAnnotations map[string]string `json:"extraAnnotations,omitempty"`
720-
ExternalTrafficPolicy *string `json:"externalTrafficPolicy,omitempty"`
721+
ExternalTrafficPolicy *string `json:"externalTrafficPolicy,omitempty" desc:"Set the external traffic policy on the provisioned service."`
721722
Name *string `json:"name,omitempty" desc:"Custom name override for the service resource of the proxy"`
722723
HttpsFirst *bool `json:"httpsFirst,omitempty" desc:"List HTTPS port before HTTP"`
723724
LoadBalancerIP *string `json:"loadBalancerIP,omitempty" desc:"IP address of the load balancer"`

install/helm/gloo/templates/43-gatewayparameters.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ spec:
3131
{{- end }}{{/* if $gg.service */}}
3232
service:
3333
type: {{ $serviceType }}
34+
{{- with ($gg.service).externalTrafficPolicy }}
35+
externalTrafficPolicy: {{ . }}
36+
{{- end }}
3437
{{- with ($gg.service).extraLabels }}
3538
extraLabels:
3639
{{- toYaml . | nindent 8 }}

install/test/k8sgateway_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ var _ = Describe("Kubernetes Gateway API integration", func() {
153153
fmt.Sprintf("kubeGateway.gatewayParameters.glooGateway.envoyContainer.resources.limits.cpu=%s", envoyLimits["cpu"].ToUnstructured()),
154154
"kubeGateway.gatewayParameters.glooGateway.proxyDeployment.replicas=5",
155155
"kubeGateway.gatewayParameters.glooGateway.service.type=ClusterIP",
156+
"kubeGateway.gatewayParameters.glooGateway.service.externalTrafficPolicy=Local",
156157
"kubeGateway.gatewayParameters.glooGateway.service.extraLabels.svclabel1=x",
157158
"kubeGateway.gatewayParameters.glooGateway.service.extraAnnotations.svcanno1=y",
158159
"kubeGateway.gatewayParameters.glooGateway.serviceAccount.extraLabels.label1=a",
@@ -246,6 +247,7 @@ var _ = Describe("Kubernetes Gateway API integration", func() {
246247
Expect(gwpKube.GetSdsContainer().GetResources().Limits).To(matchers.ContainMapElements(sdsLimits))
247248

248249
Expect(*gwpKube.GetService().GetType()).To(Equal(corev1.ServiceTypeClusterIP))
250+
Expect(gwpKube.GetService().GetExternalTrafficPolicy()).To(HaveValue(Equal(corev1.ServiceExternalTrafficPolicyLocal)))
249251
Expect(gwpKube.GetService().GetExtraLabels()).To(matchers.ContainMapElements(map[string]string{"svclabel1": "x"}))
250252
Expect(gwpKube.GetService().GetExtraAnnotations()).To(matchers.ContainMapElements(map[string]string{"svcanno1": "y"}))
251253

@@ -282,6 +284,7 @@ var _ = Describe("Kubernetes Gateway API integration", func() {
282284
"kubeGateway.gatewayParameters.glooGateway.envoyContainer.image.pullPolicy=Always",
283285
"kubeGateway.gatewayParameters.glooGateway.proxyDeployment.replicas=5",
284286
"kubeGateway.gatewayParameters.glooGateway.service.type=ClusterIP",
287+
"kubeGateway.gatewayParameters.glooGateway.service.externalTrafficPolicy=Local",
285288
"kubeGateway.gatewayParameters.glooGateway.service.extraLabels.svclabel1=a",
286289
"kubeGateway.gatewayParameters.glooGateway.service.extraAnnotations.svcanno1=b",
287290
"kubeGateway.gatewayParameters.glooGateway.serviceAccount.extraLabels.label1=a",
@@ -324,6 +327,7 @@ var _ = Describe("Kubernetes Gateway API integration", func() {
324327
Expect(*gwpKube.GetSdsContainer().GetBootstrap().GetLogLevel()).To(Equal("debug"))
325328

326329
Expect(*gwpKube.GetService().GetType()).To(Equal(corev1.ServiceTypeClusterIP))
330+
Expect(gwpKube.GetService().GetExternalTrafficPolicy()).To(HaveValue(Equal(corev1.ServiceExternalTrafficPolicyLocal)))
327331
Expect(gwpKube.GetService().GetExtraLabels()).To(matchers.ContainMapElements(map[string]string{"svclabel1": "a"}))
328332
Expect(gwpKube.GetService().GetExtraAnnotations()).To(matchers.ContainMapElements(map[string]string{"svcanno1": "b"}))
329333

pkg/utils/kubeutils/service.go

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package kubeutils
2+
3+
import (
4+
"context"
5+
6+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
7+
8+
corev1 "k8s.io/api/core/v1"
9+
"k8s.io/client-go/kubernetes"
10+
)
11+
12+
// GetService gets the service from the provided name/namespace
13+
func GetService(
14+
ctx context.Context,
15+
kubeClient *kubernetes.Clientset,
16+
serviceName string,
17+
serviceNamespace string,
18+
) (*corev1.Service, error) {
19+
20+
service, err := kubeClient.CoreV1().Services(serviceNamespace).Get(ctx, serviceName, metav1.GetOptions{})
21+
if err != nil {
22+
return nil, err
23+
}
24+
25+
return service, nil
26+
}

projects/gateway2/api/v1alpha1/kube_types.go

+12
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ type Service struct {
9696
//
9797
// +kubebuilder:validation:Optional
9898
ExtraAnnotations map[string]string `json:"extraAnnotations,omitempty"`
99+
100+
// External Traffic Policy on the Service object.
101+
//
102+
// +kubebuilder:validation:Optional
103+
ExternalTrafficPolicy *corev1.ServiceExternalTrafficPolicy `json:"externalTrafficPolicy,omitempty"`
99104
}
100105

101106
func (in *Service) GetType() *corev1.ServiceType {
@@ -126,6 +131,13 @@ func (in *Service) GetExtraAnnotations() map[string]string {
126131
return in.ExtraAnnotations
127132
}
128133

134+
func (in *Service) GetExternalTrafficPolicy() *corev1.ServiceExternalTrafficPolicy {
135+
if in == nil {
136+
return nil
137+
}
138+
return in.ExternalTrafficPolicy
139+
}
140+
129141
type ServiceAccount struct {
130142
// Additional labels to add to the ServiceAccount object metadata.
131143
//

projects/gateway2/api/v1alpha1/zz_generated.deepcopy.go

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

projects/gateway2/deployer/deployer_test.go

+6
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ var _ = Describe("Deployer", func() {
216216
ExtraAnnotations: map[string]string{
217217
"foo": "bar",
218218
},
219+
ExternalTrafficPolicy: ptr.To(corev1.ServiceExternalTrafficPolicyCluster),
219220
},
220221
ServiceAccount: &gw2_v1alpha1.ServiceAccount{
221222
ExtraLabels: map[string]string{
@@ -598,6 +599,7 @@ var _ = Describe("Deployer", func() {
598599
ExtraAnnotations: map[string]string{
599600
"override-foo": "override-bar",
600601
},
602+
ExternalTrafficPolicy: ptr.To(corev1.ServiceExternalTrafficPolicyLocal),
601603
},
602604
ServiceAccount: &gw2_v1alpha1.ServiceAccount{
603605
ExtraLabels: map[string]string{
@@ -665,6 +667,7 @@ var _ = Describe("Deployer", func() {
665667
"foo": "bar",
666668
"override-foo": "override-bar",
667669
},
670+
ExternalTrafficPolicy: ptr.To(corev1.ServiceExternalTrafficPolicyLocal),
668671
},
669672
ServiceAccount: &gw2_v1alpha1.ServiceAccount{
670673
ExtraLabels: map[string]string{
@@ -832,6 +835,7 @@ var _ = Describe("Deployer", func() {
832835
Expect(svc.GetLabels()).To(matchers.ContainMapElements(expectedGwp.Service.ExtraLabels))
833836
Expect(svc.Spec.Type).To(Equal(*expectedGwp.Service.Type))
834837
Expect(svc.Spec.ClusterIP).To(Equal(*expectedGwp.Service.ClusterIP))
838+
Expect(svc.Spec.ExternalTrafficPolicy).To(Equal(*expectedGwp.Service.ExternalTrafficPolicy))
835839

836840
sa := objs.findServiceAccount(defaultNamespace, defaultServiceAccountName)
837841
Expect(sa).ToNot(BeNil())
@@ -948,6 +952,7 @@ var _ = Describe("Deployer", func() {
948952
Expect(svc.GetLabels()).To(matchers.ContainMapElements(expectedGwp.Service.ExtraLabels))
949953
Expect(svc.Spec.Type).To(Equal(*expectedGwp.Service.Type))
950954
Expect(svc.Spec.ClusterIP).To(Equal(*expectedGwp.Service.ClusterIP))
955+
Expect(svc.Spec.ExternalTrafficPolicy).To(Equal(*expectedGwp.Service.ExternalTrafficPolicy))
951956

952957
sa := objs.findServiceAccount(defaultNamespace, defaultServiceAccountName)
953958
Expect(sa).ToNot(BeNil())
@@ -1552,6 +1557,7 @@ func fullyDefinedGatewayParameters(name, namespace string) *gw2_v1alpha1.Gateway
15521557
ExtraLabels: map[string]string{
15531558
"service-label": "foo",
15541559
},
1560+
ExternalTrafficPolicy: ptr.To(corev1.ServiceExternalTrafficPolicyLocal),
15551561
},
15561562
ServiceAccount: &gw2_v1alpha1.ServiceAccount{
15571563
ExtraLabels: map[string]string{

projects/gateway2/deployer/merge.go

+4
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,10 @@ func deepMergeService(dst, src *v1alpha1.Service) *v1alpha1.Service {
443443
dst.ExtraLabels = deepMergeMaps(dst.GetExtraLabels(), src.GetExtraLabels())
444444
dst.ExtraAnnotations = deepMergeMaps(dst.GetExtraAnnotations(), src.GetExtraAnnotations())
445445

446+
if src.GetExternalTrafficPolicy() != nil {
447+
dst.ExternalTrafficPolicy = src.GetExternalTrafficPolicy()
448+
}
449+
446450
return dst
447451
}
448452

projects/gateway2/deployer/merge_test.go

+26
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
. "github.com/onsi/ginkgo/v2"
55
. "github.com/onsi/gomega"
66
gw2_v1alpha1 "github.com/solo-io/gloo/projects/gateway2/api/v1alpha1"
7+
corev1 "k8s.io/api/core/v1"
78
"k8s.io/utils/ptr"
89
)
910

@@ -134,4 +135,29 @@ var _ = Describe("deepMergeGatewayParameters", func() {
134135
Expect(out.Spec.Kube.ServiceAccount.ExtraLabels).To(Equal(expectedMap))
135136
Expect(out.Spec.Kube.ServiceAccount.ExtraAnnotations).To(Equal(expectedMap))
136137
})
138+
139+
It("merges service strings", func() {
140+
141+
dst := &gw2_v1alpha1.GatewayParameters{
142+
Spec: gw2_v1alpha1.GatewayParametersSpec{
143+
Kube: &gw2_v1alpha1.KubernetesProxyConfig{
144+
Service: &gw2_v1alpha1.Service{
145+
ExternalTrafficPolicy: ptr.To(corev1.ServiceExternalTrafficPolicyLocal),
146+
},
147+
},
148+
},
149+
}
150+
src := &gw2_v1alpha1.GatewayParameters{
151+
Spec: gw2_v1alpha1.GatewayParametersSpec{
152+
Kube: &gw2_v1alpha1.KubernetesProxyConfig{
153+
Service: &gw2_v1alpha1.Service{
154+
ExternalTrafficPolicy: ptr.To(corev1.ServiceExternalTrafficPolicyCluster),
155+
},
156+
},
157+
},
158+
}
159+
160+
out := deepMergeGatewayParameters(dst, src)
161+
Expect(out.Spec.Kube.Service.ExternalTrafficPolicy).To(Equal(ptr.To(corev1.ServiceExternalTrafficPolicyCluster)))
162+
})
137163
})

projects/gateway2/deployer/values.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,11 @@ type helmImage struct {
8585
}
8686

8787
type helmService struct {
88-
Type *string `json:"type,omitempty"`
89-
ClusterIP *string `json:"clusterIP,omitempty"`
90-
ExtraAnnotations map[string]string `json:"extraAnnotations,omitempty"`
91-
ExtraLabels map[string]string `json:"extraLabels,omitempty"`
88+
Type *string `json:"type,omitempty"`
89+
ClusterIP *string `json:"clusterIP,omitempty"`
90+
ExtraAnnotations map[string]string `json:"extraAnnotations,omitempty"`
91+
ExtraLabels map[string]string `json:"extraLabels,omitempty"`
92+
ExternalTrafficPolicy *string `json:"externalTrafficPolicy,omitempty"`
9293
}
9394

9495
type helmServiceAccount struct {

projects/gateway2/deployer/values_helpers.go

+9-4
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,16 @@ func getServiceValues(svcConfig *v1alpha1.Service) *helmService {
7777
if svcConfig.GetType() != nil {
7878
svcType = ptr.To(string(*svcConfig.GetType()))
7979
}
80+
var svcExternalTrafficPolicy *string
81+
if svcConfig.GetExternalTrafficPolicy() != nil {
82+
svcExternalTrafficPolicy = ptr.To(string(*svcConfig.GetExternalTrafficPolicy()))
83+
}
8084
return &helmService{
81-
Type: svcType,
82-
ClusterIP: svcConfig.GetClusterIP(),
83-
ExtraAnnotations: svcConfig.GetExtraAnnotations(),
84-
ExtraLabels: svcConfig.GetExtraLabels(),
85+
Type: svcType,
86+
ClusterIP: svcConfig.GetClusterIP(),
87+
ExtraAnnotations: svcConfig.GetExtraAnnotations(),
88+
ExtraLabels: svcConfig.GetExtraLabels(),
89+
ExternalTrafficPolicy: svcExternalTrafficPolicy,
8590
}
8691
}
8792

projects/gateway2/helm/gloo-gateway/templates/gateway/proxy-deployment.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,9 @@ metadata:
380380
{{- end }}
381381
spec:
382382
type: {{ $gateway.service.type }}
383+
{{- if $gateway.service.externalTrafficPolicy }}
384+
externalTrafficPolicy: {{ $gateway.service.externalTrafficPolicy }}
385+
{{- end }}
383386
{{- with $gateway.service.clusterIP }}
384387
clusterIP: {{ . }}
385388
{{- end }}

test/kubernetes/e2e/features/deployer/suite.go

+14
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ func (s *testingSuite) TestConfigureProxiesFromGatewayParameters() {
141141
s.testInstallation.Assertions.Gomega.Expect(svc.GetAnnotations()).To(
142142
gomega.HaveKeyWithValue("svc-anno-key", "svc-anno-val"))
143143

144+
// check that external traffic policy got passwed through from GatewayParameters to the Service
145+
s.testInstallation.Assertions.Gomega.Expect(svc.Spec.ExternalTrafficPolicy).To(
146+
gomega.Equal(corev1.ServiceExternalTrafficPolicyCluster))
147+
144148
// Update the Gateway to use the custom GatewayParameters
145149
gwName := types.NamespacedName{Name: gw.Name, Namespace: gw.Namespace}
146150
err = s.testInstallation.ClusterContext.Client.Get(s.ctx, gwName, gw)
@@ -181,6 +185,16 @@ func (s *testingSuite) TestProvisionResourcesUpdatedWithValidParameters() {
181185
// the GatewayParameters modification should cause the deployer to re-run and update the
182186
// deployment to have 2 replicas
183187
s.testInstallation.Assertions.EventuallyRunningReplicas(s.ctx, proxyDeployment.ObjectMeta, gomega.Equal(2))
188+
189+
// modify the external traffic policy in the GatewayParameters
190+
s.patchGatewayParameters(gwParamsDefault.ObjectMeta, func(parameters *v1alpha1.GatewayParameters) {
191+
parameters.Spec.Kube.Service.ExternalTrafficPolicy = ptr.To(corev1.ServiceExternalTrafficPolicyLocal)
192+
})
193+
194+
// the GatewayParameters modification should cause the deployer to re-run and update the
195+
// service to have ExternalTrafficPolicy = Local
196+
s.testInstallation.Assertions.EventuallyExternalTrafficPolicy(s.ctx, *proxyService, gomega.Equal(corev1.ServiceExternalTrafficPolicyLocal))
197+
184198
}
185199

186200
func (s *testingSuite) TestProvisionResourcesNotUpdatedWithInvalidParameters() {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package assertions
2+
3+
import (
4+
"context"
5+
"time"
6+
7+
. "github.com/onsi/gomega"
8+
"github.com/onsi/gomega/types"
9+
"github.com/solo-io/gloo/pkg/utils/kubeutils"
10+
corev1 "k8s.io/api/core/v1"
11+
)
12+
13+
func (p *Provider) EventuallyExternalTrafficPolicy(ctx context.Context, service corev1.Service, externalTrafficPolicyMatcher types.GomegaMatcher) {
14+
p.Gomega.Eventually(func(innerG Gomega) {
15+
service, err := kubeutils.GetService(ctx, p.clusterContext.Clientset, service.Name, service.Namespace)
16+
innerG.Expect(err).NotTo(HaveOccurred(), "can get service")
17+
innerG.Expect(service.Spec.ExternalTrafficPolicy).To(externalTrafficPolicyMatcher, "externalTrafficPolicy to match")
18+
}).
19+
WithContext(ctx).
20+
WithTimeout(time.Second * 30).
21+
WithPolling(time.Millisecond * 200).
22+
Should(Succeed())
23+
}

0 commit comments

Comments
 (0)