Skip to content

Commit 960e81e

Browse files
committed
fix: r
Signed-off-by: Ashing Zheng <[email protected]>
1 parent 291700e commit 960e81e

File tree

7 files changed

+24
-9
lines changed

7 files changed

+24
-9
lines changed

.github/workflows/apisix-e2e-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
- apisix.apache.org
4343
- networking.k8s.io
4444
fail-fast: false
45-
runs-on: buildjet-4vcpu-ubuntu-2204
45+
runs-on: buildjet-2vcpu-ubuntu-2204
4646
steps:
4747
- name: Checkout
4848
uses: actions/checkout@v4
@@ -56,7 +56,7 @@ jobs:
5656

5757
- name: Install kind
5858
run: |
59-
go install sigs.k8s.io/kind@v0.24.0
59+
go install sigs.k8s.io/kind@v0.23.0
6060
6161
- name: Login to Registry
6262
uses: docker/login-action@v1

internal/controller/utils.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1567,9 +1567,6 @@ func resolveServiceEndpoints(
15671567
return fmt.Errorf("failed to list endpoint slices: %v", err)
15681568
}
15691569

1570-
for _, ep := range endpoints.Items {
1571-
log.Debugw("gatewayproxy endpoint", zap.String("service", serviceNN.String()), zap.Any("endpoint", ep.Endpoints))
1572-
}
15731570
if len(subsetLabels) == 0 {
15741571
tctx.EndpointSlices[serviceNN] = endpoints.Items
15751572
} else {

internal/provider/adc/adc.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,12 @@ func New(updater status.Updater, readier readiness.ReadinessManager, opts ...Opt
115115
o := Options{}
116116
o.ApplyOptions(opts)
117117

118-
executor := NewHTTPADCExecutor("http://127.0.0.1:3000", o.SyncTimeout)
119-
log.Infow("using HTTP ADC Executor", zap.String("server_url", "http://127.0.0.1:3000"))
118+
serverURL := os.Getenv("ADC_SERVER_URL")
119+
if serverURL == "" {
120+
serverURL = "http://127.0.0.1:3000"
121+
}
122+
executor := NewHTTPADCExecutor(serverURL, o.SyncTimeout)
123+
log.Infow("using HTTP ADC Executor", zap.String("server_url", serverURL))
120124

121125
return &adcClient{
122126
Options: o,

test/e2e/crds/v2/status.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ spec:
200200
),
201201
)
202202

203+
time.Sleep(60 * time.Second)
204+
203205
By("update service to original spec")
204206
serviceYaml, err = s.GetOutputFromString("svc", framework.ProviderType, "-o", "yaml")
205207
Expect(err).NotTo(HaveOccurred(), "getting service yaml")

test/e2e/gatewayapi/status.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ spec:
156156
),
157157
)
158158

159+
time.Sleep(60 * time.Second)
160+
159161
By("update service to original spec")
160162
serviceYaml, err = s.GetOutputFromString("svc", framework.ProviderType, "-o", "yaml")
161163
Expect(err).NotTo(HaveOccurred(), "getting service yaml")

test/e2e/scaffold/apisix_deployer.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,20 +257,28 @@ func (s *APISIXDeployer) ScaleDataplane(replicas int) {
257257
}
258258

259259
func (s *APISIXDeployer) DeployIngress() {
260+
syncPeriod := 1 * time.Hour
261+
if s.opts.SyncPeriod != 0 {
262+
syncPeriod = s.opts.SyncPeriod
263+
}
260264
s.Framework.DeployIngress(framework.IngressDeployOpts{
261265
ControllerName: s.opts.ControllerName,
262266
ProviderType: framework.ProviderType,
263-
ProviderSyncPeriod: 1 * time.Hour,
267+
ProviderSyncPeriod: syncPeriod,
264268
Namespace: s.namespace,
265269
Replicas: 1,
266270
})
267271
}
268272

269273
func (s *APISIXDeployer) ScaleIngress(replicas int) {
274+
syncPeriod := 1 * time.Hour
275+
if s.opts.SyncPeriod != 0 {
276+
syncPeriod = s.opts.SyncPeriod
277+
}
270278
s.Framework.DeployIngress(framework.IngressDeployOpts{
271279
ControllerName: s.opts.ControllerName,
272280
ProviderType: framework.ProviderType,
273-
ProviderSyncPeriod: 1 * time.Hour,
281+
ProviderSyncPeriod: syncPeriod,
274282
Namespace: s.namespace,
275283
Replicas: replicas,
276284
})

test/e2e/scaffold/scaffold.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"net/url"
2626
"os"
2727
"strings"
28+
"time"
2829

2930
"github.com/gavv/httpexpect/v2"
3031
"github.com/gruntwork-io/terratest/modules/k8s"
@@ -46,6 +47,7 @@ type Options struct {
4647
Kubeconfig string
4748
APISIXAdminAPIKey string
4849
ControllerName string
50+
SyncPeriod time.Duration
4951

5052
NamespaceSelectorLabel map[string][]string
5153
DisableNamespaceLabel bool

0 commit comments

Comments
 (0)