Closed M4C4R closed 2 months ago
Hello @M4C4R, Thank you for reporting this issue. So few things to unpack here;
does that address all your points?
Hi
The Operator "attempting" to deploy the resources in the same namespace the CR was deployed in, is actually a feature not a bug. There are several reasons for this but on of them is to make writing a test easier since the user wont need to worry about k8s namespace networking when trying to figure out which API to call.
Understood, but as it lacks cluster-wide access by default, it may as well only watch its own namespace. Unless of course it can be configured to deploy the resources into its own operator namespace, where it does have access (I still think this is a nice option as we then don't scatter locust pods across namespaces).
Adding a cluster role sounds like an easy win and will unblock our use case, but I do hope you consider being able to control where the locust resources are deployed.
thanks @AbdelrhmanHamouda
@M4C4R i'm going to push a change to this within this week or the one after
this is now in 0.10.0
Describe the bug CRs (custom resources) can be created outside the operator namespace, but the operator lacks permissions to fulfill the requests as it attempts to create the jobs/services within the namespace of the CR.
To Reproduce Steps to reproduce the behaviour:
Expected behaviour I expected the jobs/services to be created within the namespace of the operator, not of the CR.
This is as granting the following at a cluster level is excessive:
Additional context: We plan on bundling our locust tests with our application charts, so they will be deployed into the same namespace as the application - not the operator.