Skip to content

Commit

Permalink
fix: status ServiceSyncError caused by ClusterIp (#79)
Browse files Browse the repository at this point in the history
Is it necessary to update the ClusterIP from  the cep?
  • Loading branch information
soulfy authored Apr 2, 2022
1 parent 995e634 commit 43602ed
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions controllers/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ package controllers
import (
"context"
"fmt"
"github.com/sealyun/endpoints-operator/metrics"
"k8s.io/klog"
"strconv"
"sync"

"github.com/sealyun/endpoints-operator/metrics"
"k8s.io/klog"

"github.com/sealyun/endpoints-operator/api/network/v1beta1"
libv1 "github.com/sealyun/endpoints-operator/library/api/core/v1"
corev1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -52,7 +53,7 @@ func (c *Reconciler) syncService(ctx context.Context, cep *v1beta1.ClusterEndpoi
if err := controllerutil.SetControllerReference(cep, svc, c.scheme); err != nil {
return err
}
svc.Spec.ClusterIP = cep.Spec.ClusterIP
// svc.Spec.ClusterIP = cep.Spec.ClusterIP
svc.Spec.Type = corev1.ServiceTypeClusterIP
svc.Spec.SessionAffinity = corev1.ServiceAffinityNone
svc.Spec.Ports = convertServicePorts(cep.Spec.Ports)
Expand Down

0 comments on commit 43602ed

Please sign in to comment.