-
Notifications
You must be signed in to change notification settings - Fork 595
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
Events for cluster scoped resource like KongClusterPlugin
s are created in default
namespace
#5847
Comments
EDIT: Actually I somehow missed the event generated in the
This still is not technically correct because the cluster plugin is not related to the namespace in anyway. 🤔 Not sure if a better option for this wouldn't be to try to attach this to KIC's pod. Leaving this open for now. |
Do we have an example broken plugin to easily replicate this? I'd recommend our install namespace, though still using the kind/name/etc. for the affected object. We can leave We should have permission to our own namespace always, but won't necessarily have access to That said, it looks like we have no control over this unless we use a hack to forcibly add a namespace to an object that wouldn't normally have one (dunno if we actually can do that--probably, but I didn't try). We just call Digging through the implementation confirms that it does use |
From the options mentioned in kubernetes/client-go#781 it seems that
can't be done because the event and object namespace have to match. As for an example that would actually trigger this:
or a full working manifest:
|
KongClusterPlugin
s are not created because events require namespacesKongClusterPlugin
s are created in default
namespace
I think it's better to stick to the default behavior
IMO we should only change our behavior if the upstream invents another way to handle that. Also, in Events docs we advise looking for events in all namespaces - we might consider being more explicit and adding a note about the fact that events for cluster-scoped objects are created in the default namespace, WDYT? As for the permissions, I don't think it is a real issue. KIC uses |
👍
|
This is still impossible in client-go so punting to next release |
Problem statement
KIC supports emitting kubernetes native events https://docs.konghq.com/kubernetes-ingress-controller/latest/production/observability/events/ like
KongConfigurationApplyFailed
These are created for all resources that are found to be relevant for an issue.
This system fails to create events for cluster scoped resources because events need to be created in a concrete namespace.
Related issues
kubernetes/client-go#1262
Acceptance criteria
--watch-namespace
is set so KIC may not be able to create events indefault
namespacedefault
namespaceThe text was updated successfully, but these errors were encountered: