clusternet / clusternet

[CNCF Sandbox Project] Managing your Kubernetes clusters (including public, private, edge, etc.) as easily as visiting the Internet
https://clusternet.io
Apache License 2.0
1.37k stars 198 forks source link

can clusternet support specify the namespace of the manifest object ? #363

Open zhenkuang opened 2 years ago

zhenkuang commented 2 years ago

What would you like to be added:

clusternet support specify the namespace of the manifest object

Why is this needed:

Now the manifest object is placed under the clusternet-reserved namespace. If we need different resource objects in different clusters, we need to use the override capability to cover different fields, but if there are a lot of different content, the more content that needs to be covered. If the namespace of the manifest object can be specified, without the ability of the overrider, it can more easily support the scenarios where the resource objects with the same name are different in structure between different clusters.

dixudx commented 2 years ago

Now the manifest object is placed under the clusternet-reserved namespace.

Yes, and it is configurable to use other name.

If we need different resource objects in different clusters, we need to use the override capability to cover different fields, but if there are a lot of different content, the more content that needs to be covered.

I did not get what you mean. Clusternet handles multi-cluster resources.

For overriding, you can use Globalization and Localization. Refer this link to learn how to set overrides in Clusternet.


For end-users, they should not care about Manifests, which are internal resources only for Clusternet.

zhenkuang commented 2 years ago

Now the manifest object is placed under the clusternet-reserved namespace.

Yes, and it is configurable to use other name.

If we need different resource objects in different clusters, we need to use the override capability to cover different fields, but if there are a lot of different content, the more content that needs to be covered.

I did not get what you mean. Clusternet handles multi-cluster resources.

For overriding, you can use Globalization and Localization. Refer this link to learn how to set overrides in Clusternet.

For end-users, they should not care about Manifests, which are internal resources only for Clusternet.

I mean, is it possible to support different resource objects with the same name without using override? e.g use the ns of manifest as an extra parameter, like
kubectl clusternet -m ${manifest-namspace} -n logicalcluster-sample-1653297310-ns get cm

dixudx commented 2 years ago

I mean, is it possible to support different resource objects with the same name without using override? e.g use the ns of manifest as an extra parameter, like kubectl clusternet -m ${manifest-namspace} -n logicalcluster-sample-1653297310-ns get cm

This seems like a multi-tenant issue. Currently Clusternet DOES NOT introduce such multi-tenant concepts, neither Kubernetes.

Actually we could support multi-tenant in Manifest objects. But all the other objects, such as Subscription, Globalization, should be multi-tenant as well. Then it becomes a totally different architecture. What Clusternet tries to solve is to build and provide an uniform control plane for clusters and applications management.