loft-sh / vcluster

vCluster - Create fully functional virtual Kubernetes clusters - Each vcluster runs inside a namespace of the underlying k8s cluster. It's cheaper than creating separate full-blown clusters and it offers better multi-tenancy and isolation than regular namespaces.
https://www.vcluster.com
Apache License 2.0
6.92k stars 426 forks source link

Remove use of client from CLI setup #2240

Closed rmweir closed 1 month ago

rmweir commented 1 month ago

Prior, we were using a kubeconfig client during setup of the platform commands. The client uses the command "vcluster platform token". This would cause an endless loop like the following:

  1. you run the "vcluster platform ..." command
  2. vcluster makes request to /deployments endpoint, before running the intended command.
  3. the k8s client uses vcluster to authenticate the request
  4. return to step 2 The request was being made to detect the platform namespace and set it as the default namespace for the backup management command. Now, there is not a default that is set ahead of running the command but if a value was not passed, the CLI will then search for the platform namespace.

What issue type does this pull request address? (keep at least one, remove the others) /kind bugfix

What does this pull request do? Which issues does it resolve? (use resolves #<issue_number> if possible) Fixes ENG-4918

Please provide a short message that should be published in the vcluster release notes Fixed an issue where vcluster would hang during vcluster platform commands.

What else do we need to know?

netlify[bot] commented 1 month ago

Deploy Preview for vcluster-docs canceled.

Built without sensitive environment variables

Name Link
Latest commit a5622f963c27200bc8ceab904d7a6079c62904ad
Latest deploy log https://app.netlify.com/sites/vcluster-docs/deploys/6716f2c5bd425f00084a8f50
loft-bot commented 1 month ago

πŸ’š All backports created successfully

Status Branch Result
βœ… v0.20

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details