change comment

This commit is contained in:
lijinhui 2021-09-14 17:46:45 +08:00
parent 1e7171667a
commit 4536b96902
2 changed files with 9 additions and 9 deletions

View File

@ -332,7 +332,7 @@ func (a *AppServiceBuild) applyTCPRule(rule *model.TCPRule, service *corev1.Serv
nwkIngress.SetAnnotations(annos) nwkIngress.SetAnnotations(annos)
return nwkIngress, nil return nwkIngress, nil
} }
betaIngress := &betav1.Ingress{ betaIngress := &betav1.Ingress{
ObjectMeta: objectMeta, ObjectMeta: objectMeta,
Spec: betav1.IngressSpec{ Spec: betav1.IngressSpec{

View File

@ -420,14 +420,14 @@ func (a *AppService) GetIngress(canCopy bool) ([]*networkingv1.Ingress, []*betav
return cr, nil return cr, nil
} }
return a.ingresses, 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 //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) { func (a *AppService) DeleteBetaIngress(d *betav1.Ingress) {
for i, c := range a.betaIngresses { for i, c := range a.betaIngresses {
if c.GetName() == d.GetName() { if c.GetName() == d.GetName() {