From 53b48fb4147a8d5ee85a6c755ba3e631ccd6ae7a Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Sat, 5 Mar 2016 20:31:26 -0500 Subject: [PATCH] Move a kubelet flag default to the right place All defaults belong in the struct, not the flags --- cmd/kubelet/app/options/options.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/kubelet/app/options/options.go b/cmd/kubelet/app/options/options.go index 3810768f779..f4b61cd9eb3 100644 --- a/cmd/kubelet/app/options/options.go +++ b/cmd/kubelet/app/options/options.go @@ -127,6 +127,7 @@ func NewKubeletServer() *KubeletServer { RegistryBurst: 10, RegistryPullQPS: 5.0, KubeletCgroups: "", + ResolverConfig: kubetypes.ResolvConfDefault, RktPath: "", RktAPIEndpoint: rkt.DefaultRktAPIServiceEndpoint, RktStage1Image: "", @@ -233,7 +234,7 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) { fs.StringVar(&s.DockerExecHandlerName, "docker-exec-handler", s.DockerExecHandlerName, "Handler to use when executing a command in a container. Valid values are 'native' and 'nsenter'. Defaults to 'native'.") fs.StringVar(&s.NonMasqueradeCIDR, "non-masquerade-cidr", s.NonMasqueradeCIDR, "Traffic to IPs outside this range will use IP masquerade.") fs.StringVar(&s.PodCIDR, "pod-cidr", "", "The CIDR to use for pod IP addresses, only used in standalone mode. In cluster mode, this is obtained from the master.") - fs.StringVar(&s.ResolverConfig, "resolv-conf", kubetypes.ResolvConfDefault, "Resolver configuration file used as the basis for the container DNS resolution configuration.") + fs.StringVar(&s.ResolverConfig, "resolv-conf", s.ResolverConfig, "Resolver configuration file used as the basis for the container DNS resolution configuration.") fs.BoolVar(&s.CPUCFSQuota, "cpu-cfs-quota", s.CPUCFSQuota, "Enable CPU CFS quota enforcement for containers that specify CPU limits") // Flags intended for testing, not recommended used in production environments. fs.BoolVar(&s.ReallyCrashForTesting, "really-crash-for-testing", s.ReallyCrashForTesting, "If true, when panics occur crash. Intended for testing.")