Commit 68416bdf authored by hchiramm's avatar hchiramm

Remove explicit `nil` declaration of some variables in endpoint ctrl.

Signed-off-by: 's avatarhchiramm <hchiramm@redhat.com>
parent 40de2eec
...@@ -428,8 +428,8 @@ func (e *EndpointController) syncService(key string) error { ...@@ -428,8 +428,8 @@ func (e *EndpointController) syncService(key string) error {
} }
subsets := []v1.EndpointSubset{} subsets := []v1.EndpointSubset{}
var totalReadyEps int = 0 var totalReadyEps int
var totalNotReadyEps int = 0 var totalNotReadyEps int
for _, pod := range pods { for _, pod := range pods {
if len(pod.Status.PodIP) == 0 { if len(pod.Status.PodIP) == 0 {
...@@ -559,8 +559,8 @@ func (e *EndpointController) checkLeftoverEndpoints() { ...@@ -559,8 +559,8 @@ func (e *EndpointController) checkLeftoverEndpoints() {
func addEndpointSubset(subsets []v1.EndpointSubset, pod *v1.Pod, epa v1.EndpointAddress, func addEndpointSubset(subsets []v1.EndpointSubset, pod *v1.Pod, epa v1.EndpointAddress,
epp *v1.EndpointPort, tolerateUnreadyEndpoints bool) ([]v1.EndpointSubset, int, int) { epp *v1.EndpointPort, tolerateUnreadyEndpoints bool) ([]v1.EndpointSubset, int, int) {
var readyEps int = 0 var readyEps int
var notReadyEps int = 0 var notReadyEps int
ports := []v1.EndpointPort{} ports := []v1.EndpointPort{}
if epp != nil { if epp != nil {
ports = append(ports, *epp) ports = append(ports, *epp)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment