cluster-template-examples icon indicating copy to clipboard operation
cluster-template-examples copied to clipboard

Cloud Provider choice does not install cloud provider onto cluster

Open bcdurden opened this issue 2 years ago • 3 comments

Problem

Working with Harvester templates specifically I noticed that despite choosing harvester in the cloudprovider field, that the cloud provider itself was not provisioned in the cluster.

Expected Behavior

When choosing 'harvester' as the cloudprovider, the corresponding cloud provider configuration is dropped into the resulting Cluster manifest.

What Happens

The cluster is provisioned with Harvester as a node driver but does not include the needed inline kubeconfig file entry under `spec.rkeConfig.machineSelectorConfig[]'.

Desired Fix

I suspect this is difficult to fix as it sits in that acquiring the kubeconfig requires a reference to an existing secret before injecting the contents into a yaml file. Since I can't use kubectl explain to trapse the internal Cluster object docs (they are empty), I am uncertain if there is a secretRef option as opposed to an inline definition.

The other option is keeping the kubeconfig in the values.yaml file, but that presents problems with unencrypted secrets and could not be stored in a code repo without aid of something like SOPs or external secrets, etc.

However, instructions on how to manually inject this would be useful or at least highlighting it as a need.

bcdurden avatar Aug 03 '22 17:08 bcdurden

Did you find a solve for this? I'm having a similar issue with the Harvester CSI driver. Works via the UI, but not through the Helm template...

shrapk2 avatar Sep 06 '23 23:09 shrapk2

I have found a workaround for that bug. I also opened an issue for in the harvester repo, but one developer said my workaround was already pretty good and they are not planning on fixing this and that not using Helm instead of the GUI with Cluster-Templates is an advanced use case that is not officially supported e.g. you are on your own trying to make it work.

You can see my workaround in the issue I mentioned here https://github.com/harvester/harvester/issues/4568

staedter avatar Feb 01 '24 18:02 staedter

I feel this repo is pretty dead. We've pulled it in over at RGS and have been curating it here: https://github.com/rancherfederal/rancher-cluster-templates

Most of it has been rewritten but substantial fixes have already been implemented, Harvester CSI driver works great (although you have to include/generate a kubeconfig for it to work).

bcdurden avatar Feb 02 '24 15:02 bcdurden