Skip to content

Commit 81d998f

Browse files
committed
typo
1 parent 650f362 commit 81d998f

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

api/v2/apisixglobalrule_types.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,5 @@ type ApisixGlobalRuleList struct {
5151
}
5252

5353
func init() {
54-
var a ApisixGlobalRule
55-
a.GetResourceVersion()
56-
a.GetResourceVersion()
5754
SchemeBuilder.Register(&ApisixGlobalRule{}, &ApisixGlobalRuleList{})
5855
}

internal/controller/apisixroute_controller.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func (r *ApisixRouteReconciler) SetupWithManager(mgr ctrl.Manager) error {
6565
}),
6666
),
6767
).
68-
Watches(&networkingv1.Ingress{},
68+
Watches(&networkingv1.IngressClass{},
6969
handler.EnqueueRequestsFromMapFunc(r.listApiRouteForIngressClass),
7070
builder.WithPredicates(
7171
predicate.NewPredicateFuncs(r.matchesIngressController),
@@ -138,7 +138,6 @@ func (r *ApisixRouteReconciler) processApisixRoute(ctx context.Context, tc *prov
138138
var (
139139
rules = make(map[string]struct{})
140140
)
141-
142141
for httpIndex, http := range in.Spec.HTTP {
143142
// check rule names
144143
if _, ok := rules[http.Name]; ok {
@@ -181,7 +180,7 @@ func (r *ApisixRouteReconciler) processApisixRoute(ctx context.Context, tc *prov
181180
}
182181

183182
// check vars
184-
// todo: cache the result
183+
// todo: cache the result to tctx
185184
if _, err := http.Match.NginxVars.ToVars(); err != nil {
186185
return ReasonError{
187186
Reason: string(apiv2.ConditionReasonInvalidSpec),

0 commit comments

Comments
 (0)