karmada-io / karmada

Open, Multi-Cloud, Multi-Cluster Kubernetes Orchestration
https://karmada.io
Apache License 2.0
4.42k stars 875 forks source link

General Cluster Resource Modeling in newer versions of Karmada #4962

Open SeekerRook opened 4 months ago

SeekerRook commented 4 months ago

Please provide an in-depth description of the question you have: Is there a way to disable Customized Cluster Resource Models and use General Cluster Resource Models, as described in the documentation? As far as I understand from the docs, Customized Cluster Resource Models are enabled by default in newer versions of Karmada, but I can't find a way to disable it.

Am I missing something or is there no way to use General Cluster Resource Models?

What do you think about this question?:

Environment:

RainbowMango commented 4 months ago

Please refer to Disable Cluster Resource Modeling.

I wonder the reason why you need to disable it. By the way.

SeekerRook commented 4 months ago

Please refer to Disable Cluster Resource Modeling.

Thanks for the reply! I thought this section referred to disabling resource modeling altogether (both General and Customised). I will check it out.

I wonder the reason why you need to disable it. By the way.

I have a testing environment with small vm clusters. Customised modeling does not calculate the resources correctly without a lot of fine-tuning of the Grades. Since my clusters are all single node clusters I thought of disabling it, as I assume it will compute the available resources correctly.

SeekerRook commented 4 months ago

Hello again. I tried the solution but didn't resolve my issue. It still has the same behaviour as before. What I did was run kubectl edit deploy/karmada-controller-manager -n karmada-system and then modify command to look like this

- command:
        - /bin/karmada-controller-manager
        - --kubeconfig=/etc/kubeconfig
        - --bind-address=0.0.0.0
        - --cluster-status-update-frequency=10s
        - --secure-port=10357
        - --enable-cluster-resource-modeling=false
        - --v=4

After that I unjoined and joined the clusters again. The system behaves the same as before, just with the default customized resource model instead of the one I had modified (which makes sense since I rejoined the clusters). Am I doing something wrong? Is there a way to make sure it uses Generalised resource models instead of the Customised ones?

mszacillo commented 4 months ago

I'm seeing the same behavior - I'd like to use the general resource model but disabling the custom cluster resource modeling in controller-manager seems to have no effect.

In my use case we'll be scheduling CRDs which get intercepted by operators installed on each member cluster and will schedule a variety of resources for that CRD. As a result, we just want a generalized picture of the allocatable resources on the cluster.