Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Denormalize IP name before checking if pod is alive #360

Merged
merged 3 commits into from
Jul 25, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pkg/reconciler/iploop.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"fmt"
"net"
"strings"
"time"

v1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -164,9 +165,12 @@ func (rl *ReconcileLooper) findClusterWideIPReservations(ctx context.Context) er

for _, clusterWideIPReservation := range clusterWideIPReservations {
ip := clusterWideIPReservation.GetName()
// De-normalize the IP
nicklesimba marked this conversation as resolved.
Show resolved Hide resolved
denormalizedip := strings.ReplaceAll(ip, "-", ":")

podRef := clusterWideIPReservation.Spec.PodRef

if !rl.isPodAlive(podRef, ip) {
if !rl.isPodAlive(podRef, denormalizedip) {
logging.Debugf("pod ref %s is not listed in the live pods list", podRef)
rl.orphanedClusterWideIPs = append(rl.orphanedClusterWideIPs, clusterWideIPReservation)
}
Expand Down