Skip to content

Commit ca9ad51

Browse files
author
Foo Bar
committed
fix: the sync_period of the provider should not be 0s
1 parent 0db882d commit ca9ad51

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

Makefile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ CRD_REF_DOCS_VERSION ?= v0.1.0
3838
CRD_REF_DOCS ?= $(LOCALBIN)/crd-ref-docs
3939
CRD_DOCS_CONFIG ?= docs/crd/config.yaml
4040
CRD_DOCS_OUTPUT ?= docs/crd/api.md
41-
42-
export KUBECONFIG = /tmp/$(KIND_NAME).kubeconfig
43-
41+
#
4442
# go
4543
VERSYM="github.com/apache/apisix-ingress-controller/internal/version._buildVersion"
4644
GITSHASYM="github.com/apache/apisix-ingress-controller/internal/version._buildGitRevision"
@@ -126,7 +124,6 @@ kind-e2e-test: kind-up build-image kind-load-images e2e-test
126124
# Utilize Kind or modify the e2e tests to load the image locally, enabling compatibility with other vendors.
127125
.PHONY: e2e-test
128126
e2e-test:
129-
@kind get kubeconfig --name $(KIND_NAME) > $$KUBECONFIG
130127
go test $(TEST_DIR) -test.timeout=$(TEST_TIMEOUT) -v -ginkgo.v -ginkgo.focus="$(TEST_FOCUS)" -ginkgo.label-filter="$(TEST_LABEL)"
131128

132129
.PHONY: conformance-test
@@ -135,7 +132,6 @@ conformance-test:
135132

136133
.PHONY: conformance-test-standalone
137134
conformance-test-standalone:
138-
@kind get kubeconfig --name $(KIND_NAME) > $$KUBECONFIG
139135
go test -v ./test/conformance/apisix -tags=conformance -timeout 60m
140136

141137
.PHONY: lint
@@ -151,7 +147,6 @@ kind-up:
151147
@kind get clusters 2>&1 | grep -v $(KIND_NAME) \
152148
&& kind create cluster --name $(KIND_NAME) \
153149
|| echo "kind cluster already exists"
154-
@kind get kubeconfig --name $(KIND_NAME) > $$KUBECONFIG
155150
kubectl wait --for=condition=Ready nodes --all
156151

157152
.PHONY: kind-down
@@ -432,6 +427,7 @@ release-src:
432427
--exclude .DS_Store \
433428
--exclude docs \
434429
--exclude examples \
430+
--exclude scripts \
435431
--exclude samples \
436432
--exclude test \
437433
--exclude release \

config/samples/config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ exec_adc_timeout: 15s # The timeout for the ADC to execute.
3434
provider:
3535
type: "apisix"
3636

37-
sync_period: 0s
37+
sync_period: 1s
3838
# The period between two consecutive syncs.
39-
# The default value is 0 seconds, which means the controller will not sync.
39+
# The default value is 1 seconds, which means the controller will not sync.
4040
# If you want to enable the sync, set it to a positive value.
4141
init_sync_delay: 20m # The initial delay before the first sync, only used when the controller is started.
4242
# The default value is 20 minutes.

internal/controller/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func NewDefaultConfig() *Config {
5252
ExecADCTimeout: types.TimeDuration{Duration: 15 * time.Second},
5353
ProviderConfig: ProviderConfig{
5454
Type: ProviderTypeAPISIX,
55-
SyncPeriod: types.TimeDuration{Duration: 0},
55+
SyncPeriod: types.TimeDuration{Duration: 1 * time.Second},
5656
InitSyncDelay: types.TimeDuration{Duration: 20 * time.Minute},
5757
},
5858
}

0 commit comments

Comments
 (0)