Skip to content

Commit

Permalink
Fix: remove IsNotFound when get configmap external gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
xieyanker committed Feb 2, 2021
1 parent 0ccca06 commit c52c067
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/daemon/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"github.com/alauda/kube-ovn/pkg/util"
"github.com/vishvananda/netlink"
v1 "k8s.io/api/core/v1"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/klog"
Expand Down Expand Up @@ -215,7 +214,7 @@ func (c *Controller) setExGateway() error {
enable := node.Labels[util.ExGatewayLabel]
if enable == "true" {
cm, err := c.config.KubeClient.CoreV1().ConfigMaps("kube-system").Get(context.Background(), util.ExternalGatewayConfig, metav1.GetOptions{})
if err != nil && !k8serrors.IsNotFound(err) {
if err != nil {
klog.Errorf("failed to get ovn-external-gw-config, %v", err)
return err
}
Expand Down

0 comments on commit c52c067

Please sign in to comment.