Skip to content
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

Feat: Kusion Server apply can use KubeConfig from a secret provider #1409

Open
ffforest opened this issue Feb 12, 2025 · 0 comments
Open

Feat: Kusion Server apply can use KubeConfig from a secret provider #1409

ffforest opened this issue Feb 12, 2025 · 0 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature
Milestone

Comments

@ffforest
Copy link
Contributor

What would you like to be added?

Kusion Server should be able to add KubeConfig needed for preview, apply and destroy.
Suggestion is to:

    1. add the ability (API and GUI) to upload a kubeconfig, store the kubeconfig in a specified secret provider (supporting aws, azure, gcp, alicloud and viettel cloud currently), return a secret reference (ref://xxx/xxx/xxx), and later reference the kubeconfig in the workspace config (this is already supported)
      and/or
    1. support directly retrieving a pre-existing kubeconfig from a supported secret provider.

The difference between the two is the first one doesn't require the user to be familiar with the specific secret provider per se because the secret lifecycle is entirely contained within Kusion. The second one require a step to upload the kubeconfig by the user, which is more complex but provides more flexibility. We can support both too.

Why is this needed?

Kusion determines the KubeConfig used by a preview, apply and destroy operation by reading the KUBECONFIG_PATH or KUBECONFIG_CONTENT. See here for details.
However this requires either the kubeconfig to be stored on the server (when using KUBECONFIG_PATH, or the kubeconfig content to be exposed in the Spec, which is unsafe).
The proper place to store sensitive info like a kubeconfig is the secret provider, which kusion already supports. So adding the ability to process KubeConfigs there is reasonable.

@ffforest ffforest added the kind/feature Categorizes issue or PR as related to a new feature label Feb 12, 2025
@ffforest ffforest added this to the v0.15.0 milestone Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature
Projects
None yet
Development

No branches or pull requests

1 participant