Skip to content

Commit 7af653c

Browse files
authored
fix upstream status flicker and constant updates (#10384)
When only Kube GW proxies are present, we still rely on the edge translator_syncer for extension syncing. The edge translator will mark Upstreams & UpstreamGroups as Accepted then perform xds translation where status may be changed to e.g. Rejected if there is an error. However, in the case where there are no edge proxies, translation doesn't actually occur, so any actual errors on the Upstream are never encountered, thus the status is never set to Rejected. We end up in a scenario where the Kube GW syncer (correctly) reports Rejected status while the Edge syncer reports Accepted and they will fight each other indefinitely. This changes the edge translator_syncer to no longer mark Upstream[Group]s as Accepted unless it will also perform translation. track obj status in krt collections the status reporter compares the desired status with the existing status in the solo-kit object to determine if it should actually UPDATE the resource. the current proxy_syncer will do a once per second status sync and relies on this status comparison to be functional to prevent endless object UPDATEs. this commit fixes the solo-kit objects (really wrappers) in the krt collections to contain the status so an accurate comparison can take place.
1 parent aac1d58 commit 7af653c

File tree

21 files changed

+181
-66
lines changed

21 files changed

+181
-66
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
changelog:
2+
- type: NON_USER_FACING
3+
description: >-
4+
Fix flicker on Upstream status when kube gw syncer rejects a resource and no edge proxies are present
5+
issueLink: https://github.com/solo-io/solo-projects/issues/7243
6+
resolvesIssue: true
7+
- type: NON_USER_FACING
8+
description: >-
9+
Fix missing status on krt objects resulting in continuous status updates (and webhook hits)
10+
issueLink: https://github.com/solo-io/solo-projects/issues/7257
11+
resolvesIssue: true
12+
- type: BREAKING_CHANGE
13+
description: >-
14+
Upstreams and UpstreamGroups no longer get Accepted status by default. If they have not gone through translation they will have an empty status field.
15+
issueLink: https://github.com/solo-io/gloo/issues/10401
16+
resolvesIssue: true

projects/gateway2/proxy_syncer/proxy_syncer.go

+2
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ func (s *ProxySyncer) Init(ctx context.Context, dbg *krt.DebugHandler) error {
371371
Namespace: u.GetNamespace(),
372372
}
373373
glooUs.SetMetadata(&md)
374+
glooUs.NamespacedStatuses = &u.Status
374375
us := &krtcollections.UpstreamWrapper{Inner: glooUs}
375376
return us
376377
}, krt.WithName("GlooUpstreams"), withDebug)
@@ -715,6 +716,7 @@ func (s *ProxySyncer) translateProxy(
715716
Namespace: kac.GetNamespace(),
716717
}
717718
gac.SetMetadata(&md)
719+
gac.NamespacedStatuses = &kac.Status
718720
acfgs = append(acfgs, gac)
719721
}
720722
latestSnap.AuthConfigs = acfgs

