Description
Hello,
We have a CRD that's cluster-scoped, in its controller, we are trying to create relevant events related to this CR. Since Event itself is namespace-scoped, we have to set the namespace for the event when posting the create request. We have tried 3 options:
-
setting event' namespace to our CRD controller's namespace (app-specific): this seems to be the most reasonable option, however, its rejected by the server due to "involved object's namespace does not match event.namespace":
-
setting event's namespace to "", this arguably makes sense since our CRD is cluster-scope, and one could argue posting its related events against "" namespace is reasonable. However, this was rejected by the client-go request preflight validation
-
setting event's namespace to "default", this works, however we feel uncomfortable because this doesn't seem to be as clean as 1 or 2.
thoughts?
Thanks!
Activity