-
Notifications
You must be signed in to change notification settings - Fork 168
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
Omit cloud-provider-name if rke_disable_cloud_controller is enabled #273
Conversation
otherwise the taint "node.cloudprovider.kubernetes.io/uninitialized" is applied and cluster does not finish setup as nodes are unschedulable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This achieved the opposite. A brand new cluster gets You should remember that So the code before this PR was correct. {% if (rke2_disable_cloud_controller | bool ) %}
disable-cloud-controller: true
cloud-provider-name: "{{ rke2_cloud_provider_name }}"
{% endif %} vs {% if (rke2_disable_cloud_controller | bool ) %}
disable-cloud-controller: true
{% endif %}
{% if not (rke2_disable_cloud_controller | bool ) %}
cloud-provider-name: "{{ rke2_cloud_provider_name }}"
{% endif %} Your code is trying to use an external cloud contoller when the internal one is enabled. This should be reverted. |
Revert lablabs#273. It actually does the opposite of what it says it's trying to achieve
@Raboo Did I miss up on the logic? Original:
Updated:
|
Original:test.yml
config.yml.j2
Disable cloud controllertest.yml
Output: when "rke2_disable_cloud_controller: true", cloud-provider-name is defined, why?
|
Updatedconfig.yml.j2
Enabled cloud controllerOutput: when "rke2_disable_cloud_controller: false", no cloud-provider-name is defined.
Disabled cloud controllerOutput: when "rke2_disable_cloud_controller: true", no cloud-provider-name is defined.
|
So you are saying when the RKE2 cloud controller is disabled, there should be a |
Perhaps I am misunderstanding how these two configurations work together or I missed some changes between RKE2 versions. |
Well when you install without a CCM you will get the taint. Once you install a CCM, the taint should be removed afaik.. I am now confused about the |
My scenario is bare-metal, so the cloud-controller does not seem like something useful to me, hence why I came to this issue. When I disabled the cloud-controller I get stamped with the "external" default which causes the taint. I am trying to find a list of values for the setting itself but I can't find such in Rancher's docs (RKE2, SUSE, etc.) other than "external" or "aws". |
Well maybe they should be configured separately? |
That sounds reasonable. |
I'm wondering how it should be done without introducing breaking changes. So if we have a special value false? something like that? |
After digging throught RKE2 source code this seems the be the available choices for
So with this knowledge it seems that cloud_controller can be enabled at the same time with cloud-provider-name. |
Maybe set it as an empty string by default?
…On Wed, 27 Nov 2024, 14:40 Elias Abacioglu, ***@***.***> wrote:
After digging throught RKE2 source code this seems the be the available
choices for cloud-provider-name:
- aws
- azure
- gcp
- rancher-vsphere
- harvester
- external
external is special, it disables cloud_controller.
So with this knowledge it seems that cloud_controller can be enabled at
the same time with cloud-provider-name.
It was also "nullable", i.e. no value.
—
Reply to this email directly, view it on GitHub
<#273 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGFN3V3RZS7FD5CEYDO4LOT2CXKWNAVCNFSM6AAAAABRLLX2ZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMBUGA2DQNJUHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
that would be a breaking change, @MonolithProjects what do you think? How to proceed? |
Hi there, first of all thanks for your effort @Raboo and @edward2a . What about to introduce {% if (rke2_disable_cloud_controller | bool ) %}
disable-cloud-controller: true
{% if rke2_cloud_provider_name != false %}
cloud-provider-name: "{{ rke2_cloud_provider_name }}"
{% endif %}
{% endif %} I guess this should work and not be a breaking change. |
Ok, That is a good solution for now, it achieves the goal that @edward2a wants, but it should be possible to enable it even when |
I've updated my PR now, but we should look at introducing the breaking change by controlling |
According to the doc: https://docs.k3s.io/networking/networking-services#deploying-an-external-cloud-controller-manager we shouldn't disable CCM if it is running on prem. ( and set the provider name as external) I think the original default behavior was correct. I update the doc here as well #289 However, I don't see anything wrong so far with the following settings, everything seems like running fine
because it still set the internal ip , and I don't have external ip for my nodes. |
Otherwise the taint "node.cloudprovider.kubernetes.io/uninitialized" is applied and cluster does not finish setup as nodes are unschedulable.
Description
Started a test cluster in virtualbox (a.k.a on-prem, 1 master, 1 worker) and there was pending jobs and pods (cluster did not finish setup).
On inspection, the worker was cordoned with "node.cloudprovider.kubernetes.io/uninitialized".
Type of change
How Has This Been Tested?
Deploy into a two-node cluster and check pods afterwards to verify there are no Pending pods (jobs or runtime components).