Skip to content

Commit 1e3e991

Browse files
committed
fix: r
Signed-off-by: Ashing Zheng <[email protected]>
1 parent 8cd67c7 commit 1e3e991

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

internal/controller/ingressclass_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ func (r *IngressClassReconciler) processInfrastructure(tctx *provider.TranslateC
192192
namespace = *ingressClass.Spec.Parameters.Namespace
193193
}
194194
// Check for annotation override
195-
if annotationNamespace, exists := ingressClass.Annotations[gatewayProxyNamespaceAnnotation]; exists && annotationNamespace != "" {
195+
if annotationNamespace, exists := ingressClass.Annotations[parametersNamespaceAnnotation]; exists && annotationNamespace != "" {
196196
namespace = annotationNamespace
197197
}
198198

internal/controller/ingressclass_v1beta1_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ func (r *IngressClassV1beta1Reconciler) processInfrastructure(tctx *provider.Tra
196196
namespace = *IngressClassV1beta1.Spec.Parameters.Namespace
197197
}
198198
// Check for annotation override
199-
if annotationNamespace, exists := IngressClassV1beta1.Annotations[gatewayProxyNamespaceAnnotation]; exists && annotationNamespace != "" {
199+
if annotationNamespace, exists := IngressClassV1beta1.Annotations[parametersNamespaceAnnotation]; exists && annotationNamespace != "" {
200200
namespace = annotationNamespace
201201
}
202202

internal/controller/utils.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ const (
7878
)
7979

8080
const (
81-
defaultIngressClassAnnotation = "ingressclass.kubernetes.io/is-default-class"
82-
gatewayProxyNamespaceAnnotation = "apisix.apache.org/gatewayproxy-namespace"
81+
defaultIngressClassAnnotation = "ingressclass.kubernetes.io/is-default-class"
82+
parametersNamespaceAnnotation = "apisix.apache.org/parameters-namespace"
8383
)
8484

8585
var (
@@ -1326,7 +1326,7 @@ func ProcessIngressClassParameters(tctx *provider.TranslateContext, c client.Cli
13261326
if parameters.Namespace != nil {
13271327
ns = *parameters.Namespace
13281328
}
1329-
if annotationNamespace, exists := ingressClass.Annotations[gatewayProxyNamespaceAnnotation]; exists && annotationNamespace != "" {
1329+
if annotationNamespace, exists := ingressClass.Annotations[parametersNamespaceAnnotation]; exists && annotationNamespace != "" {
13301330
ns = annotationNamespace
13311331
}
13321332

test/e2e/crds/v2/basic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ kind: IngressClass
120120
metadata:
121121
name: apisix
122122
annotations:
123-
apisix.apache.org/gatewayproxy-namespace: %s
123+
apisix.apache.org/parameters-namespace: %s
124124
spec:
125125
controller: apisix.apache.org/apisix-ingress-controller
126126
parameters:

0 commit comments

Comments
 (0)