kubekey icon indicating copy to clipboard operation
kubekey copied to clipboard

A way to change the default settings

Open ppsite opened this issue 2 years ago • 2 comments

Your current KubeKey version

version.BuildInfo{Version:"2.2.1", GitCommit:"c056977c", GitTreeState:"", GoVersion:"go1.17.11"}

Describe this feature

background

sometimes, or even more often, we need to CUSTOMIZE the settings, ex: daemon.json, sysctl.conf;

unfortunately today, my daemon.json was rewrite by HARD CODE docker_config.go when the kubekey config sets as below:

# config-sample.yaml
  registry:
    privateRegistry: ""
    namespaceOverride: ""
    registryMirrors: ["https://xxx.xxx"]
    insecureRegistries: []

feature

Why Not Read the component configurations from local files which they can be defined by users themselves;

Describe the solution you'd like

  1. add new COMMAND LINE params: --export-defaults so that an operator can export the settings into local files somewhere, maybe current dir

  2. when kubekey create cluster/upgrade, read config from local files if they exist, instead of render by HARD CODE


Here is a more conveniently way to INTERACTION with users, Another way of API.

Additional information

No response

ppsite avatar Jul 01 '22 08:07 ppsite

/kind feature-request

24sama avatar Jul 01 '22 08:07 24sama

after kk install steps, we can change the file by yourself. I don't think this is good suggest on update system level setting by kk.

xiaods avatar Aug 14 '22 08:08 xiaods