We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1225ec8 commit 4a673bbCopy full SHA for 4a673bb
pkg/dashboard/route.go
@@ -55,7 +55,21 @@ func (r *routeClient) Get(ctx context.Context, name string) (*v1.Route, error) {
55
56
// List is only used in cache warming up. So here just pass through
57
// to APISIX.
58
-func (r *routeClient) List(ctx context.Context, args ...interface{}) ([]*v1.Route, error) {
+func (r *routeClient) List(ctx context.Context, listOptions ...interface{}) ([]*v1.Route, error) {
59
+ var options ListOptions
60
+ if len(listOptions) > 0 {
61
+ options = listOptions[0].(ListOptions)
62
+ }
63
+ if options.From == ListFromCache {
64
+ log.Debugw("try to list routes in cache",
65
+ zap.String("cluster", r.cluster.name),
66
+ zap.String("url", r.url),
67
+ )
68
+ return r.cluster.cache.ListRoutes("label",
69
+ options.KindLabel.Kind,
70
+ options.KindLabel.Namespace,
71
+ options.KindLabel.Name)
72
73
log.Debugw("try to list routes in APISIX",
74
zap.String("cluster", r.cluster.name),
75
zap.String("url", r.url),
test/e2e/framework/ingress.go
@@ -4,6 +4,7 @@ import (
4
"bytes"
5
_ "embed"
6
"text/template"
7
+ "time"
8
9
"github.com/Masterminds/sprig/v3"
10
"github.com/gruntwork-io/terratest/modules/k8s"
@@ -48,4 +49,5 @@ func (f *Framework) DeployIngress(opts IngressDeployOpts) {
48
49
LabelSelector: "control-plane=controller-manager",
50
})
51
f.GomegaT.Expect(err).ToNot(HaveOccurred(), "waiting for controller-manager pod ready")
52
+ f.WaitControllerManagerLog("All cache synced successfully", 0, time.Minute)
53
}
test/e2e/framework/utils.go
@@ -290,6 +290,10 @@ func (f *Framework) WaitMTLSDPLog(keyword string, sinceSeconds int64, timeout ti
290
f.WaitPodsLog("app.kubernetes.io/name=apisix,cp-connection=mtls", keyword, sinceSeconds, timeout)
291
292
293
+func (f *Framework) WaitControllerManagerLog(keyword string, sinceSeconds int64, timeout time.Duration) {
294
+ f.WaitPodsLog("control-plane=controller-manager", keyword, sinceSeconds, timeout)
295
+}
296
+
297
func (f *Framework) WaitDPLog(keyword string, sinceSeconds int64, timeout time.Duration) {
298
f.WaitPodsLog("app.kubernetes.io/name=apisix", keyword, sinceSeconds, timeout)
299
0 commit comments