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

Replace --init-config-dir with --config #57624

Merged
merged 1 commit into from
Jan 2, 2018

Conversation

mtaufen
Copy link
Contributor

@mtaufen mtaufen commented Dec 26, 2017

Rather than a directory with magic names, just give the Kubelet a file path.
Was originally in #55718, but I'm splitting it out for clarity.

Fixes #57763

The alpha `--init-config-dir` flag has been removed. Instead, use the `--config` flag to reference a kubelet configuration file directly.

@mtaufen mtaufen added area/kubelet area/kubelet-api sig/node Categorizes an issue or PR as relevant to SIG Node. labels Dec 26, 2017
@mtaufen mtaufen added this to the v1.10 milestone Dec 26, 2017
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Dec 26, 2017
@liggitt
Copy link
Member

liggitt commented Dec 26, 2017

Lgtm modulo question on flag name

@@ -325,7 +325,7 @@ func (f *KubeletFlags) AddFlags(fs *pflag.FlagSet) {
fs.StringVar(&f.RootDirectory, "root-dir", f.RootDirectory, "Directory path for managing kubelet files (volume mounts,etc).")

fs.Var(&f.DynamicConfigDir, "dynamic-config-dir", "The Kubelet will use this directory for checkpointing downloaded configurations and tracking configuration health. The Kubelet will create this directory if it does not already exist. The path may be absolute or relative; relative paths start at the Kubelet's current working directory. Providing this flag enables dynamic Kubelet configuration. Presently, you must also enable the DynamicKubeletConfig feature gate to pass this flag.")
fs.Var(&f.InitConfigDir, "init-config-dir", "The Kubelet will look in this directory for the init configuration. The path may be absolute or relative; relative paths start at the Kubelet's current working directory. Omit this argument to use the built-in default configuration values. Presently, you must also enable the KubeletConfigFile feature gate to pass this flag.")
fs.Var(&f.KubeletConfigFile, "kubelet-config-file", "The Kubelet will load its initial configuration from this file. The path may be absolute or relative; relative paths start at the Kubelet's current working directory. Omit this flag to use the built-in default configuration values. You must also enable the KubeletConfigFile feature gate to pass this flag.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Harmonize with --config flag in kube-proxy? kubelet prefix seems unnecessary

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--pod-manifest-dir used to be --config. If that's no problem, given that the old --config is long gone, happy to harmonize.

https://github.com/kubernetes/kubernetes/blob/release-1.4/cmd/kubelet/app/options/options.go#L87

@mtaufen mtaufen changed the title Replace --init-config-dir with --kubelet-config-file Replace --init-config-dir with --config Dec 27, 2017
@mtaufen
Copy link
Contributor Author

mtaufen commented Dec 27, 2017

@liggitt I decided it's probably not a big deal to use --config. Let me know what you think.

@mtaufen
Copy link
Contributor Author

mtaufen commented Dec 27, 2017

/retest

@xiangpengzhao
Copy link
Contributor

/sub
This will have some influence on kubeadm. /cc @luxas

@mtaufen mtaufen mentioned this pull request Jan 2, 2018
@liggitt
Copy link
Member

liggitt commented Jan 2, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 2, 2018
@mtaufen
Copy link
Contributor Author

mtaufen commented Jan 2, 2018

/retest

@dchen1107
Copy link
Member

dchen1107 commented Jan 2, 2018

Can you summarize the reason of the decision here for a record for the future reference? Besides that, lgtm

@mtaufen
Copy link
Contributor Author

mtaufen commented Jan 2, 2018

Sure:
Handing the Kubelet a directory path and expecting users to put their kubelet configuration in a file with a magic name in that directory is less flexible, less obvious, and less user-friendly than allowing users to just specify a path to an arbitrary file. The Kubelet shouldn't care about what name a user wants on the config file, and this is more consistent with other Kubelet file-specification APIs, such as --kubeconfig.

@dchen1107
Copy link
Member

/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dchen1107, liggitt, mtaufen

Associated issue: #55718

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 2, 2018
@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 57651, 56411, 56779, 57523, 57624). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 5aacc8e into kubernetes:master Jan 2, 2018
@luxas
Copy link
Member

luxas commented Jan 3, 2018

Thanks @mtaufen, very happy with this approach 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubelet area/kubelet-api cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/node Categorizes an issue or PR as relevant to SIG Node. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants