Skip to content

Commit d3ffe93

Browse files
committed
fix: r
Signed-off-by: Ashing Zheng <[email protected]>
1 parent 54c0343 commit d3ffe93

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

internal/webhook/v1/apisixconsumer_webhook.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func (v *ApisixConsumerCustomValidator) ValidateCreate(ctx context.Context, obj
6565
}
6666
apisixConsumerLog.Info("Validation for ApisixConsumer upon creation", "name", consumer.GetName(), "namespace", consumer.GetNamespace())
6767

68-
if !controller.MatchesIngressClass(v.Client, apisixConsumerLog, consumer) {
68+
if !controller.MatchesIngressClass(v.Client, apisixConsumerLog, consumer, "") {
6969
return nil, nil
7070
}
7171

@@ -78,7 +78,7 @@ func (v *ApisixConsumerCustomValidator) ValidateUpdate(ctx context.Context, oldO
7878
return nil, fmt.Errorf("expected an ApisixConsumer object for the newObj but got %T", newObj)
7979
}
8080
apisixConsumerLog.Info("Validation for ApisixConsumer upon update", "name", consumer.GetName(), "namespace", consumer.GetNamespace())
81-
if !controller.MatchesIngressClass(v.Client, apisixConsumerLog, consumer) {
81+
if !controller.MatchesIngressClass(v.Client, apisixConsumerLog, consumer, "") {
8282
return nil, nil
8383
}
8484

internal/webhook/v1/apisixroute_webhook.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func (v *ApisixRouteCustomValidator) ValidateCreate(ctx context.Context, obj run
6363
return nil, fmt.Errorf("expected an ApisixRoute object but got %T", obj)
6464
}
6565
apisixRouteLog.Info("Validation for ApisixRoute upon creation", "name", route.GetName(), "namespace", route.GetNamespace())
66-
if !controller.MatchesIngressClass(v.Client, apisixRouteLog, route) {
66+
if !controller.MatchesIngressClass(v.Client, apisixRouteLog, route, "") {
6767
return nil, nil
6868
}
6969

@@ -76,7 +76,7 @@ func (v *ApisixRouteCustomValidator) ValidateUpdate(ctx context.Context, oldObj,
7676
return nil, fmt.Errorf("expected an ApisixRoute object for the newObj but got %T", newObj)
7777
}
7878
apisixRouteLog.Info("Validation for ApisixRoute upon update", "name", route.GetName(), "namespace", route.GetNamespace())
79-
if !controller.MatchesIngressClass(v.Client, apisixRouteLog, route) {
79+
if !controller.MatchesIngressClass(v.Client, apisixRouteLog, route, "") {
8080
return nil, nil
8181
}
8282

internal/webhook/v1/apisixtls_webhook.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func (v *ApisixTlsCustomValidator) ValidateCreate(ctx context.Context, obj runti
6363
return nil, fmt.Errorf("expected an ApisixTls object but got %T", obj)
6464
}
6565
apisixTlsLog.Info("Validation for ApisixTls upon creation", "name", tls.GetName(), "namespace", tls.GetNamespace())
66-
if !controller.MatchesIngressClass(v.Client, apisixTlsLog, tls) {
66+
if !controller.MatchesIngressClass(v.Client, apisixTlsLog, tls, "") {
6767
return nil, nil
6868
}
6969

@@ -76,7 +76,7 @@ func (v *ApisixTlsCustomValidator) ValidateUpdate(ctx context.Context, oldObj, n
7676
return nil, fmt.Errorf("expected an ApisixTls object for the newObj but got %T", newObj)
7777
}
7878
apisixTlsLog.Info("Validation for ApisixTls upon update", "name", tls.GetName(), "namespace", tls.GetNamespace())
79-
if !controller.MatchesIngressClass(v.Client, apisixTlsLog, tls) {
79+
if !controller.MatchesIngressClass(v.Client, apisixTlsLog, tls, "") {
8080
return nil, nil
8181
}
8282

internal/webhook/v1/ingress_webhook.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func (v *IngressCustomValidator) ValidateCreate(ctx context.Context, obj runtime
138138
return nil, fmt.Errorf("expected a Ingress object but got %T", obj)
139139
}
140140
ingresslog.Info("Validation for Ingress upon creation", "name", ingress.GetName(), "namespace", ingress.GetNamespace())
141-
if !controller.MatchesIngressClass(v.Client, ingresslog, ingress) {
141+
if !controller.MatchesIngressClass(v.Client, ingresslog, ingress, "") {
142142
return nil, nil
143143
}
144144

@@ -156,7 +156,7 @@ func (v *IngressCustomValidator) ValidateUpdate(ctx context.Context, oldObj, new
156156
return nil, fmt.Errorf("expected a Ingress object for the newObj but got %T", newObj)
157157
}
158158
ingresslog.Info("Validation for Ingress upon update", "name", ingress.GetName(), "namespace", ingress.GetNamespace())
159-
if !controller.MatchesIngressClass(v.Client, ingresslog, ingress) {
159+
if !controller.MatchesIngressClass(v.Client, ingresslog, ingress, "") {
160160
return nil, nil
161161
}
162162

0 commit comments

Comments
 (0)