-
Notifications
You must be signed in to change notification settings - Fork 89
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
feat: support watching a specific namespace only #594
Conversation
47a442c
to
a99d1d0
Compare
83b6491
to
805a856
Compare
3f2344d
to
bb0aebf
Compare
bb0aebf
to
e7f07dd
Compare
Hi @maxime1907! Can you document what you have done and why in the PR description? Ideally for changes made:
Try to lead with a very easy to understand summary, and then go into a bit more details in following parts. |
Hi @consideRatio, |
@maxime1907: I've been looking at the same issue in #626 - my fault for not checking for open PRs first! I think the only issue I see with this is that it doesn't look at If Of course this changes the default behavior (since |
Hi @holzman, Nice idea about putting the configuration in About changing the default behavior, i prefer to keep the same as its currently done so cluster wide because that would be a breaking change for all users. If'd prefer something like: I am waiting for @consideRatio for his toughts on the subject |
Well, this doesn't quite make sense to me - if Not my preference, but if we really want to preserve the current behavior than we could add the
Maybe also emit a warning for the inverse as well that cluster permissions were configured but probably overpermissive. |
Ahh mb on this one, idk what was i thinking, you are actually right! 🙂 Then we just need to determine if @consideRatio wants to keep the current behavior or if he lets us change it |
@consideRatio: gentle reminder that Maxime and I would like feedback about changing the default behavior before we merge this PR and #626 and submit. Current behavior:
Suggested change:
As I'm thinking about it, I think this is also a good idea to prevent a corner case: in the unlikely event that you have multiple namespaces that are running dask-gateway, currently they may see each other's DaskClusters which almost certainly isn't intended behavior. |
@holzman @maxime1907 I opened #661 to discuss things and left some suggestions on the path forward in the bottom of the text! I'm low on maintenance capcity, and this functionality is quite a big deal with regards to the complexity of this project. Due to that, I felt a need to think through the configuration options we ought to provide to ensure maintenance for the feature is sustainable going onwards. |
For my own sanity where I struggle to have discussions about this in multiple locations, I'll close this and the other PR which you are most welcome to re-create with fresh changes, perhaps just like they are. I just want to reset the disucssion a bit, because I felt that it jumped into technical details before the choice of how to configure etc was decided. Let's focus discussion in #661, once we arrive at a configuration api that seems OK, we can get a PR merged quickly implementing whats agreed on. |
Proposal
Currently, dask-gateway fetches custom resources (DaskCluster, IngressRoute...) across all namespaces of the cluster.
This behavior is fine but if we want to use it strictly in a specific namespace, it is not possible with the state of the stack.
I have then thought of a way to adapt it without creating any breaking change with the following implementation.
Implementation
WATCH_NAMESPACE
that lets dask operators to specify a namespace so that all kubernetes commands that are launched within dask-gateway are targeted only on this specific namespace.If this environment variable is not specified, it will start normally in cluster wide mode.
WATCH_NAMESPACE
thanks to the following fields:runInClusterScope
: Run the whole stack either at the cluster scope or at the namespace scopewatchNamespace
: Watch only a specific namespace"--providers.kubernetescrd.allowCrossNamespace=true"
Behind the scene
Cluster wide
From the user and dask operator POV, it doesn't have any impact on the current behavior of dask-gateway which currently fetches kubernetes informations cluster wide (all namespaces).
Namespaced
From the user and dask operator POV, it restricts them to the namespace where the stack is currently deployed.