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

Support for multiple namespaces #507

Closed
skonto opened this issue Jun 3, 2019 · 15 comments · Fixed by #2072
Closed

Support for multiple namespaces #507

skonto opened this issue Jun 3, 2019 · 15 comments · Fixed by #2072

Comments

@skonto
Copy link
Contributor

skonto commented Jun 3, 2019

There is an implementation of a multi-watcher mentioned here: kubernetes/kubernetes#74415 (comment)
We could utilize that. Thoughts?

@skonto
Copy link
Contributor Author

skonto commented Jun 14, 2019

@liyinan926 what do you think moving to controller-runtime (kubebuilder), it is more uptodate https://github.com/kubernetes-sigs/controller-runtime/blob/master/pkg/cache/multi_namespace_cache.go
It would be a big change though.

@liyinan926
Copy link
Collaborator

It would be great to move to using controller-runtime. But it looks like possible to just use that particular package without doing a huge round of refactoring.

@skonto
Copy link
Contributor Author

skonto commented Jun 16, 2019

@liyinan926 I understands do you have any insights as what the future might be controller-runtime vs the client lib thing. Long term what should we support?

@liyinan926
Copy link
Collaborator

Long term controller-runtime is the way to go I think.

@doctapp
Copy link

doctapp commented Apr 1, 2020

Any way of deploying multiple spark operators on k8s, like one per namespace?

@zzvara
Copy link
Contributor

zzvara commented Jan 12, 2021

I deploy multiple Spark Operators using:

apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
  name: spark-operator
  namespace: production
spec:
  chart:
    repository: https://googlecloudplatform.github.io/spark-on-k8s-operator
    name: sparkoperator
    version: 1.0.5
  releaseName: spark-operator
  values:
    webhook:
      enabled: true
    resyncInterval: 5
    metrics:
      enable: false
    controllerThreads: 2
    batchScheduler:
      enable: true

and then I have one HelmRelease for each namespace.

@doctapp
Copy link

doctapp commented Jan 12, 2021

Try removing any one of them and it will corrupt all installations

@zzvara
Copy link
Contributor

zzvara commented Jan 12, 2021

Try removing any one of them and it will corrupt all installations

What do you mean by remove and what do you mean by corrupt installation?

@doctapp
Copy link

doctapp commented Jan 12, 2021

We constantly bring up k8s namespaces and then tear them down, therefore, we install/uninstall many Spark Operators. If you only do the above, then all Spark Operators will become corrupted and no longer work as expected except the most recent version. You need many hacks to make it work correctly.

@zzvara
Copy link
Contributor

zzvara commented Jan 12, 2021

@doctapp when you tear down Spark Operator before deleting the namespace and you install it after the namespace is created, what can go wrong?

@doctapp
Copy link

doctapp commented Jan 13, 2021 via email

@zzvara
Copy link
Contributor

zzvara commented Jan 13, 2021

Is there any way to overwrite CRD's in Helm so that they are not deleted when the chart is removed?

@doctapp
Copy link

doctapp commented Jan 13, 2021 via email

@amuraru
Copy link

amuraru commented Dec 22, 2021

@skonto is the migration to controller-runtime or kubebuilder still pursued here? At some point you started the work in #547 and #658 and was wondering if we should revive that effort.
Thanks!

@skonto
Copy link
Contributor Author

skonto commented Dec 22, 2021

Hi @amuraru, it has been a while since I last worked on this. Operator multi-tenancy and other concerns is something that comes up often lately. Some frameworks solve part of the problem with multiple-namespace watching but still people are blocked by cluster scoped CRDs for upgrades. Webhooks can also filter requests per namespace so you could have multiple webhooks for example (some operators use that eg. Elastic). Controller runtime is still the way to go but this needs to be discussed with @liyinan926, this is a lot of work but I think there is value there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants