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

Also cast to specific structure if obj is type of cache.DeletedFinalStateUnknown #11461

Merged
merged 10 commits into from May 13, 2020

Conversation

aanm
Copy link
Member

@aanm aanm commented May 11, 2020

Fixes #11438

Gracefully handle lost events from k8s without printing warnings

@aanm aanm added the release-note/bug This PR fixes an issue in a previous release of Cilium. label May 11, 2020
@maintainer-s-little-helper maintainer-s-little-helper bot added this to In progress in 1.8.0 May 11, 2020
@aanm
Copy link
Member Author

aanm commented May 11, 2020

test-me-please

@coveralls
Copy link

coveralls commented May 11, 2020

Coverage Status

Coverage increased (+0.01%) to 37.897% when pulling 6c5d8a2 on pr/ignore-obj-to-cilium-warnings into fb8481a on master.

aanm added 10 commits May 11, 2020 16:11
…Unknown

When casting to a networkpolicy, the k8s watcher might send a
cache.DeletedFinalStateUnknown object to the event handler. Since the
converter is not expecting this type, it will cause a warning to be
printed in the logs which will be unexpected for users. This commit
adds the ability for the function converter to cast the objects from
cache.DeletedFinalStateUnknown to avoid printing such warning.

Signed-off-by: André Martins <andre@cilium.io>
When casting to a services, the k8s watcher might send a
cache.DeletedFinalStateUnknown object to the event handler. Since the
converter is not expecting this type, it will cause a warning to be
printed in the logs which will be unexpected for users. This commit
adds the ability for the function converter to cast the objects from
cache.DeletedFinalStateUnknown to avoid printing such warning.

Signed-off-by: André Martins <andre@cilium.io>
When casting to a endpoints, the k8s watcher might send a
cache.DeletedFinalStateUnknown object to the event handler. Since the
converter is not expecting this type, it will cause a warning to be
printed in the logs which will be unexpected for users. This commit
adds the ability for the function converter to cast the objects from
cache.DeletedFinalStateUnknown to avoid printing such warning.

Signed-off-by: André Martins <andre@cilium.io>
…Unknown

When casting to a endointslice, the k8s watcher might send a
cache.DeletedFinalStateUnknown object to the event handler. Since the
converter is not expecting this type, it will cause a warning to be
printed in the logs which will be unexpected for users. This commit
adds the ability for the function converter to cast the objects from
cache.DeletedFinalStateUnknown to avoid printing such warning.

Signed-off-by: André Martins <andre@cilium.io>
When casting to a CNP, the k8s watcher might send a
cache.DeletedFinalStateUnknown object to the event handler. Since the
converter is not expecting this type, it will cause a warning to be
printed in the logs which will be unexpected for users. This commit
adds the ability for the function converter to cast the objects from
cache.DeletedFinalStateUnknown to avoid printing such warning.

Signed-off-by: André Martins <andre@cilium.io>
When casting to a Pod, the k8s watcher might send a
cache.DeletedFinalStateUnknown object to the event handler. Since the
converter is not expecting this type, it will cause a warning to be
printed in the logs which will be unexpected for users. This commit
adds the ability for the function converter to cast the objects from
cache.DeletedFinalStateUnknown to avoid printing such warning.

Signed-off-by: André Martins <andre@cilium.io>
When casting to a Node, the k8s watcher might send a
cache.DeletedFinalStateUnknown object to the event handler. Since the
converter is not expecting this type, it will cause a warning to be
printed in the logs which will be unexpected for users. This commit
adds the ability for the function converter to cast the objects from
cache.DeletedFinalStateUnknown to avoid printing such warning.

Signed-off-by: André Martins <andre@cilium.io>
When casting to a Namespace, the k8s watcher might send a
cache.DeletedFinalStateUnknown object to the event handler. Since the
converter is not expecting this type, it will cause a warning to be
printed in the logs which will be unexpected for users. This commit
adds the ability for the function converter to cast the objects from
cache.DeletedFinalStateUnknown to avoid printing such warning.

Signed-off-by: André Martins <andre@cilium.io>
…nown

When casting to a CiliumNode, the k8s watcher might send a
cache.DeletedFinalStateUnknown object to the event handler. Since the
converter is not expecting this type, it will cause a warning to be
printed in the logs which will be unexpected for users. This commit
adds the ability for the function converter to cast the objects from
cache.DeletedFinalStateUnknown to avoid printing such warning.

Signed-off-by: André Martins <andre@cilium.io>
…eUnknown

When casting to a CiliumEndpoint, the k8s watcher might send a
cache.DeletedFinalStateUnknown object to the event handler. Since the
converter is not expecting this type, it will cause a warning to be
printed in the logs which will be unexpected for users. This commit
adds the ability for the function converter to cast the objects from
cache.DeletedFinalStateUnknown to avoid printing such warning.

Signed-off-by: André Martins <andre@cilium.io>
@aanm aanm force-pushed the pr/ignore-obj-to-cilium-warnings branch from 0ffb379 to 6c5d8a2 Compare May 11, 2020 14:11
@aanm
Copy link
Member Author

aanm commented May 11, 2020

test-me-please

@aanm
Copy link
Member Author

aanm commented May 11, 2020

retest-runtime

@aanm
Copy link
Member Author

aanm commented May 11, 2020

retest-net-next

@aanm aanm marked this pull request as ready for review May 11, 2020 20:55
@aanm aanm requested a review from a team May 11, 2020 20:55
@aanm aanm requested a review from a team as a code owner May 11, 2020 20:55
@aanm
Copy link
Member Author

aanm commented May 12, 2020

hit #11457

Copy link
Member

@nebril nebril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Although changes like this make you wonder if generics might have been a good idea after all ;)

@aanm aanm merged commit 62ee525 into master May 13, 2020
1.8.0 automation moved this from In progress to Merged May 13, 2020
@aanm aanm deleted the pr/ignore-obj-to-cilium-warnings branch May 13, 2020 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/bug This PR fixes an issue in a previous release of Cilium.
Projects
No open projects
1.8.0
  
Merged
Development

Successfully merging this pull request may close these issues.

Fix Ignoring invalid CiliumEndpoint
3 participants