Skip to content

pkg/k8s: use copy of objectmeta when fetching from local stores#12470

Merged
aanm merged 1 commit intomasterfrom
pr/fix-local-k8s-store
Jul 9, 2020
Merged

pkg/k8s: use copy of objectmeta when fetching from local stores#12470
aanm merged 1 commit intomasterfrom
pr/fix-local-k8s-store

Conversation

@aanm
Copy link
Copy Markdown
Member

@aanm aanm commented Jul 9, 2020

This commit fixes a bug introduced by 9975bba where we were
accidentally writing into the object metadata of the local pod store,
which should never happen. Doing that could cause k8s update pod
events to give to the Update function handlers an old pod structure with
such fields modified.

Fixes: 9975bba ("pkg/endpoint: fetch pod and namespace labels from local stores")

Reported-by: Deepesh Pathak deepshpathak@gmail.com
Signed-off-by: André Martins andre@cilium.io

This commit fixes a bug introduced by 9975bba where we were
accidentally writing into the object metadata of the local pod store,
which should never happen. Doing that could cause k8s update pod
events to give to the Update function handlers an old pod structure with
such fields modified.

Fixes: 9975bba ("pkg/endpoint: fetch pod and namespace labels from local stores")

Reported-by: Deepesh Pathak <deepshpathak@gmail.com>
Signed-off-by: André Martins <andre@cilium.io>
@aanm aanm added release-note/bug This PR fixes an issue in a previous release of Cilium. kind/regression This functionality worked fine before, but was broken in a newer release of Cilium. labels Jul 9, 2020
@aanm aanm requested a review from a team July 9, 2020 11:51
@aanm
Copy link
Copy Markdown
Member Author

aanm commented Jul 9, 2020

test-me-please

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.02%) to 36.916% when pulling 3a09fad on pr/fix-local-k8s-store into 678e7f0 on master.

@maintainer-s-little-helper maintainer-s-little-helper Bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jul 9, 2020
@aanm aanm merged commit 3a311ab into master Jul 9, 2020
@aanm aanm deleted the pr/fix-local-k8s-store branch July 9, 2020 22:50
@brb brb mentioned this pull request Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/regression This functionality worked fine before, but was broken in a newer release of Cilium. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/bug This PR fixes an issue in a previous release of Cilium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants