csi-driver icon indicating copy to clipboard operation
csi-driver copied to clipboard

Documentation vs. `kvcluster-kubeconfig` secret

Open morsik opened this issue 8 months ago • 4 comments

Description: Documentation says, that kvcluster-kubeconfig secret is meant to be created when using "Full tenant deployment" mode (which uses ./deploy/controller-tenant files), but this secret is referenced in controller-infra files instead, so deployment simply don't work as I don't have secret as it's never mentioned in "Split deployment" mode I've used.

$ grep -r kvcluster deploy/
deploy//controller-infra/base/deploy.yaml:            secretName: kvcluster-kubeconfig

What you expected: A clear and concise description of what I have to do :)

URL: Main readme at https://github.com/kubevirt/csi-driver

morsik avatar Apr 07 '25 20:04 morsik

I think this should be a lot clearer as well. Nor is there any documentation on how to create the secret required. I tried the standard kubectl create secret kvcluster-kubeconfig --from-file <tenant_cluster_kubeconfig.yaml> but it doesn't work as the logs show

csi-driver F0504 06:17:22.772590       1 kubevirt-csi-driver.go:74] failed to build tenant cluster config: stat /var/run/secrets/tenantcluster/value: no such file or directory                                                                                                                                        csi-attacher E0504 06:17:22.054325       1 main.go:123] "Failed to build a Kubernetes config" err="stat /var/run/secrets/tenantcluster/value: no such file or directory"

Mershab99 avatar May 04 '25 06:05 Mershab99

Once I get some time, I will see if I can update the documentation to be clearer.

awels avatar May 04 '25 17:05 awels

@awels If you'd like you can send me some informal instructions (for split/full tenant deployment) and I can write up the documentation for you and save you some time. Feel free to shoot me an email at [email protected] if that interests you, I'd be glad to help!

Mershab99 avatar May 04 '25 17:05 Mershab99

If you look at https://github.com/kubevirt/csi-driver/blob/main/hack/cluster-sync-split.sh and https://github.com/kubevirt/csi-driver/blob/main/hack/cluster-sync.sh it is the script we use when running the functional tests on a CI cluster. That should properly generate all the various pieces for and hopefully help you understand what is going on.

Split is csi-controller in infra, and csi-node in tenant, the non split is both in tenant. You will almost always want the split version.

awels avatar May 04 '25 17:05 awels

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

/lifecycle stale

kubevirt-bot avatar Aug 02 '25 17:08 kubevirt-bot

Hi

I think this should be a lot clearer as well. Nor is there any documentation on how to create the secret required. I tried the standard kubectl create secret kvcluster-kubeconfig --from-file <tenant_cluster_kubeconfig.yaml> but it doesn't work as the logs show

csi-driver F0504 06:17:22.772590       1 kubevirt-csi-driver.go:74] failed to build tenant cluster config: stat /var/run/secrets/tenantcluster/value: no such file or directory                                                                                                                                        csi-attacher E0504 06:17:22.054325       1 main.go:123] "Failed to build a Kubernetes config" err="stat /var/run/secrets/tenantcluster/value: no such file or directory"

In case you did not manage to make it work, you need to set the key in the secret that holds the kubeconfig content to value, that is filename that tries to access.

For example:

kubectl create secret kvcluster-kubeconfig --from-file value=<tenant_cluster_kubeconfig.yaml>

Notice the value=

ralgozino avatar Aug 28 '25 12:08 ralgozino

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

/lifecycle rotten

kubevirt-bot avatar Sep 27 '25 13:09 kubevirt-bot

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Mark the issue as fresh with /remove-lifecycle rotten.

/close

kubevirt-bot avatar Oct 27 '25 13:10 kubevirt-bot

@kubevirt-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Mark the issue as fresh with /remove-lifecycle rotten.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

kubevirt-bot avatar Oct 27 '25 13:10 kubevirt-bot