This message was deleted.
# terraform-provider-rancher2
a
This message was deleted.
g
You can choose to not install the csi in this right? If you only want to have the SC marked as not default you can provide the storageClass.isdefault: false
b
I've not seen a hook that would prevent the csi chart from being installed. Can you link to / identify it?
in my solution, I absolutely do not want a CSI for vSphere storage installed at all, but I suppose I grabbed the first option I could find in the form of disabling the SC during install of the CSI.
g
If it is already in your cluster you can just uninstall the helm chart (I think it is in the app catalog visible)
b
agreed, and i've taken that manual approach but it breaks with IAC methodology.
I'd rather handle it directly in the TF
g
You selected the rancher-vsphere as cloud provider?
As it then depends on how you configured your cluster initially
b
Ok. so from this, I'm gathering that if I chose to host RKE2, built by Rancher, hosted on vSphere, through Terraform with Rancher2 provider, I should simply expect that an undesired Helm chart, vsphere-csi, will be installed and my best option is to try to obscure the chart and its functionality by disabling the storageClass?
g
If you pick the defaults using RKE2 via Rancher hosted on vsphere you won’t get the csi installed. This is only done if you select rancher-vsphere as cloud provider and provide the specific vsphere and vSAN configuration as chart_values
As long as you use the RKE2 cloud provider no vsphere components are installed
b
I think the disconnect here is, there is no manual creation of the cluster. TF and the Rancher2 provider. When the cloud provider was left as null, the config failed to create a cluster.
g
E.g. this is an example of TF where you configure the csi directly when creating a cluster https://github.com/frank-at-suse/vsphere_rancher_cluster
b
Thank you, I'll review this and see if I can replicate in our environment. Appreciate your help!
g
We use the option to leave the cloud-provider-name empty (“”). Which results in the default RKE2 provider using machine pools created as vsphere types. So I am sure it works. We deploy the csi manually afterwards.
b
This is exactly what i want to achieve. Even Frank's repo sets the value to "rancher-vsphere" so if you're able to proceed with it set to empty, then I'll test that today.
g
Yes you can leave it empty and then it just uses the RKE2 default provider (which is a bit more limited compared to the VMware cpi)
b
noted. thank you
k
If you need some more help, share some snippets and I can take a look
b
Will do. Thanks again