-
Notifications
You must be signed in to change notification settings - Fork 95
Description
What would you like to be added?
Please support the declaration of Kubernetes runtime configurations in Workspace to manage multi-clusters with different workspace configurations.
The configuration may includes:
- the local file path of
KubeConfig - the URL for obtaining
KubeConfigcontent, e.g. S3 endpoint - the
KubeConfigcontent itself
Why is this needed?
Background
Kusion needs to deploy the application resources to a specific Kubernetes cluster, thus it should allow users to specify the information of the targeted cluster. Currently, users can specify the cluster by configuring the KUBECONFIG environment variable, which stay consistent with kubectl. The related codes can be found here
Target
In order to better integrate Kusion in the CI/CD pipeline and support the multi-cluster scenarios more flexibly, we hope to add Kubernetes runtime configurations in Kusion Workspace, for example, it can include the following configs:
- the local file path of
KubeConfig - the URL for obtaining
KubeConfigcontent, e.g. S3 endpoint - the
KubeConfigcontent itself
So that each workspace will correspond to a separate Kubernetes cluster, and users don't need to re-set the KUBECONFIG environment variable every time before deploying to a different Kubernetes cluster.
Main Concern
Actually, we once supported declaring Kubernetes and Terraform runtime configurations in Workspace in previous versions, but later we removed it for the following reasons:
- Workspace is accessible to many team members, which may easily lead to the leakage of sensitive information, such as K8s cluster certificates and TF provider AK/SK.
KubeConfigcan usually be considered as a workspace-level configuration, but the config of Terraform Provider is very like to be at the resource level, which means that the resources of different modules in the same workspace may still differ
Currently, we also support specifying the runtime information in the Extensions field of Resource in Spec. Now, we need to consider the actual requirements and situations comprehensively to implement this feature.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status