You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/05/19 06:34:37 UTC

[GitHub] [apisix-ingress-controller] tokers commented on a change in pull request #469: fix: event record scheme error

tokers commented on a change in pull request #469:
URL: https://github.com/apache/apisix-ingress-controller/pull/469#discussion_r634949294



##########
File path: pkg/ingress/controller.go
##########
@@ -37,6 +38,7 @@ import (
 	"github.com/apache/apisix-ingress-controller/pkg/apisix"
 	"github.com/apache/apisix-ingress-controller/pkg/config"
 	"github.com/apache/apisix-ingress-controller/pkg/kube"
+	apisixScheme "github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/clientset/versioned/scheme"

Review comment:
       ```suggestion
   	apisixscheme "github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/clientset/versioned/scheme"
   ```
   
   Basically, all characters are in the small case as the import package name alias.

##########
File path: pkg/ingress/controller.go
##########
@@ -166,6 +168,7 @@ func NewController(cfg *config.Config) (*Controller, error) {
 	}
 
 	// recorder
+	utilruntime.Must(apisixScheme.AddToScheme(scheme.Scheme))

Review comment:
       I think to check the return `err` from `apisixscheme.AddToScheme` and return once `err` is not `nil` is better, basically, we don't panic the program if internal errors happen in the same context.




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org