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
pkg/k8s: add pod IP event change #16190
Conversation
test-me-please |
test-me-please |
test-me-please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR changes look good to me, but I don't understand how the PR is fixing the tagged issue. PTAL. (I'm not selecting "request changes"). The PR does fix the tagged issue, edited my previous comment. 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI test failure might be related. I can take a look tomorrow.
pkg/k8s/watchers/pod.go
Outdated
@@ -584,6 +600,12 @@ func (k *K8sWatcher) upsertHostPortMapping(oldPod, newPod *slim_corev1.Pod, oldP | |||
if !option.Config.EnableHostPort { | |||
return nil | |||
} | |||
|
|||
// no-op if specs are the same |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be moved to updatePodHostData
before the defer function that does diff, and later upsertHostPortMapping
is called. 1) The check applies to regular pods as well (not just for hostPort
pods) 2) The diff is unnecessary if pod spec data isn't changed regardless.
@aanm I took a look at the gke failure. I don't see a Also, I see a few occurrences of this error log - "Unable to update ipcache map entry on pod update". AFAIU, this is supposed to be a red herring, but with this change we'll return an error, skipping processing of labels/annotations, etc. |
dd33215
to
53a5eb3
Compare
FYI, I removed this PR from the v1.9 backport PR because it was causing CI failures. |
This is a follow up of 6bd98ad ("handle IP addresses modification in running nodes and CEPs")
for more information read the commit description of that commit.
Signed-off-by: André Martins andre@cilium.io
Accidentally fixes #13136