Skip to content

Commit

Permalink
refactor: remove function genNatGwDeployment's return error
Browse files Browse the repository at this point in the history
  • Loading branch information
xieyanker committed Apr 28, 2021
1 parent a947ebe commit 686681e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pkg/controller/vpc_nat_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,7 @@ func (c *Controller) handleAddOrUpdateVpcNatGw(key string) error {
}
}

newDp, err := c.genNatGwDeployment(gw)
if err != nil {
return err
}
newDp := c.genNatGwDeployment(gw)

if needToCreate {
_, err := c.config.KubeClient.AppsV1().Deployments(c.config.PodNamespace).
Expand Down Expand Up @@ -687,7 +684,7 @@ func (c *Controller) execNatGwRules(pod *corev1.Pod, operation string, rules []s
return nil
}

func (c *Controller) genNatGwDeployment(gw *kubeovnv1.VpcNatGateway) (dp *v1.Deployment, err error) {
func (c *Controller) genNatGwDeployment(gw *kubeovnv1.VpcNatGateway) (dp *v1.Deployment) {
replicas := int32(1)
name := genNatGwDpName(gw.Name)
allowPrivilegeEscalation := true
Expand Down

0 comments on commit 686681e

Please sign in to comment.