diff --git a/worker/appm/conversion/gateway.go b/worker/appm/conversion/gateway.go index 36773aacc..e2684c86d 100644 --- a/worker/appm/conversion/gateway.go +++ b/worker/appm/conversion/gateway.go @@ -332,7 +332,7 @@ func (a *AppServiceBuild) applyTCPRule(rule *model.TCPRule, service *corev1.Serv nwkIngress.SetAnnotations(annos) return nwkIngress, nil } - + betaIngress := &betav1.Ingress{ ObjectMeta: objectMeta, Spec: betav1.IngressSpec{ diff --git a/worker/appm/types/v1/v1.go b/worker/appm/types/v1/v1.go index dbb217441..f2c6e42d2 100644 --- a/worker/appm/types/v1/v1.go +++ b/worker/appm/types/v1/v1.go @@ -420,14 +420,14 @@ func (a *AppService) GetIngress(canCopy bool) ([]*networkingv1.Ingress, []*betav return cr, nil } return a.ingresses, nil - } else { - if canCopy { - cr := make([]*betav1.Ingress, len(a.betaIngresses)) - copy(cr, a.betaIngresses[0:]) - return nil, cr - } - return nil, a.betaIngresses } + if canCopy { + cr := make([]*betav1.Ingress, len(a.betaIngresses)) + copy(cr, a.betaIngresses[0:]) + return nil, cr + } + return nil, a.betaIngresses + } //GetDelIngs gets delIngs which need to be deleted @@ -485,7 +485,7 @@ func (a *AppService) DeleteIngress(d *networkingv1.Ingress) { } } -//DeleteIngress delete kubernetes networking v1beta1 ingress model +//DeleteBetaIngress delete kubernetes networking v1beta1 ingress model func (a *AppService) DeleteBetaIngress(d *betav1.Ingress) { for i, c := range a.betaIngresses { if c.GetName() == d.GetName() {