diff --git a/kubernetes.yml b/kubernetes.yml index bacdb7e..ba207b5 100644 --- a/kubernetes.yml +++ b/kubernetes.yml @@ -44,7 +44,7 @@ spec: strategy: type: RollingUpdate rollingUpdate: - maxUnavailable: 25% + maxUnavailable: 10% maxSurge: 1 selector: matchLabels: @@ -56,7 +56,7 @@ spec: spec: containers: - name: veri - image: berkgokden/veri:v0.0.100 + image: berkgokden/veri:v0.0.103 args: ["serve", "--services=veriservice:10000"] imagePullPolicy: IfNotPresent ports: @@ -94,11 +94,11 @@ spec: fieldPath: status.podIP resources: requests: - memory: "64Mi" - cpu: "250m" + memory: "128Mi" + cpu: "512m" limits: memory: "512Mi" - cpu: "500m" + cpu: "1000m" --- apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler diff --git a/node/node.go b/node/node.go index 5b85666..95456da 100644 --- a/node/node.go +++ b/node/node.go @@ -236,9 +236,9 @@ func (n *Node) SyncWithPeers() { for _, item := range peerList { peer := item.Object.(*pb.Peer) // Delete by timeout - // if !n.CheckPeer(peer) { // remove old peer - // continue - // } + if !n.CheckPeer(peer) { // remove old peer + continue + } idOfPeer := n.GetDifferentAddressOf(peer) if idOfPeer == "" { continue