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

Narrow down kubelet-root-dir flag #5415

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions cmd/reset/reset.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@ func NewResetCmd() *cobra.Command {
},
}
cmd.PersistentFlags().AddFlagSet(config.GetPersistentFlagSet())
cmd.Flags().AddFlagSet(config.GetCriSocketFlag())
cmd.Flags().AddFlagSet(config.FileInputFlag())

flags := cmd.Flags()
flags.AddFlagSet(config.GetCriSocketFlag())
flags.AddFlagSet(config.FileInputFlag())
flags.String("kubelet-root-dir", "", "Kubelet root directory for k0s")

return cmd
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/config/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ func GetPersistentFlagSet() *pflag.FlagSet {
flagset.BoolVarP(&Debug, "debug", "d", false, "Debug logging (default: false)")
flagset.BoolVarP(&Verbose, "verbose", "v", false, "Verbose logging (default: false)")
flagset.String("data-dir", constant.DataDirDefault, "Data Directory for k0s. DO NOT CHANGE for an existing setup, things will break!")
flagset.String("kubelet-root-dir", "", "Kubelet root directory for k0s")
flagset.StringVar(&StatusSocket, "status-socket", "", "Full file path to the socket file. (default: <rundir>/status.sock)")
flagset.StringVar(&DebugListenOn, "debugListenOn", ":6060", "Http listenOn for Debug pprof handler")
return flagset
Expand Down Expand Up @@ -234,6 +233,7 @@ func GetWorkerFlags() *pflag.FlagSet {
workerOpts.LogLevels = DefaultLogLevels()
}

flagset.String("kubelet-root-dir", "", "Kubelet root directory for k0s")
flagset.StringVar(&workerOpts.WorkerProfile, "profile", "default", "worker profile to use on the node")
flagset.StringVar(&workerOpts.CIDRRange, "cidr-range", "10.96.0.0/12", "HACK: cidr range for the windows worker node")
flagset.BoolVar(&workerOpts.CloudProvider, "enable-cloud-provider", false, "Whether or not to enable cloud provider support in kubelet")
Expand Down
Loading