Skip to content

Commit 7f2c9a9

Browse files
committed
fix: r
Signed-off-by: Ashing Zheng <[email protected]>
1 parent 1488899 commit 7f2c9a9

File tree

3 files changed

+29
-33
lines changed

3 files changed

+29
-33
lines changed

internal/provider/adc/executor.go

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import (
3333

3434
"github.com/api7/gopkg/pkg/log"
3535
"go.uber.org/zap"
36+
"k8s.io/utils/ptr"
3637

3738
adctypes "github.com/apache/apisix-ingress-controller/api/adc"
3839
"github.com/apache/apisix-ingress-controller/internal/types"
@@ -210,12 +211,12 @@ type ADCServerTask struct {
210211

211212
// ADCServerOpts represents the options in ADC Server task
212213
type ADCServerOpts struct {
213-
Backend string `json:"backend"`
214-
Server string `json:"server"`
215-
Token string `json:"token"`
216-
Labels map[string]string `json:"labels,omitempty"`
217-
Types []string `json:"types,omitempty"`
218-
TlsVerify *bool `json:"tls_verify,omitempty"`
214+
Backend string `json:"backend"`
215+
Server string `json:"server"`
216+
Token string `json:"token"`
217+
LabelSelector map[string]string `json:"labelSelector,omitempty"`
218+
IncludeResourceType []string `json:"includeResourceType,omitempty"`
219+
TlsSkipVerify *bool `json:"tlsSkipVerify,omitempty"`
219220
}
220221

221222
// HTTPADCExecutor implements ADCExecutor interface using HTTP calls to ADC Server
@@ -366,12 +367,12 @@ func (e *HTTPADCExecutor) buildHTTPRequest(ctx context.Context, serverAddr, mode
366367
reqBody := ADCServerRequest{
367368
Task: ADCServerTask{
368369
Opts: ADCServerOpts{
369-
Backend: mode,
370-
Server: serverAddr,
371-
Token: config.Token,
372-
Labels: labels,
373-
Types: types,
374-
TlsVerify: &tlsVerify,
370+
Backend: mode,
371+
Server: serverAddr,
372+
Token: config.Token,
373+
LabelSelector: labels,
374+
IncludeResourceType: types,
375+
TlsSkipVerify: ptr.To(!tlsVerify),
375376
},
376377
Config: *resources,
377378
},
@@ -386,8 +387,9 @@ func (e *HTTPADCExecutor) buildHTTPRequest(ctx context.Context, serverAddr, mode
386387
zap.String("url", e.serverURL+"/sync"),
387388
zap.String("server", serverAddr),
388389
zap.String("mode", mode),
389-
zap.Any("labels", labels),
390-
zap.Strings("types", types),
390+
zap.Any("labelSelector", labels),
391+
zap.Strings("includeResourceType", types),
392+
zap.Bool("tlsSkipVerify", !tlsVerify),
391393
)
392394

393395
// Create HTTP request

test/e2e/crds/v2/basic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ var _ = Describe("APISIX Standalone Basic Tests", Label("apisix.apache.org", "v2
9696
})
9797

9898
Context("IngressClass Annotations", func() {
99-
It("Basic tests", func() {
99+
FIt("Basic tests", func() {
100100
const gatewayProxyYaml = `
101101
apiVersion: apisix.apache.org/v1alpha1
102102
kind: GatewayProxy

test/e2e/framework/manifests/ingress.yaml

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -435,32 +435,26 @@ spec:
435435
- "server"
436436
- "--listen"
437437
- "http://127.0.0.1:3000"
438+
- "--listen-status"
439+
- "3001"
438440
ports:
439441
- name: http
440442
containerPort: 3000
441443
protocol: TCP
444+
- name: http-status
445+
containerPort: 3001
446+
protocol: TCP
442447
livenessProbe:
443-
exec:
444-
command:
445-
- node
446-
- -e
447-
- >
448-
const s=require('net')
449-
.connect({host:"127.0.0.1",port:3000},
450-
()=>{s.end();process.exit(0);});
451-
s.on("error",()=>process.exit(1));
448+
httpGet:
449+
path: /healthz/ready
450+
port: 3001
452451
initialDelaySeconds: 10
453452
periodSeconds: 10
453+
timeoutSeconds: 10
454454
readinessProbe:
455-
exec:
456-
command:
457-
- node
458-
- -e
459-
- >
460-
const s=require('net')
461-
.connect({host:"127.0.0.1",port:3000},
462-
()=>{s.end();process.exit(0);});
463-
s.on("error",()=>process.exit(1));
455+
httpGet:
456+
path: /healthz/ready
457+
port: 3001
464458
initialDelaySeconds: 5
465459
periodSeconds: 5
466460
securityContext:

0 commit comments

Comments
 (0)