fix create endpoints problem

This commit is contained in:
yangk 2021-09-29 19:37:11 +08:00
parent 1939d82a69
commit e50298a6ad
2 changed files with 2 additions and 2 deletions

View File

@ -1169,7 +1169,7 @@ func (s *k8sStore) loopUpdateIngress() {
} else {
betaIngress, ok := ingress[i].(*betav1.Ingress)
if !ok || betaIngress == nil {
return
continue
}
superIngress = betaIngress
meta = &betaIngress.ObjectMeta

View File

@ -152,7 +152,7 @@ func (r *Reconciler) Reconcile(req ctrl.Request) (res reconcile.Result, retErr e
}
// create endpoint for component service
if len(component.Spec.Ports) == 1 && len(component.Spec.EndpointSource.StaticEndpoints) != 0 {
if len(component.Spec.Ports) == 1 && len(component.Spec.EndpointSource.StaticEndpoints) > 1 {
svc := services.Items[0]
ep := createEndpointsOnlyOnePort(component, svc, component.Status.Endpoints)
if ep != nil {