projects/gateway2/setup/ggv2setup.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,10 @@ func (g *genericStatusReporter) WriteReports(ctx context.Context, resourceErrs r
227227
resourceStatus := g.statusClient.GetStatus(resource)
228228

229229
if status.Equal(resourceStatus) {
230-
logger.Debugf("skipping report for %v as it has not changed", resource.GetMetadata().Ref())
230+
// TODO: find a way to log this but it is noisy currently due to once per second status sync
231+
// see: projects/gateway2/proxy_syncer/kube_gw_translator_syncer.go#syncStatus(...)
232+
// and its call site in projects/gateway2/proxy_syncer/proxy_syncer.go
233+
// logger.Debugf("skipping report for %v as it has not changed", resource.GetMetadata().Ref())
231234
continue
232235
}
233236

projects/gateway2/translator/plugins/routeoptions/route_options_plugin.go

+1
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ func (p *plugin) ApplyStatusPlugin(ctx context.Context, statusCtx *plugins.Statu
178178
roObj.Spec.GetMetadata().Name = roObj.GetName()
179179
roObj.Spec.GetMetadata().Namespace = roObj.GetNamespace()
180180
roObjSk := &roObj.Spec
181+
roObjSk.NamespacedStatuses = &roObj.Status
181182

182183
// mark this object to be processed
183184
routeOptionReport.Accept(roObjSk)

projects/gateway2/translator/plugins/virtualhostoptions/virtualhost_options_plugin.go

+1
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ func (p *plugin) ApplyStatusPlugin(ctx context.Context, statusCtx *plugins.Statu
241241
vhOptObj.Spec.GetMetadata().Name = vhOptObj.GetName()
242242
vhOptObj.Spec.GetMetadata().Namespace = vhOptObj.GetNamespace()
243243
vhOptObjSk := &vhOptObj.Spec
244+
vhOptObjSk.NamespacedStatuses = &vhOptObj.Status
244245

245246
// mark this object to be processed
246247
virtualHostOptionReport.Accept(vhOptObjSk)

projects/gloo/pkg/syncer/envoy_translator_syncer.go

+7-2
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,17 @@ func (s *translatorSyncer) syncEnvoy(ctx context.Context, snap *v1snap.ApiSnapsh
142142
}
143143
}
144144

145-
allReports.Accept(snap.Upstreams.AsInputResources()...)
146-
allReports.Accept(snap.UpstreamGroups.AsInputResources()...)
147145
// Only mark non-kube gateways as accepted
148146
// Regardless, kube gw proxies are filtered out of these reports before reporting in translator_syncer.go
149147
allReports.Accept(nonKubeProxies.AsInputResources()...)
150148

149+
// mark Upstream[Group]s as Accepted initially, but only if we have at least 1 edge proxy;
150+
// otherwise, we won't actually translate them, and so if there is an error, we will incorrectly report Accepted
151+
if len(nonKubeProxies) > 0 {
152+
allReports.Accept(snap.Upstreams.AsInputResources()...)
153+
allReports.Accept(snap.UpstreamGroups.AsInputResources()...)
154+
}
155+
151156
// sync non-kube gw proxies
152157
for _, proxy := range nonKubeProxies {
153158
proxyCtx := ctx

test/e2e/aws_test.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,9 @@ var _ = Describe("AWS Lambda", func() {
221221
Expect(err).NotTo(HaveOccurred())
222222

223223
// wait for the upstream to be created
224-
helpers.EventuallyResourceAccepted(func() (resources.InputResource, error) {
224+
// Upstreams no longer report status if they have not been translated at all to avoid conflicting with
225+
// other syncers that have translated them, so we can only detect that the objects exist here
226+
helpers.EventuallyResourceExists(func() (resources.Resource, error) {
225227
return testClients.UpstreamClient.Read(upstream.Metadata.Namespace, upstream.Metadata.Name, clients.ReadOpts{})
226228
}, "30s", "1s")
227229
}

test/helpers/input_resources.go test/helpers/resources.go

+13
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@ const (
2121
defaultEventuallyPollingInterval = 1 * time.Second
2222
)
2323

24+
type ResourceGetter func() (resources.Resource, error)
25+
26+
func EventuallyResourceExists(getter ResourceGetter, intervals ...interface{}) {
27+
timeoutInterval, pollingInterval := getTimeoutAndPollingIntervalsOrDefault(intervals...)
28+
gomega.Eventually(func() (bool, error) {
29+
_, err := getter()
30+
if err != nil {
31+
return false, err
32+
}
33+
return true, nil
34+
}, timeoutInterval, pollingInterval).Should(gomega.BeTrue())
35+
}
36+
2437
type InputResourceGetter func() (resources.InputResource, error)
2538
type InputResourceListGetter func() (resources.InputResourceList, error)
2639

test/kube2e/gateway/gateway_test.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,9 @@ var _ = Describe("Kube2e: gateway", func() {
12901290

12911291
upstreamName = kubernetesplugin.UpstreamName(testHelper.InstallNamespace, service.Name, 5678)
12921292
// wait for upstream to get created by discovery
1293-
helpers.EventuallyResourceAccepted(func() (resources.InputResource, error) {
1293+
// Upstreams no longer report status if they have not been translated at all to avoid conflicting with
1294+
// other syncers that have translated them, so we can only detect that the objects exist here
1295+
helpers.EventuallyResourceExists(func() (resources.Resource, error) {
12941296
return resourceClientset.UpstreamClient().Read(testHelper.InstallNamespace, upstreamName, clients.ReadOpts{Ctx: ctx})
12951297
})
12961298
// add subset spec to upstream

test/kube2e/gloo/happypath_test.go

+7-3
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ var _ = Describe("Happy path", func() {
157157
err := envoyInstance.RunWithRole(role, testClients.GlooPort)
158158
Expect(err).NotTo(HaveOccurred())
159159

160-
testhelpers.EventuallyResourceAccepted(func() (resources.InputResource, error) {
160+
// Upstreams no longer report status if they have not been translated at all to avoid conflicting with
161+
// other syncers that have translated them, so we can only detect that the objects exist here
162+
testhelpers.EventuallyResourceExists(func() (resources.Resource, error) {
161163
return getUpstream()
162164
}, "20s", ".5s")
163165
})
@@ -239,9 +241,11 @@ var _ = Describe("Happy path", func() {
239241
})
240242

241243
It("watch all namespaces", func() {
242-
testhelpers.EventuallyResourceAccepted(func() (resources.InputResource, error) {
244+
// Upstreams no longer report status if they have not been translated at all to avoid conflicting with
245+
// other syncers that have translated them, so we can only detect that the objects exist here
246+
testhelpers.EventuallyResourceExists(func() (resources.Resource, error) {
243247
return getUpstream()
244-
})
248+
}, "20s", ".5s")
245249

246250
up, err := getUpstream()
247251
Expect(err).NotTo(HaveOccurred())

test/kubernetes/e2e/features/basicrouting/edge_suite.go

+11-4
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,21 @@ func (s *edgeBasicRoutingSuite) TestBasicVirtualServiceRouting() {
7171
})
7272

7373
// Upstream is only rejected when the upstream plugin is run when a valid cluster is present
74+
// Upstreams no longer report status if they have not been translated at all to avoid conflicting with
75+
// other syncers that have translated them, so we can only detect that the objects exist here
7476
err = s.testInstallation.Actions.Kubectl().ApplyFile(s.ctx, ossvalidation.ExampleUpstream, "-n", s.testInstallation.Metadata.InstallNamespace)
7577
s.Assert().NoError(err, "can apply valid upstream")
76-
s.testInstallation.Assertions.EventuallyResourceStatusMatchesState(
77-
func() (resources.InputResource, error) {
78+
s.testInstallation.Assertions.EventuallyResourceExists(
79+
func() (resources.Resource, error) {
7880
return s.testInstallation.ResourceClients.UpstreamClient().Read(s.testInstallation.Metadata.InstallNamespace, ossvalidation.ExampleUpstreamName, clients.ReadOpts{Ctx: s.ctx})
7981
},
80-
core.Status_Accepted,
81-
defaults.GlooReporter,
82+
)
83+
// we need to make sure Gloo has had a chance to process it
84+
s.testInstallation.Assertions.ConsistentlyResourceExists(
85+
s.ctx,
86+
func() (resources.Resource, error) {
87+
return s.testInstallation.ResourceClients.UpstreamClient().Read(s.testInstallation.Metadata.InstallNamespace, "nginx-upstream", clients.ReadOpts{Ctx: s.ctx})
88+
},
8289
)
8390
err = s.testInstallation.Actions.Kubectl().ApplyFile(s.ctx, ossvalidation.ExampleVS, "-n", s.testInstallation.Metadata.InstallNamespace)
8491
s.Assert().NoError(err, "can apply valid virtual service")

test/kubernetes/e2e/features/discovery_watchlabels/discovery_watchlabels_suite.go

+8-10
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@ import (
1010
"github.com/solo-io/gloo/projects/gloo/pkg/plugins/kubernetes"
1111
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1212

13-
"github.com/solo-io/gloo/projects/gloo/pkg/defaults"
1413
"github.com/solo-io/gloo/test/kubernetes/e2e"
1514
"github.com/solo-io/solo-kit/pkg/api/v1/clients"
1615
"github.com/solo-io/solo-kit/pkg/api/v1/resources"
17-
"github.com/solo-io/solo-kit/pkg/api/v1/resources/core"
1816
"github.com/stretchr/testify/suite"
1917
)
2018

@@ -64,13 +62,13 @@ func (s *discoveryWatchlabelsSuite) TestDiscoverUpstreamMatchingWatchLabels() {
6462
s.Assert().NoError(err, "can apply service")
6563

6664
// eventually an Upstream should be created for the Service with matching labels
65+
// Upstreams no longer report status if they have not been translated at all to avoid conflicting with
66+
// other syncers that have translated them, so we can only detect that the objects exist here
6767
labeledUsName := kubernetes.UpstreamName(s.testInstallation.Metadata.InstallNamespace, "example-svc", 8000)
68-
s.testInstallation.Assertions.EventuallyResourceStatusMatchesState(
69-
func() (resources.InputResource, error) {
68+
s.testInstallation.Assertions.EventuallyResourceExists(
69+
func() (resources.Resource, error) {
7070
return s.testInstallation.ResourceClients.UpstreamClient().Read(s.testInstallation.Metadata.InstallNamespace, labeledUsName, clients.ReadOpts{Ctx: s.ctx})
7171
},
72-
core.Status_Accepted,
73-
defaults.GlooReporter,
7472
)
7573

7674
// the Upstream should have DiscoveryMetadata labels matching the parent Service
@@ -129,13 +127,13 @@ func (s *discoveryWatchlabelsSuite) TestDiscoverySpecPreserved() {
129127
s.Assert().NoError(err, "can apply service")
130128

131129
// eventually an Upstream should be created for the Service with matching labels
130+
// Upstreams no longer report status if they have not been translated at all to avoid conflicting with
131+
// other syncers that have translated them, so we can only detect that the objects exist here
132132
labeledUsName := kubernetes.UpstreamName(s.testInstallation.Metadata.InstallNamespace, "example-svc", 8000)
133-
s.testInstallation.Assertions.EventuallyResourceStatusMatchesState(
134-
func() (resources.InputResource, error) {
133+
s.testInstallation.Assertions.EventuallyResourceExists(
134+
func() (resources.Resource, error) {
135135
return s.testInstallation.ResourceClients.UpstreamClient().Read(s.testInstallation.Metadata.InstallNamespace, labeledUsName, clients.ReadOpts{Ctx: s.ctx})
136136
},
137-
core.Status_Accepted,
138-
defaults.GlooReporter,
139137
)
140138

141139
// the Upstream should have DiscoveryMetadata labels matching the parent Service

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ func (s *testingSuite) BeforeTest(string, string) {
101101
err = s.testInstallation.Actions.Kubectl().ApplyFile(s.ctx, tracingConfigManifest)
102102
s.NoError(err, "can apply gloo tracing resources")
103103
// accept the upstream
104-
s.testInstallation.Assertions.EventuallyResourceStatusMatchesState(
105-
func() (resources.InputResource, error) {
104+
// Upstreams no longer report status if they have not been translated at all to avoid conflicting with
105+
// other syncers that have translated them, so we can only detect that the objects exist here
106+
s.testInstallation.Assertions.EventuallyResourceExists(
107+
func() (resources.Resource, error) {
106108
return s.testInstallation.ResourceClients.UpstreamClient().Read(
107109
otelcolUpstream.Namespace, otelcolUpstream.Name, clients.ReadOpts{Ctx: s.ctx})
108110
},
109-
core.Status_Accepted,
110-
gloo_defaults.GlooReporter,
111111
)
112112
// accept the virtual service
113113
s.testInstallation.Assertions.EventuallyResourceStatusMatchesState(

test/kubernetes/e2e/features/validation/full_envoy_validation/suite.go

+11-6
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@ package full_envoy_validation
33
import (
44
"context"
55

6-
gloo_defaults "github.com/solo-io/gloo/projects/gloo/pkg/defaults"
76
"github.com/solo-io/gloo/test/kubernetes/e2e"
87
testdefaults "github.com/solo-io/gloo/test/kubernetes/e2e/defaults"
98
"github.com/solo-io/gloo/test/kubernetes/e2e/features/validation"
109
"github.com/solo-io/solo-kit/pkg/api/v1/clients"
1110
"github.com/solo-io/solo-kit/pkg/api/v1/resources"
12-
"github.com/solo-io/solo-kit/pkg/api/v1/resources/core"
1311
"github.com/stretchr/testify/suite"
1412
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1513
)
@@ -54,14 +52,21 @@ func (s *testingSuite) TestRejectInvalidTransformation() {
5452

5553
err = s.testInstallation.Actions.Kubectl().ApplyFile(s.ctx, validation.ExampleUpstream, "-n", s.testInstallation.Metadata.InstallNamespace)
5654
s.Assert().NoError(err)
57-
s.testInstallation.Assertions.EventuallyResourceStatusMatchesState(
58-
func() (resources.InputResource, error) {
55+
// Upstreams no longer report status if they have not been translated at all to avoid conflicting with
56+
// other syncers that have translated them, so we can only detect that the objects exist here
57+
s.testInstallation.Assertions.EventuallyResourceExists(
58+
func() (resources.Resource, error) {
5959
return s.testInstallation.ResourceClients.UpstreamClient().Read(s.testInstallation.Metadata.InstallNamespace, "nginx-upstream", clients.ReadOpts{Ctx: s.ctx})
6060
},
61-
core.Status_Accepted,
62-
gloo_defaults.GlooReporter,
6361
)
6462

63+
// we need to make sure Gloo has had a chance to process it
64+
s.testInstallation.Assertions.ConsistentlyResourceExists(
65+
s.ctx,
66+
func() (resources.Resource, error) {
67+
return s.testInstallation.ResourceClients.UpstreamClient().Read(s.testInstallation.Metadata.InstallNamespace, "nginx-upstream", clients.ReadOpts{Ctx: s.ctx})
68+
},
69+
)
6570
s.T().Cleanup(func() {
6671
err := s.testInstallation.Actions.Kubectl().DeleteFileSafe(s.ctx, validation.VSTransformationHeaderText, "-n", s.testInstallation.Metadata.InstallNamespace)
6772
s.Assert().NoError(err)

test/kubernetes/e2e/features/validation/split_webhook/suite.go

+14-7
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@ import (
88
"time"
99

1010
"github.com/onsi/gomega"
11-
gloo_defaults "github.com/solo-io/gloo/projects/gloo/pkg/defaults"
1211
"github.com/solo-io/gloo/test/kubernetes/e2e"
1312
"github.com/solo-io/gloo/test/kubernetes/e2e/features/validation"
1413
"github.com/solo-io/gloo/test/kubernetes/testutils/helper"
1514
"github.com/solo-io/solo-kit/pkg/api/v1/clients"
1615
"github.com/solo-io/solo-kit/pkg/api/v1/resources"
17-
"github.com/solo-io/solo-kit/pkg/api/v1/resources/core"
1816
"sigs.k8s.io/controller-runtime/pkg/client"
1917

2018
"github.com/stretchr/testify/suite"
@@ -196,12 +194,21 @@ var (
196194
}
197195

198196
validateUpstreamCreated = func(s *testingSuite) {
199-
s.testInstallation.Assertions.EventuallyResourceStatusMatchesState(
200-
func() (resources.InputResource, error) {
201-
return s.testInstallation.ResourceClients.UpstreamClient().Read(s.testInstallation.Metadata.InstallNamespace, "json-upstream", clients.ReadOpts{Ctx: s.ctx})
197+
// Upstreams no longer report status if they have not been translated at all to avoid conflicting with
198+
// other syncers that have translated them, so we can only detect that the objects exist here
199+
s.testInstallation.Assertions.EventuallyResourceExists(
200+
func() (resources.Resource, error) {
201+
uc := s.testInstallation.ResourceClients.UpstreamClient()
202+
return uc.Read(s.testInstallation.Metadata.InstallNamespace, validation.SplitWebhookBasicUpstreamName, clients.ReadOpts{Ctx: s.ctx})
203+
},
204+
)
205+
// we need to make sure Gloo has had a chance to process it
206+
s.testInstallation.Assertions.ConsistentlyResourceExists(
207+
s.ctx,
208+
func() (resources.Resource, error) {
209+
uc := s.testInstallation.ResourceClients.UpstreamClient()
210+
return uc.Read(s.testInstallation.Metadata.InstallNamespace, validation.SplitWebhookBasicUpstreamName, clients.ReadOpts{Ctx: s.ctx})
202211
},
203-
core.Status_Accepted,
204-
gloo_defaults.GlooReporter,
205212
)
206213
}
207214

test/kubernetes/e2e/features/validation/types.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ import (
1010
)
1111

1212
const (
13-
ExampleVsName = "example-vs"
14-
ExampleUpstreamName = "nginx-upstream"
13+
ExampleVsName = "example-vs"
14+
ExampleUpstreamName = "nginx-upstream"
15+
SplitWebhookBasicUpstreamName = "json-upstream"
1516

1617
ValidVsName = "i-am-valid"
1718
InvalidVsName = "i-am-invalid"

test/kubernetes/e2e/features/validation/validation_allow_warnings/suite.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,10 @@ func (s *testingSuite) TestInvalidUpstreamMissingPort() {
115115
// Upstream is only rejected when the upstream plugin is run when a valid cluster is present
116116
err = s.testInstallation.Actions.Kubectl().ApplyFile(s.ctx, validation.ExampleUpstream, "-n", s.testInstallation.Metadata.InstallNamespace)
117117
s.Assert().NoError(err, "can apply valid upstream")
118-
s.testInstallation.Assertions.EventuallyResourceStatusMatchesState(
119-
func() (resources.InputResource, error) {
118+
s.testInstallation.Assertions.EventuallyResourceExists(
119+
func() (resources.Resource, error) {
120120
return s.testInstallation.ResourceClients.UpstreamClient().Read(s.testInstallation.Metadata.InstallNamespace, validation.ExampleUpstreamName, clients.ReadOpts{Ctx: s.ctx})
121121
},
122-
core.Status_Accepted,
123-
gloo_defaults.GlooReporter,
124122
)
125123
err = s.testInstallation.Actions.Kubectl().ApplyFile(s.ctx, validation.ExampleVS, "-n", s.testInstallation.Metadata.InstallNamespace)
126124
s.Assert().NoError(err, "can apply valid virtual service")

test/kubernetes/e2e/features/validation/validation_always_accept/suite.go

+6-9
Original file line numberDiff line numberDiff line change
@@ -161,15 +161,14 @@ func (s *testingSuite) TestVirtualServiceWithSecretDeletion() {
161161
err = s.testInstallation.Actions.Kubectl().ApplyFile(s.ctx, validation.UnusedSecret, "-n", s.testInstallation.Metadata.InstallNamespace)
162162
s.Assert().NoError(err)
163163

164-
// Upstream should be accepted
164+
// Upstreams no longer report status if they have not been translated at all to avoid conflicting with
165+
// other syncers that have translated them, so we can only detect that the objects exist here
165166
err = s.testInstallation.Actions.Kubectl().ApplyFile(s.ctx, validation.ExampleUpstream, "-n", s.testInstallation.Metadata.InstallNamespace)
166167
s.Assert().NoError(err)
167-
s.testInstallation.Assertions.EventuallyResourceStatusMatchesState(
168-
func() (resources.InputResource, error) {
168+
s.testInstallation.Assertions.EventuallyResourceExists(
169+
func() (resources.Resource, error) {
169170
return s.testInstallation.ResourceClients.UpstreamClient().Read(s.testInstallation.Metadata.InstallNamespace, validation.ExampleUpstreamName, clients.ReadOpts{Ctx: s.ctx})
170171
},
171-
core.Status_Accepted,
172-
gloo_defaults.GlooReporter,
173172
)
174173
// Apply VS with secret after Upstream and Secret exist
175174
err = s.testInstallation.Actions.Kubectl().Apply(s.ctx, []byte(substitutedSecretVS))
@@ -246,12 +245,10 @@ func (s *testingSuite) TestPersistInvalidVirtualService() {
246245
// First apply Upstream
247246
err = s.testInstallation.Actions.Kubectl().ApplyFile(s.ctx, validation.ExampleUpstream, "-n", s.testInstallation.Metadata.InstallNamespace)
248247
s.Assert().NoError(err, "can apply "+validation.ExampleUpstream)
249-
s.testInstallation.Assertions.EventuallyResourceStatusMatchesState(
250-
func() (resources.InputResource, error) {
248+
s.testInstallation.Assertions.EventuallyResourceExists(
249+
func() (resources.Resource, error) {
251250
return s.testInstallation.ResourceClients.UpstreamClient().Read(s.testInstallation.Metadata.InstallNamespace, validation.ExampleUpstreamName, clients.ReadOpts{Ctx: s.ctx})
252251
},
253-
core.Status_Accepted,
254-
gloo_defaults.GlooReporter,
255252
)
256253

257254
// Then apply VirtualService

0 commit comments

Comments
 (0)