leowmjw commented on code in PR #1803:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/1803#discussion_r1308252372


##########
pkg/providers/apisix/apisix_tls.go:
##########
@@ -195,7 +195,7 @@ updateStatus:
 }
 
 func (c *apisixTlsController) updateStatus(obj kube.ApisixTls, statusErr 
error) {
-       if obj == nil {
+       if obj == nil || c.Kubernetes.DisableStatusUpdates || 
!c.Eletor.IsLeader() {

Review Comment:
   Typo - c.Elector



##########
pkg/providers/controller.go:
##########
@@ -390,6 +433,7 @@ func (c *Controller) run(ctx context.Context) {
                KubeClient:          c.kubeClient,
                MetricsCollector:    c.MetricsCollector,
                Recorder:            c.recorder,
+               Eletor:              c.elector,

Review Comment:
   Typo - Elector



##########
pkg/providers/apisix/apisix_consumer.go:
##########
@@ -363,7 +363,7 @@ func (c *apisixConsumerController) ResourceSync(interval 
time.Duration) {
 }
 
 func (c *apisixConsumerController) updateStatus(obj kube.ApisixConsumer, 
statusErr error) {
-       if obj == nil {
+       if obj == nil || c.Kubernetes.DisableStatusUpdates || 
!c.Eletor.IsLeader() {

Review Comment:
   Typo - Elector



##########
pkg/config/config_test.go:
##########
@@ -187,7 +204,13 @@ func TestConfigWithEnvVar(t *testing.T) {
         "default_cluster_base_url": "{{.DEFAULT_CLUSTER_BASE_URL}}",
         "default_cluster_admin_key": "{{.DEFAULT_CLUSTER_ADMIN_KEY}}",
         "default_cluster_name": "{{.DEFAULT_CLUSTER_NAME}}"
-    }
+    },
+       "etcdserver": {
+               "enalbed": false,

Review Comment:
   typo - "enabled"



##########
pkg/providers/apisix/apisix_upstream.go:
##########
@@ -280,7 +279,7 @@ updateStatus:
 }
 
 func (c *apisixUpstreamController) updateStatus(obj kube.ApisixUpstream, 
statusErr error) {
-       if obj == nil {
+       if obj == nil || c.Kubernetes.DisableStatusUpdates || 
!c.Eletor.IsLeader() {

Review Comment:
   Typo - c.Elector



##########
pkg/providers/apisix/apisix_plugin_config.go:
##########
@@ -222,7 +222,7 @@ updatestatus:
 }
 
 func (c *apisixPluginConfigController) updateStatus(obj 
kube.ApisixPluginConfig, statusErr error) {
-       if obj == nil {
+       if obj == nil || c.Kubernetes.DisableStatusUpdates || 
!c.Eletor.IsLeader() {

Review Comment:
   Typo - c.Elector



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to