@@ -21,7 +21,6 @@ import (
2121 "context"
2222 "fmt"
2323
24- "github.com/api7/gopkg/pkg/log"
2524 "github.com/go-logr/logr"
2625 corev1 "k8s.io/api/core/v1"
2726 networkingv1 "k8s.io/api/networking/v1"
@@ -115,7 +114,7 @@ func (r *ApisixTlsReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
115114 // get the ingress class
116115 ingressClass , err := GetIngressClass (tctx , r .Client , r .Log , tls .Spec .IngressClassName )
117116 if err != nil {
118- log .Error (err , "failed to get IngressClass" )
117+ r . Log .Error (err , "failed to get IngressClass" )
119118 r .updateStatus (& tls , metav1.Condition {
120119 Type : string (apiv2 .ConditionTypeAccepted ),
121120 Status : metav1 .ConditionFalse ,
@@ -129,7 +128,7 @@ func (r *ApisixTlsReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
129128
130129 // process IngressClass parameters if they reference GatewayProxy
131130 if err := ProcessIngressClassParameters (tctx , r .Client , r .Log , & tls , ingressClass ); err != nil {
132- log .Error (err , "failed to process IngressClass parameters" , "ingressClass" , ingressClass .Name )
131+ r . Log .Error (err , "failed to process IngressClass parameters" , "ingressClass" , ingressClass .Name )
133132 r .updateStatus (& tls , metav1.Condition {
134133 Type : string (apiv2 .ConditionTypeAccepted ),
135134 Status : metav1 .ConditionFalse ,
@@ -143,7 +142,7 @@ func (r *ApisixTlsReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
143142
144143 // process ApisixTls validation
145144 if err := r .processApisixTls (ctx , tctx , & tls ); err != nil {
146- log .Error (err , "failed to process ApisixTls" )
145+ r . Log .Error (err , "failed to process ApisixTls" )
147146 r .updateStatus (& tls , metav1.Condition {
148147 Type : string (apiv2 .ConditionTypeAccepted ),
149148 Status : metav1 .ConditionFalse ,
@@ -156,7 +155,7 @@ func (r *ApisixTlsReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
156155 }
157156
158157 if err := r .Provider .Update (ctx , tctx , & tls ); err != nil {
159- log .Error (err , "failed to sync apisix tls to provider" )
158+ r . Log .Error (err , "failed to sync apisix tls to provider" )
160159 // Update status with failure condition
161160 r .updateStatus (& tls , metav1.Condition {
162161 Type : string (apiv2 .ConditionTypeAccepted ),
0 commit comments