Skip to content

Commit 852d253

Browse files
committed
fix gateway handler other resource
1 parent 71cddb3 commit 852d253

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

internal/controller/gateway_controller.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ func (r *GatewayReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct
140140
}
141141
return ctrl.Result{}, err
142142
}
143+
if !r.checkGatewayClass(gateway) {
144+
return ctrl.Result{}, nil
145+
}
146+
143147
conditionProgrammedStatus, conditionProgrammedMsg := true, "Programmed"
144148

145149
r.Log.Info("gateway has been accepted", "gateway", gateway.GetName())

test/e2e/framework/manifests/apisix.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,18 @@ metadata:
6666
name: apisix
6767
labels:
6868
app.kubernetes.io/name: apisix
69+
app: apisix
6970
spec:
7071
replicas: {{ default 1 .Replicas }}
7172
selector:
7273
matchLabels:
7374
app.kubernetes.io/name: apisix
75+
app: apisix
7476
template:
7577
metadata:
7678
labels:
7779
app.kubernetes.io/name: apisix
80+
app: apisix
7881
spec:
7982
initContainers:
8083
- name: config-setup

test/e2e/scaffold/apisix_deployer.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ func (s *APISIXDeployer) AfterEach() {
112112
_, _ = fmt.Fprintln(GinkgoWriter, output)
113113
}
114114

115+
_, _ = fmt.Fprintln(GinkgoWriter, "Dumping APISIX logs:")
116+
output = s.GetDeploymentLogs("apisix")
117+
if output != "" {
118+
_, _ = fmt.Fprintln(GinkgoWriter, output)
119+
}
115120
if framework.ProviderType == framework.ProviderTypeAPISIXStandalone && s.adminTunnel != nil {
116121
client := NewClient("http", s.adminTunnel.Endpoint())
117122
reporter := &ErrorReporter{}

0 commit comments

Comments
 (0)