kubeblocks icon indicating copy to clipboard operation
kubeblocks copied to clipboard

[Improvement] KubeBlocks supports secure Development Mode

Open Y-Rookie opened this issue 7 months ago • 2 comments

Background:

During local development of KubeBlocks, developers often inadvertently connect to online or other environment K8s clusters, causing incorrect updates to resources such as CRDs and CRs in the database clusters within the online K8s, leading to severe consequences like all clusters restarts. Such issues may arise in the following scenarios:

  • After switching the KubeConfig Context to troubleshoot issues in other environments, forgetting to switch back the context, resulting in connecting to the wrong cluster during the next local development of KubeBlocks.

  • Directly using the local environment to debug problems in the online cluster, with inconsistent local environment variables set, such as tool image versions, causing issues like full-scale updates to the online cluster.

Possible Solutions:

  • Provide secure development documentation, offering reasonable suggestions such as using namespace isolation when starting the Controller for local KubeBlocks development.

  • By default, limit the code from connecting to online clusters outside the local development environment, with the option to enable it through parameter settings.

  • Other potentially reasonable solutions.

Y-Rookie avatar Jul 17 '24 03:07 Y-Rookie