diff --git a/cmd/kubelet/app/options/options.go b/cmd/kubelet/app/options/options.go index 16bb74d4bb2..795bcd60639 100644 --- a/cmd/kubelet/app/options/options.go +++ b/cmd/kubelet/app/options/options.go @@ -85,6 +85,7 @@ func NewKubeletServer() *KubeletServer { CgroupRoot: "", ConfigureCBR0: false, ContainerRuntime: "docker", + RuntimeRequestTimeout: unversioned.Duration{Duration: 2 * time.Minute}, CPUCFSQuota: true, DockerExecHandlerName: "native", EventBurst: 10, @@ -227,6 +228,7 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) { fs.StringVar(&s.CgroupRoot, "cgroup-root", s.CgroupRoot, "Optional root cgroup to use for pods. This is handled by the container runtime on a best effort basis. Default: '', which means use the container runtime default.") fs.StringVar(&s.ContainerRuntime, "container-runtime", s.ContainerRuntime, "The container runtime to use. Possible values: 'docker', 'rkt'. Default: 'docker'.") + fs.DurationVar(&s.RuntimeRequestTimeout.Duration, "runtime-request-timeout", s.RuntimeRequestTimeout.Duration, "Timeout of all runtime requests except long running request - pull, logs, exec and attach. When timeout exceeded, kubelet will cancel the request, throw out an error and retry later. Default: 2m0s") fs.StringVar(&s.LockFilePath, "lock-file", s.LockFilePath, " The path to file for kubelet to use as a lock file.") fs.BoolVar(&s.ExitOnLockContention, "exit-on-lock-contention", s.ExitOnLockContention, "Whether kubelet should exit upon lock-file contention.") fs.StringVar(&s.RktPath, "rkt-path", s.RktPath, "Path of rkt binary. Leave empty to use the first rkt in $PATH. Only used if --container-runtime='rkt'.") diff --git a/cmd/kubelet/app/server.go b/cmd/kubelet/app/server.go index cfea5fe0157..a106e37f0ac 100644 --- a/cmd/kubelet/app/server.go +++ b/cmd/kubelet/app/server.go @@ -210,9 +210,10 @@ func UnsecuredKubeletConfig(s *options.KubeletServer) (*KubeletConfig, error) { ConfigureCBR0: s.ConfigureCBR0, ContainerManager: nil, ContainerRuntime: s.ContainerRuntime, + RuntimeRequestTimeout: s.RuntimeRequestTimeout.Duration, CPUCFSQuota: s.CPUCFSQuota, DiskSpacePolicy: diskSpacePolicy, - DockerClient: dockertools.ConnectToDockerOrDie(s.DockerEndpoint), + DockerClient: dockertools.ConnectToDockerOrDie(s.DockerEndpoint, s.RuntimeRequestTimeout.Duration), // TODO(random-liu): Set RuntimeRequestTimeout for rkt. RuntimeCgroups: s.RuntimeCgroups, DockerExecHandler: dockerExecHandler, EnableControllerAttachDetach: s.EnableControllerAttachDetach, @@ -783,6 +784,7 @@ type KubeletConfig struct { ConfigureCBR0 bool ContainerManager cm.ContainerManager ContainerRuntime string + RuntimeRequestTimeout time.Duration CPUCFSQuota bool DiskSpacePolicy kubelet.DiskSpacePolicy DockerClient dockertools.DockerInterface @@ -923,6 +925,7 @@ func CreateAndInitKubelet(kc *KubeletConfig) (k KubeletBootstrap, pc *config.Pod kc.OSInterface, kc.CgroupRoot, kc.ContainerRuntime, + kc.RuntimeRequestTimeout, kc.RktPath, kc.RktAPIEndpoint, kc.RktStage1Image, diff --git a/contrib/mesos/pkg/executor/executor_test.go b/contrib/mesos/pkg/executor/executor_test.go index 095511be3fe..519904072e6 100644 --- a/contrib/mesos/pkg/executor/executor_test.go +++ b/contrib/mesos/pkg/executor/executor_test.go @@ -184,7 +184,7 @@ func TestExecutorLaunchAndKillTask(t *testing.T) { mockDriver = &MockExecutorDriver{} registry = newFakeRegistry() executor = New(Config{ - Docker: dockertools.ConnectToDockerOrDie("fake://"), + Docker: dockertools.ConnectToDockerOrDie("fake://", 0), NodeInfos: make(chan NodeInfo, 1), Registry: registry, }) @@ -387,7 +387,7 @@ func TestExecutorFrameworkMessage(t *testing.T) { kubeletFinished = make(chan struct{}) registry = newFakeRegistry() executor = New(Config{ - Docker: dockertools.ConnectToDockerOrDie("fake://"), + Docker: dockertools.ConnectToDockerOrDie("fake://", 0), NodeInfos: make(chan NodeInfo, 1), ShutdownAlert: func() { close(kubeletFinished) @@ -584,7 +584,7 @@ func TestExecutorShutdown(t *testing.T) { kubeletFinished = make(chan struct{}) exitCalled = int32(0) executor = New(Config{ - Docker: dockertools.ConnectToDockerOrDie("fake://"), + Docker: dockertools.ConnectToDockerOrDie("fake://", 0), NodeInfos: make(chan NodeInfo, 1), ShutdownAlert: func() { close(kubeletFinished) diff --git a/contrib/mesos/pkg/executor/mock_test.go b/contrib/mesos/pkg/executor/mock_test.go index fe70393a0b8..1aec5ade132 100644 --- a/contrib/mesos/pkg/executor/mock_test.go +++ b/contrib/mesos/pkg/executor/mock_test.go @@ -75,7 +75,7 @@ func (m *MockExecutorDriver) SendFrameworkMessage(msg string) (mesosproto.Status func NewTestKubernetesExecutor() *Executor { return New(Config{ - Docker: dockertools.ConnectToDockerOrDie("fake://"), + Docker: dockertools.ConnectToDockerOrDie("fake://", 0), Registry: newFakeRegistry(), }) } diff --git a/contrib/mesos/pkg/executor/service/service.go b/contrib/mesos/pkg/executor/service/service.go index a8b336b2deb..03c2612c8a8 100644 --- a/contrib/mesos/pkg/executor/service/service.go +++ b/contrib/mesos/pkg/executor/service/service.go @@ -107,7 +107,7 @@ func (s *KubeletExecutorServer) runExecutor( exec := executor.New(executor.Config{ Registry: registry, APIClient: apiclient, - Docker: dockertools.ConnectToDockerOrDie(s.DockerEndpoint), + Docker: dockertools.ConnectToDockerOrDie(s.DockerEndpoint, 0), SuicideTimeout: s.SuicideTimeout, KubeletFinished: kubeletFinished, ExitFunc: os.Exit, diff --git a/hack/verify-flags/known-flags.txt b/hack/verify-flags/known-flags.txt index 2350926addf..44185ce93bc 100644 --- a/hack/verify-flags/known-flags.txt +++ b/hack/verify-flags/known-flags.txt @@ -399,6 +399,7 @@ root-dir run-proxy runtime-cgroups runtime-config +runtime-request-timeout save-config scheduler-config scheduler-name diff --git a/pkg/apis/componentconfig/deep_copy_generated.go b/pkg/apis/componentconfig/deep_copy_generated.go index 4cd5f309585..c18e2e5c319 100644 --- a/pkg/apis/componentconfig/deep_copy_generated.go +++ b/pkg/apis/componentconfig/deep_copy_generated.go @@ -273,6 +273,9 @@ func DeepCopy_componentconfig_KubeletConfiguration(in KubeletConfiguration, out out.SystemCgroups = in.SystemCgroups out.CgroupRoot = in.CgroupRoot out.ContainerRuntime = in.ContainerRuntime + if err := unversioned.DeepCopy_unversioned_Duration(in.RuntimeRequestTimeout, &out.RuntimeRequestTimeout, c); err != nil { + return err + } out.RktPath = in.RktPath out.RktAPIEndpoint = in.RktAPIEndpoint out.RktStage1Image = in.RktStage1Image diff --git a/pkg/apis/componentconfig/types.generated.go b/pkg/apis/componentconfig/types.generated.go index 8ba9367891f..b76ca11f99b 100644 --- a/pkg/apis/componentconfig/types.generated.go +++ b/pkg/apis/componentconfig/types.generated.go @@ -1175,7 +1175,7 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [90]bool + var yyq2 [91]bool _, _, _ = yysep2, yyq2, yy2arr2 const yyr2 bool = false yyq2[48] = x.CloudProvider != "" @@ -1184,19 +1184,20 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { yyq2[51] = x.RuntimeCgroups != "" yyq2[52] = x.SystemCgroups != "" yyq2[53] = x.CgroupRoot != "" - yyq2[55] = x.RktPath != "" - yyq2[56] = x.RktAPIEndpoint != "" - yyq2[57] = x.RktStage1Image != "" - yyq2[78] = true - yyq2[79] = x.NodeIP != "" - yyq2[83] = x.EvictionHard != "" - yyq2[84] = x.EvictionSoft != "" - yyq2[85] = x.EvictionSoftGracePeriod != "" - yyq2[86] = true - yyq2[87] = x.EvictionMaxPodGracePeriod != 0 + yyq2[55] = true + yyq2[56] = x.RktPath != "" + yyq2[57] = x.RktAPIEndpoint != "" + yyq2[58] = x.RktStage1Image != "" + yyq2[79] = true + yyq2[80] = x.NodeIP != "" + yyq2[84] = x.EvictionHard != "" + yyq2[85] = x.EvictionSoft != "" + yyq2[86] = x.EvictionSoftGracePeriod != "" + yyq2[87] = true + yyq2[88] = x.EvictionMaxPodGracePeriod != 0 var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(90) + r.EncodeArrayStart(91) } else { yynn2 = 74 for _, b := range yyq2 { @@ -2355,22 +2356,55 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[55] { - yym185 := z.EncBinary() - _ = yym185 + yy185 := &x.RuntimeRequestTimeout + yym186 := z.EncBinary() + _ = yym186 if false { + } else if z.HasExtensions() && z.EncExt(yy185) { + } else if !yym186 && z.IsJSONHandle() { + z.EncJSONMarshal(yy185) } else { - r.EncodeString(codecSelferC_UTF81234, string(x.RktPath)) + z.EncFallback(yy185) } } else { - r.EncodeString(codecSelferC_UTF81234, "") + r.EncodeNil() } } else { if yyq2[55] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("runtimeRequestTimeout")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy187 := &x.RuntimeRequestTimeout + yym188 := z.EncBinary() + _ = yym188 + if false { + } else if z.HasExtensions() && z.EncExt(yy187) { + } else if !yym188 && z.IsJSONHandle() { + z.EncJSONMarshal(yy187) + } else { + z.EncFallback(yy187) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[56] { + yym190 := z.EncBinary() + _ = yym190 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.RktPath)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[56] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("rktPath")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym186 := z.EncBinary() - _ = yym186 + yym191 := z.EncBinary() + _ = yym191 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.RktPath)) @@ -2379,9 +2413,9 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[56] { - yym188 := z.EncBinary() - _ = yym188 + if yyq2[57] { + yym193 := z.EncBinary() + _ = yym193 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.RktAPIEndpoint)) @@ -2390,12 +2424,12 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2[56] { + if yyq2[57] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("rktAPIEndpoint")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym189 := z.EncBinary() - _ = yym189 + yym194 := z.EncBinary() + _ = yym194 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.RktAPIEndpoint)) @@ -2404,9 +2438,9 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[57] { - yym191 := z.EncBinary() - _ = yym191 + if yyq2[58] { + yym196 := z.EncBinary() + _ = yym196 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.RktStage1Image)) @@ -2415,12 +2449,12 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2[57] { + if yyq2[58] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("rktStage1Image")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym192 := z.EncBinary() - _ = yym192 + yym197 := z.EncBinary() + _ = yym197 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.RktStage1Image)) @@ -2429,8 +2463,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym194 := z.EncBinary() - _ = yym194 + yym199 := z.EncBinary() + _ = yym199 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.LockFilePath)) @@ -2439,8 +2473,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("lockFilePath")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym195 := z.EncBinary() - _ = yym195 + yym200 := z.EncBinary() + _ = yym200 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.LockFilePath)) @@ -2448,8 +2482,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym197 := z.EncBinary() - _ = yym197 + yym202 := z.EncBinary() + _ = yym202 if false { } else { r.EncodeBool(bool(x.ExitOnLockContention)) @@ -2458,8 +2492,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("exitOnLockContention")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym198 := z.EncBinary() - _ = yym198 + yym203 := z.EncBinary() + _ = yym203 if false { } else { r.EncodeBool(bool(x.ExitOnLockContention)) @@ -2467,8 +2501,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym200 := z.EncBinary() - _ = yym200 + yym205 := z.EncBinary() + _ = yym205 if false { } else { r.EncodeBool(bool(x.ConfigureCBR0)) @@ -2477,8 +2511,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("configureCbr0")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym201 := z.EncBinary() - _ = yym201 + yym206 := z.EncBinary() + _ = yym206 if false { } else { r.EncodeBool(bool(x.ConfigureCBR0)) @@ -2486,8 +2520,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym203 := z.EncBinary() - _ = yym203 + yym208 := z.EncBinary() + _ = yym208 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.HairpinMode)) @@ -2496,8 +2530,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hairpinMode")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym204 := z.EncBinary() - _ = yym204 + yym209 := z.EncBinary() + _ = yym209 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.HairpinMode)) @@ -2505,8 +2539,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym206 := z.EncBinary() - _ = yym206 + yym211 := z.EncBinary() + _ = yym211 if false { } else { r.EncodeBool(bool(x.BabysitDaemons)) @@ -2515,8 +2549,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("babysitDaemons")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym207 := z.EncBinary() - _ = yym207 + yym212 := z.EncBinary() + _ = yym212 if false { } else { r.EncodeBool(bool(x.BabysitDaemons)) @@ -2524,8 +2558,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym209 := z.EncBinary() - _ = yym209 + yym214 := z.EncBinary() + _ = yym214 if false { } else { r.EncodeInt(int64(x.MaxPods)) @@ -2534,8 +2568,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("maxPods")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym210 := z.EncBinary() - _ = yym210 + yym215 := z.EncBinary() + _ = yym215 if false { } else { r.EncodeInt(int64(x.MaxPods)) @@ -2543,8 +2577,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym212 := z.EncBinary() - _ = yym212 + yym217 := z.EncBinary() + _ = yym217 if false { } else { r.EncodeInt(int64(x.NvidiaGPUs)) @@ -2553,8 +2587,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nvidiaGPUs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym213 := z.EncBinary() - _ = yym213 + yym218 := z.EncBinary() + _ = yym218 if false { } else { r.EncodeInt(int64(x.NvidiaGPUs)) @@ -2562,8 +2596,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym215 := z.EncBinary() - _ = yym215 + yym220 := z.EncBinary() + _ = yym220 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.DockerExecHandlerName)) @@ -2572,8 +2606,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("dockerExecHandlerName")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym216 := z.EncBinary() - _ = yym216 + yym221 := z.EncBinary() + _ = yym221 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.DockerExecHandlerName)) @@ -2581,8 +2615,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym218 := z.EncBinary() - _ = yym218 + yym223 := z.EncBinary() + _ = yym223 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PodCIDR)) @@ -2591,8 +2625,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("podCIDR")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym219 := z.EncBinary() - _ = yym219 + yym224 := z.EncBinary() + _ = yym224 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PodCIDR)) @@ -2600,8 +2634,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym221 := z.EncBinary() - _ = yym221 + yym226 := z.EncBinary() + _ = yym226 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ResolverConfig)) @@ -2610,8 +2644,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("resolvConf")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym222 := z.EncBinary() - _ = yym222 + yym227 := z.EncBinary() + _ = yym227 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ResolverConfig)) @@ -2619,8 +2653,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym224 := z.EncBinary() - _ = yym224 + yym229 := z.EncBinary() + _ = yym229 if false { } else { r.EncodeBool(bool(x.CPUCFSQuota)) @@ -2629,8 +2663,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("cpuCFSQuota")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym225 := z.EncBinary() - _ = yym225 + yym230 := z.EncBinary() + _ = yym230 if false { } else { r.EncodeBool(bool(x.CPUCFSQuota)) @@ -2638,8 +2672,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym227 := z.EncBinary() - _ = yym227 + yym232 := z.EncBinary() + _ = yym232 if false { } else { r.EncodeBool(bool(x.Containerized)) @@ -2648,8 +2682,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("containerized")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym228 := z.EncBinary() - _ = yym228 + yym233 := z.EncBinary() + _ = yym233 if false { } else { r.EncodeBool(bool(x.Containerized)) @@ -2657,8 +2691,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym230 := z.EncBinary() - _ = yym230 + yym235 := z.EncBinary() + _ = yym235 if false { } else { r.EncodeUint(uint64(x.MaxOpenFiles)) @@ -2667,8 +2701,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("maxOpenFiles")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym231 := z.EncBinary() - _ = yym231 + yym236 := z.EncBinary() + _ = yym236 if false { } else { r.EncodeUint(uint64(x.MaxOpenFiles)) @@ -2676,8 +2710,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym233 := z.EncBinary() - _ = yym233 + yym238 := z.EncBinary() + _ = yym238 if false { } else { r.EncodeBool(bool(x.ReconcileCIDR)) @@ -2686,8 +2720,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("reconcileCIDR")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym234 := z.EncBinary() - _ = yym234 + yym239 := z.EncBinary() + _ = yym239 if false { } else { r.EncodeBool(bool(x.ReconcileCIDR)) @@ -2695,8 +2729,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym236 := z.EncBinary() - _ = yym236 + yym241 := z.EncBinary() + _ = yym241 if false { } else { r.EncodeBool(bool(x.RegisterSchedulable)) @@ -2705,8 +2739,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("registerSchedulable")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym237 := z.EncBinary() - _ = yym237 + yym242 := z.EncBinary() + _ = yym242 if false { } else { r.EncodeBool(bool(x.RegisterSchedulable)) @@ -2714,8 +2748,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym239 := z.EncBinary() - _ = yym239 + yym244 := z.EncBinary() + _ = yym244 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ContentType)) @@ -2724,8 +2758,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("contentType")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym240 := z.EncBinary() - _ = yym240 + yym245 := z.EncBinary() + _ = yym245 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ContentType)) @@ -2733,8 +2767,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym242 := z.EncBinary() - _ = yym242 + yym247 := z.EncBinary() + _ = yym247 if false { } else { r.EncodeFloat32(float32(x.KubeAPIQPS)) @@ -2743,8 +2777,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeAPIQPS")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym243 := z.EncBinary() - _ = yym243 + yym248 := z.EncBinary() + _ = yym248 if false { } else { r.EncodeFloat32(float32(x.KubeAPIQPS)) @@ -2752,8 +2786,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym245 := z.EncBinary() - _ = yym245 + yym250 := z.EncBinary() + _ = yym250 if false { } else { r.EncodeInt(int64(x.KubeAPIBurst)) @@ -2762,8 +2796,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeAPIBurst")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym246 := z.EncBinary() - _ = yym246 + yym251 := z.EncBinary() + _ = yym251 if false { } else { r.EncodeInt(int64(x.KubeAPIBurst)) @@ -2771,8 +2805,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym248 := z.EncBinary() - _ = yym248 + yym253 := z.EncBinary() + _ = yym253 if false { } else { r.EncodeBool(bool(x.SerializeImagePulls)) @@ -2781,8 +2815,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("serializeImagePulls")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym249 := z.EncBinary() - _ = yym249 + yym254 := z.EncBinary() + _ = yym254 if false { } else { r.EncodeBool(bool(x.SerializeImagePulls)) @@ -2790,8 +2824,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym251 := z.EncBinary() - _ = yym251 + yym256 := z.EncBinary() + _ = yym256 if false { } else { r.EncodeBool(bool(x.ExperimentalFlannelOverlay)) @@ -2800,8 +2834,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("experimentalFlannelOverlay")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym252 := z.EncBinary() - _ = yym252 + yym257 := z.EncBinary() + _ = yym257 if false { } else { r.EncodeBool(bool(x.ExperimentalFlannelOverlay)) @@ -2809,42 +2843,42 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[78] { - yy254 := &x.OutOfDiskTransitionFrequency - yym255 := z.EncBinary() - _ = yym255 + if yyq2[79] { + yy259 := &x.OutOfDiskTransitionFrequency + yym260 := z.EncBinary() + _ = yym260 if false { - } else if z.HasExtensions() && z.EncExt(yy254) { - } else if !yym255 && z.IsJSONHandle() { - z.EncJSONMarshal(yy254) + } else if z.HasExtensions() && z.EncExt(yy259) { + } else if !yym260 && z.IsJSONHandle() { + z.EncJSONMarshal(yy259) } else { - z.EncFallback(yy254) + z.EncFallback(yy259) } } else { r.EncodeNil() } } else { - if yyq2[78] { + if yyq2[79] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("outOfDiskTransitionFrequency")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy256 := &x.OutOfDiskTransitionFrequency - yym257 := z.EncBinary() - _ = yym257 + yy261 := &x.OutOfDiskTransitionFrequency + yym262 := z.EncBinary() + _ = yym262 if false { - } else if z.HasExtensions() && z.EncExt(yy256) { - } else if !yym257 && z.IsJSONHandle() { - z.EncJSONMarshal(yy256) + } else if z.HasExtensions() && z.EncExt(yy261) { + } else if !yym262 && z.IsJSONHandle() { + z.EncJSONMarshal(yy261) } else { - z.EncFallback(yy256) + z.EncFallback(yy261) } } } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[79] { - yym259 := z.EncBinary() - _ = yym259 + if yyq2[80] { + yym264 := z.EncBinary() + _ = yym264 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.NodeIP)) @@ -2853,12 +2887,12 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2[79] { + if yyq2[80] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nodeIP")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym260 := z.EncBinary() - _ = yym260 + yym265 := z.EncBinary() + _ = yym265 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.NodeIP)) @@ -2870,8 +2904,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { if x.NodeLabels == nil { r.EncodeNil() } else { - yym262 := z.EncBinary() - _ = yym262 + yym267 := z.EncBinary() + _ = yym267 if false { } else { z.F.EncMapStringStringV(x.NodeLabels, false, e) @@ -2884,8 +2918,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { if x.NodeLabels == nil { r.EncodeNil() } else { - yym263 := z.EncBinary() - _ = yym263 + yym268 := z.EncBinary() + _ = yym268 if false { } else { z.F.EncMapStringStringV(x.NodeLabels, false, e) @@ -2894,8 +2928,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym265 := z.EncBinary() - _ = yym265 + yym270 := z.EncBinary() + _ = yym270 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.NonMasqueradeCIDR)) @@ -2904,8 +2938,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nonMasqueradeCIDR")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym266 := z.EncBinary() - _ = yym266 + yym271 := z.EncBinary() + _ = yym271 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.NonMasqueradeCIDR)) @@ -2913,8 +2947,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym268 := z.EncBinary() - _ = yym268 + yym273 := z.EncBinary() + _ = yym273 if false { } else { r.EncodeBool(bool(x.EnableCustomMetrics)) @@ -2923,8 +2957,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("enableCustomMetrics")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym269 := z.EncBinary() - _ = yym269 + yym274 := z.EncBinary() + _ = yym274 if false { } else { r.EncodeBool(bool(x.EnableCustomMetrics)) @@ -2932,9 +2966,9 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[83] { - yym271 := z.EncBinary() - _ = yym271 + if yyq2[84] { + yym276 := z.EncBinary() + _ = yym276 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.EvictionHard)) @@ -2943,51 +2977,26 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2[83] { + if yyq2[84] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("evictionHard")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym272 := z.EncBinary() - _ = yym272 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.EvictionHard)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[84] { - yym274 := z.EncBinary() - _ = yym274 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.EvictionSoft)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[84] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("evictionSoft")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym275 := z.EncBinary() - _ = yym275 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.EvictionSoft)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[85] { yym277 := z.EncBinary() _ = yym277 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(x.EvictionSoftGracePeriod)) + r.EncodeString(codecSelferC_UTF81234, string(x.EvictionHard)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[85] { + yym279 := z.EncBinary() + _ = yym279 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.EvictionSoft)) } } else { r.EncodeString(codecSelferC_UTF81234, "") @@ -2995,54 +3004,79 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } else { if yyq2[85] { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("evictionSoftGracePeriod")) + r.EncodeString(codecSelferC_UTF81234, string("evictionSoft")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym278 := z.EncBinary() - _ = yym278 + yym280 := z.EncBinary() + _ = yym280 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(x.EvictionSoftGracePeriod)) + r.EncodeString(codecSelferC_UTF81234, string(x.EvictionSoft)) } } } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[86] { - yy280 := &x.EvictionPressureTransitionPeriod - yym281 := z.EncBinary() - _ = yym281 + yym282 := z.EncBinary() + _ = yym282 if false { - } else if z.HasExtensions() && z.EncExt(yy280) { - } else if !yym281 && z.IsJSONHandle() { - z.EncJSONMarshal(yy280) } else { - z.EncFallback(yy280) + r.EncodeString(codecSelferC_UTF81234, string(x.EvictionSoftGracePeriod)) } } else { - r.EncodeNil() + r.EncodeString(codecSelferC_UTF81234, "") } } else { if yyq2[86] { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("evictionPressureTransitionPeriod")) + r.EncodeString(codecSelferC_UTF81234, string("evictionSoftGracePeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy282 := &x.EvictionPressureTransitionPeriod yym283 := z.EncBinary() _ = yym283 if false { - } else if z.HasExtensions() && z.EncExt(yy282) { - } else if !yym283 && z.IsJSONHandle() { - z.EncJSONMarshal(yy282) } else { - z.EncFallback(yy282) + r.EncodeString(codecSelferC_UTF81234, string(x.EvictionSoftGracePeriod)) } } } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[87] { - yym285 := z.EncBinary() - _ = yym285 + yy285 := &x.EvictionPressureTransitionPeriod + yym286 := z.EncBinary() + _ = yym286 + if false { + } else if z.HasExtensions() && z.EncExt(yy285) { + } else if !yym286 && z.IsJSONHandle() { + z.EncJSONMarshal(yy285) + } else { + z.EncFallback(yy285) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[87] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("evictionPressureTransitionPeriod")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy287 := &x.EvictionPressureTransitionPeriod + yym288 := z.EncBinary() + _ = yym288 + if false { + } else if z.HasExtensions() && z.EncExt(yy287) { + } else if !yym288 && z.IsJSONHandle() { + z.EncJSONMarshal(yy287) + } else { + z.EncFallback(yy287) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[88] { + yym290 := z.EncBinary() + _ = yym290 if false { } else { r.EncodeInt(int64(x.EvictionMaxPodGracePeriod)) @@ -3051,12 +3085,12 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq2[87] { + if yyq2[88] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("evictionMaxPodGracePeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym286 := z.EncBinary() - _ = yym286 + yym291 := z.EncBinary() + _ = yym291 if false { } else { r.EncodeInt(int64(x.EvictionMaxPodGracePeriod)) @@ -3065,8 +3099,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym288 := z.EncBinary() - _ = yym288 + yym293 := z.EncBinary() + _ = yym293 if false { } else { r.EncodeInt(int64(x.PodsPerCore)) @@ -3075,8 +3109,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("podsPerCore")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym289 := z.EncBinary() - _ = yym289 + yym294 := z.EncBinary() + _ = yym294 if false { } else { r.EncodeInt(int64(x.PodsPerCore)) @@ -3084,8 +3118,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym291 := z.EncBinary() - _ = yym291 + yym296 := z.EncBinary() + _ = yym296 if false { } else { r.EncodeBool(bool(x.EnableControllerAttachDetach)) @@ -3094,8 +3128,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("enableControllerAttachDetach")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym292 := z.EncBinary() - _ = yym292 + yym297 := z.EncBinary() + _ = yym297 if false { } else { r.EncodeBool(bool(x.EnableControllerAttachDetach)) @@ -3564,6 +3598,21 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode } else { x.ContainerRuntime = string(r.DecodeString()) } + case "runtimeRequestTimeout": + if r.TryDecodeAsNil() { + x.RuntimeRequestTimeout = pkg1_unversioned.Duration{} + } else { + yyv67 := &x.RuntimeRequestTimeout + yym68 := z.DecBinary() + _ = yym68 + if false { + } else if z.HasExtensions() && z.DecExt(yyv67) { + } else if !yym68 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv67) + } else { + z.DecFallback(yyv67, false) + } + } case "rktPath": if r.TryDecodeAsNil() { x.RktPath = "" @@ -3706,15 +3755,15 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.OutOfDiskTransitionFrequency = pkg1_unversioned.Duration{} } else { - yyv90 := &x.OutOfDiskTransitionFrequency - yym91 := z.DecBinary() - _ = yym91 + yyv92 := &x.OutOfDiskTransitionFrequency + yym93 := z.DecBinary() + _ = yym93 if false { - } else if z.HasExtensions() && z.DecExt(yyv90) { - } else if !yym91 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv90) + } else if z.HasExtensions() && z.DecExt(yyv92) { + } else if !yym93 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv92) } else { - z.DecFallback(yyv90, false) + z.DecFallback(yyv92, false) } } case "nodeIP": @@ -3727,12 +3776,12 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.NodeLabels = nil } else { - yyv93 := &x.NodeLabels - yym94 := z.DecBinary() - _ = yym94 + yyv95 := &x.NodeLabels + yym96 := z.DecBinary() + _ = yym96 if false { } else { - z.F.DecMapStringStringX(yyv93, false, d) + z.F.DecMapStringStringX(yyv95, false, d) } } case "nonMasqueradeCIDR": @@ -3769,15 +3818,15 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.EvictionPressureTransitionPeriod = pkg1_unversioned.Duration{} } else { - yyv100 := &x.EvictionPressureTransitionPeriod - yym101 := z.DecBinary() - _ = yym101 + yyv102 := &x.EvictionPressureTransitionPeriod + yym103 := z.DecBinary() + _ = yym103 if false { - } else if z.HasExtensions() && z.DecExt(yyv100) { - } else if !yym101 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv100) + } else if z.HasExtensions() && z.DecExt(yyv102) { + } else if !yym103 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv102) } else { - z.DecFallback(yyv100, false) + z.DecFallback(yyv102, false) } } case "evictionMaxPodGracePeriod": @@ -3809,16 +3858,16 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj105 int - var yyb105 bool - var yyhl105 bool = l >= 0 - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + var yyj107 int + var yyb107 bool + var yyhl107 bool = l >= 0 + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3828,13 +3877,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.Config = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3842,32 +3891,7 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.SyncFrequency = pkg1_unversioned.Duration{} } else { - yyv107 := &x.SyncFrequency - yym108 := z.DecBinary() - _ = yym108 - if false { - } else if z.HasExtensions() && z.DecExt(yyv107) { - } else if !yym108 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv107) - } else { - z.DecFallback(yyv107, false) - } - } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l - } else { - yyb105 = r.CheckBreak() - } - if yyb105 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.FileCheckFrequency = pkg1_unversioned.Duration{} - } else { - yyv109 := &x.FileCheckFrequency + yyv109 := &x.SyncFrequency yym110 := z.DecBinary() _ = yym110 if false { @@ -3878,21 +3902,21 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco z.DecFallback(yyv109, false) } } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.HTTPCheckFrequency = pkg1_unversioned.Duration{} + x.FileCheckFrequency = pkg1_unversioned.Duration{} } else { - yyv111 := &x.HTTPCheckFrequency + yyv111 := &x.FileCheckFrequency yym112 := z.DecBinary() _ = yym112 if false { @@ -3903,13 +3927,38 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco z.DecFallback(yyv111, false) } } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HTTPCheckFrequency = pkg1_unversioned.Duration{} + } else { + yyv113 := &x.HTTPCheckFrequency + yym114 := z.DecBinary() + _ = yym114 + if false { + } else if z.HasExtensions() && z.DecExt(yyv113) { + } else if !yym114 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv113) + } else { + z.DecFallback(yyv113, false) + } + } + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l + } else { + yyb107 = r.CheckBreak() + } + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3919,13 +3968,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ManifestURL = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3935,13 +3984,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ManifestURLHeader = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3951,13 +4000,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EnableServer = bool(r.DecodeBool()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3967,13 +4016,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.Address = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3983,13 +4032,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.Port = uint(r.DecodeUint(codecSelferBitsize1234)) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3999,13 +4048,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ReadOnlyPort = uint(r.DecodeUint(codecSelferBitsize1234)) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4015,13 +4064,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.TLSCertFile = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4031,13 +4080,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.TLSPrivateKeyFile = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4047,13 +4096,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CertDirectory = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4063,13 +4112,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.HostnameOverride = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4079,13 +4128,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.PodInfraContainerImage = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4095,13 +4144,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.DockerEndpoint = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4111,13 +4160,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RootDirectory = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4127,13 +4176,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.SeccompProfileRoot = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4143,13 +4192,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.AllowPrivileged = bool(r.DecodeBool()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4159,13 +4208,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.HostNetworkSources = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4175,13 +4224,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.HostPIDSources = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4191,13 +4240,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.HostIPCSources = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4207,13 +4256,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RegistryPullQPS = float64(r.DecodeFloat(false)) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4223,13 +4272,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RegistryBurst = int32(r.DecodeInt(32)) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4239,13 +4288,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EventRecordQPS = float32(r.DecodeFloat(true)) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4255,13 +4304,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EventBurst = int32(r.DecodeInt(32)) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4271,13 +4320,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EnableDebuggingHandlers = bool(r.DecodeBool()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4285,24 +4334,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.MinimumGCAge = pkg1_unversioned.Duration{} } else { - yyv136 := &x.MinimumGCAge - yym137 := z.DecBinary() - _ = yym137 + yyv138 := &x.MinimumGCAge + yym139 := z.DecBinary() + _ = yym139 if false { - } else if z.HasExtensions() && z.DecExt(yyv136) { - } else if !yym137 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv136) + } else if z.HasExtensions() && z.DecExt(yyv138) { + } else if !yym139 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv138) } else { - z.DecFallback(yyv136, false) + z.DecFallback(yyv138, false) } } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4312,13 +4361,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.MaxPerPodContainerCount = int32(r.DecodeInt(32)) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4328,13 +4377,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.MaxContainerCount = int32(r.DecodeInt(32)) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4344,13 +4393,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CAdvisorPort = uint(r.DecodeUint(codecSelferBitsize1234)) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4360,13 +4409,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.HealthzPort = int32(r.DecodeInt(32)) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4376,13 +4425,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.HealthzBindAddress = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4392,13 +4441,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.OOMScoreAdj = int32(r.DecodeInt(32)) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4408,13 +4457,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RegisterNode = bool(r.DecodeBool()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4424,13 +4473,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ClusterDomain = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4440,13 +4489,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.MasterServiceNamespace = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4456,13 +4505,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ClusterDNS = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4470,32 +4519,7 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.StreamingConnectionIdleTimeout = pkg1_unversioned.Duration{} } else { - yyv148 := &x.StreamingConnectionIdleTimeout - yym149 := z.DecBinary() - _ = yym149 - if false { - } else if z.HasExtensions() && z.DecExt(yyv148) { - } else if !yym149 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv148) - } else { - z.DecFallback(yyv148, false) - } - } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l - } else { - yyb105 = r.CheckBreak() - } - if yyb105 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.NodeStatusUpdateFrequency = pkg1_unversioned.Duration{} - } else { - yyv150 := &x.NodeStatusUpdateFrequency + yyv150 := &x.StreamingConnectionIdleTimeout yym151 := z.DecBinary() _ = yym151 if false { @@ -4506,21 +4530,21 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco z.DecFallback(yyv150, false) } } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ImageMinimumGCAge = pkg1_unversioned.Duration{} + x.NodeStatusUpdateFrequency = pkg1_unversioned.Duration{} } else { - yyv152 := &x.ImageMinimumGCAge + yyv152 := &x.NodeStatusUpdateFrequency yym153 := z.DecBinary() _ = yym153 if false { @@ -4531,13 +4555,38 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco z.DecFallback(yyv152, false) } } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ImageMinimumGCAge = pkg1_unversioned.Duration{} + } else { + yyv154 := &x.ImageMinimumGCAge + yym155 := z.DecBinary() + _ = yym155 + if false { + } else if z.HasExtensions() && z.DecExt(yyv154) { + } else if !yym155 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv154) + } else { + z.DecFallback(yyv154, false) + } + } + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l + } else { + yyb107 = r.CheckBreak() + } + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4547,13 +4596,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ImageGCHighThresholdPercent = int32(r.DecodeInt(32)) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4563,13 +4612,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ImageGCLowThresholdPercent = int32(r.DecodeInt(32)) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4579,13 +4628,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.LowDiskSpaceThresholdMB = int32(r.DecodeInt(32)) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4593,24 +4642,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.VolumeStatsAggPeriod = pkg1_unversioned.Duration{} } else { - yyv157 := &x.VolumeStatsAggPeriod - yym158 := z.DecBinary() - _ = yym158 + yyv159 := &x.VolumeStatsAggPeriod + yym160 := z.DecBinary() + _ = yym160 if false { - } else if z.HasExtensions() && z.DecExt(yyv157) { - } else if !yym158 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv157) + } else if z.HasExtensions() && z.DecExt(yyv159) { + } else if !yym160 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv159) } else { - z.DecFallback(yyv157, false) + z.DecFallback(yyv159, false) } } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4620,13 +4669,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.NetworkPluginName = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4636,13 +4685,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.NetworkPluginDir = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4652,13 +4701,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.VolumePluginDir = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4668,13 +4717,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CloudProvider = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4684,13 +4733,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CloudConfigFile = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4700,13 +4749,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.KubeletCgroups = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4716,13 +4765,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RuntimeCgroups = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4732,13 +4781,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.SystemCgroups = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4748,13 +4797,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CgroupRoot = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4764,13 +4813,38 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ContainerRuntime = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.RuntimeRequestTimeout = pkg1_unversioned.Duration{} + } else { + yyv171 := &x.RuntimeRequestTimeout + yym172 := z.DecBinary() + _ = yym172 + if false { + } else if z.HasExtensions() && z.DecExt(yyv171) { + } else if !yym172 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv171) + } else { + z.DecFallback(yyv171, false) + } + } + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l + } else { + yyb107 = r.CheckBreak() + } + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4780,13 +4854,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RktPath = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4796,13 +4870,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RktAPIEndpoint = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4812,13 +4886,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RktStage1Image = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4828,13 +4902,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.LockFilePath = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4844,13 +4918,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ExitOnLockContention = bool(r.DecodeBool()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4860,13 +4934,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ConfigureCBR0 = bool(r.DecodeBool()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4876,13 +4950,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.HairpinMode = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4892,13 +4966,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.BabysitDaemons = bool(r.DecodeBool()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4908,13 +4982,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.MaxPods = int32(r.DecodeInt(32)) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4924,13 +4998,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.NvidiaGPUs = int32(r.DecodeInt(32)) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4940,13 +5014,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.DockerExecHandlerName = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4956,13 +5030,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.PodCIDR = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4972,13 +5046,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ResolverConfig = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4988,13 +5062,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CPUCFSQuota = bool(r.DecodeBool()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5004,13 +5078,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.Containerized = bool(r.DecodeBool()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5020,13 +5094,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.MaxOpenFiles = uint64(r.DecodeUint(64)) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5036,13 +5110,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ReconcileCIDR = bool(r.DecodeBool()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5052,13 +5126,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RegisterSchedulable = bool(r.DecodeBool()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5068,13 +5142,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ContentType = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5084,13 +5158,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.KubeAPIQPS = float32(r.DecodeFloat(true)) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5100,13 +5174,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.KubeAPIBurst = int32(r.DecodeInt(32)) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5116,13 +5190,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.SerializeImagePulls = bool(r.DecodeBool()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5132,13 +5206,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ExperimentalFlannelOverlay = bool(r.DecodeBool()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5146,24 +5220,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.OutOfDiskTransitionFrequency = pkg1_unversioned.Duration{} } else { - yyv192 := &x.OutOfDiskTransitionFrequency - yym193 := z.DecBinary() - _ = yym193 + yyv196 := &x.OutOfDiskTransitionFrequency + yym197 := z.DecBinary() + _ = yym197 if false { - } else if z.HasExtensions() && z.DecExt(yyv192) { - } else if !yym193 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv192) + } else if z.HasExtensions() && z.DecExt(yyv196) { + } else if !yym197 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv196) } else { - z.DecFallback(yyv192, false) + z.DecFallback(yyv196, false) } } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5173,13 +5247,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.NodeIP = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5187,21 +5261,21 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.NodeLabels = nil } else { - yyv195 := &x.NodeLabels - yym196 := z.DecBinary() - _ = yym196 + yyv199 := &x.NodeLabels + yym200 := z.DecBinary() + _ = yym200 if false { } else { - z.F.DecMapStringStringX(yyv195, false, d) + z.F.DecMapStringStringX(yyv199, false, d) } } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5211,13 +5285,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.NonMasqueradeCIDR = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5227,13 +5301,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EnableCustomMetrics = bool(r.DecodeBool()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5243,13 +5317,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EvictionHard = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5259,13 +5333,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EvictionSoft = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5275,13 +5349,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EvictionSoftGracePeriod = string(r.DecodeString()) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5289,24 +5363,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.EvictionPressureTransitionPeriod = pkg1_unversioned.Duration{} } else { - yyv202 := &x.EvictionPressureTransitionPeriod - yym203 := z.DecBinary() - _ = yym203 + yyv206 := &x.EvictionPressureTransitionPeriod + yym207 := z.DecBinary() + _ = yym207 if false { - } else if z.HasExtensions() && z.DecExt(yyv202) { - } else if !yym203 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv202) + } else if z.HasExtensions() && z.DecExt(yyv206) { + } else if !yym207 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv206) } else { - z.DecFallback(yyv202, false) + z.DecFallback(yyv206, false) } } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5316,13 +5390,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EvictionMaxPodGracePeriod = int32(r.DecodeInt(32)) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5332,13 +5406,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.PodsPerCore = int32(r.DecodeInt(32)) } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5349,17 +5423,17 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco x.EnableControllerAttachDetach = bool(r.DecodeBool()) } for { - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj107++ + if yyhl107 { + yyb107 = yyj107 > l } else { - yyb105 = r.CheckBreak() + yyb107 = r.CheckBreak() } - if yyb105 { + if yyb107 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj105-1, "") + z.DecStructFieldNotFound(yyj107-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/pkg/apis/componentconfig/types.go b/pkg/apis/componentconfig/types.go index 867c6494876..6121048b476 100644 --- a/pkg/apis/componentconfig/types.go +++ b/pkg/apis/componentconfig/types.go @@ -263,6 +263,9 @@ type KubeletConfiguration struct { CgroupRoot string `json:"cgroupRoot,omitempty"` // containerRuntime is the container runtime to use. ContainerRuntime string `json:"containerRuntime"` + // runtimeRequestTimeout is the timeout for all runtime requests except long running + // requests - pull, logs, exec and attach. + RuntimeRequestTimeout unversioned.Duration `json:"runtimeRequestTimeout,omitempty"` // rktPath is the path of rkt binary. Leave empty to use the first rkt in // $PATH. RktPath string `json:"rktPath,omitempty"` diff --git a/pkg/kubelet/dockertools/docker.go b/pkg/kubelet/dockertools/docker.go index d265db51250..be94cf5fe28 100644 --- a/pkg/kubelet/dockertools/docker.go +++ b/pkg/kubelet/dockertools/docker.go @@ -23,6 +23,7 @@ import ( "path" "strconv" "strings" + "time" dockerref "github.com/docker/distribution/reference" "github.com/docker/docker/pkg/jsonmessage" @@ -311,8 +312,11 @@ func getDockerClient(dockerEndpoint string) (*dockerapi.Client, error) { // ConnectToDockerOrDie creates docker client connecting to docker daemon. // If the endpoint passed in is "fake://", a fake docker client -// will be returned. The program exits if error occurs. -func ConnectToDockerOrDie(dockerEndpoint string) DockerInterface { +// will be returned. The program exits if error occurs. The requestTimeout +// is the timeout for docker requests. If timeout is exceeded, the request +// will be cancelled and throw out an error. If requestTimeout is 0, a default +// value will be applied. +func ConnectToDockerOrDie(dockerEndpoint string, requestTimeout time.Duration) DockerInterface { if dockerEndpoint == "fake://" { return NewFakeDockerClient() } @@ -320,7 +324,8 @@ func ConnectToDockerOrDie(dockerEndpoint string) DockerInterface { if err != nil { glog.Fatalf("Couldn't connect to docker: %v", err) } - return newKubeDockerClient(client) + glog.Infof("Start docker client with request timeout=%v", requestTimeout) + return newKubeDockerClient(client, requestTimeout) } // milliCPUToQuota converts milliCPU to CFS quota and period values diff --git a/pkg/kubelet/dockertools/kube_docker_client.go b/pkg/kubelet/dockertools/kube_docker_client.go index 013507f0560..d390eff1081 100644 --- a/pkg/kubelet/dockertools/kube_docker_client.go +++ b/pkg/kubelet/dockertools/kube_docker_client.go @@ -49,14 +49,22 @@ import ( // TODO(random-liu): Swith to new docker interface by refactoring the functions in the old DockerInterface // one by one. type kubeDockerClient struct { - client *dockerapi.Client + // timeout is the timeout of short running docker operations. + timeout time.Duration + client *dockerapi.Client } // Make sure that kubeDockerClient implemented the DockerInterface. var _ DockerInterface = &kubeDockerClient{} +// There are 2 kinds of docker operations categorized by running time: +// * Long running operation: The long running operation could run for arbitrary long time, and the running time +// usually depends on some uncontrollable factors. These operations include: PullImage, Logs, StartExec, AttachToContainer. +// * Non-long running operation: Given the maximum load of the system, the non-long running operation should finish +// in expected and usually short time. These include all other operations. +// kubeDockerClient only applies timeout on non-long running operations. const ( - // defaultTimeout is the default timeout of all docker operations. + // defaultTimeout is the default timeout of short running docker operations. defaultTimeout = 2 * time.Minute // defaultShmSize is the default ShmSize to use (in bytes) if not specified. @@ -69,20 +77,26 @@ const ( // is made for defaultImagePullingStuckTimeout, the image pulling will be cancelled. // Docker reports image progress for every 512kB block, so normally there shouldn't be too long interval // between progress updates. + // TODO(random-liu): Make this configurable defaultImagePullingStuckTimeout = 1 * time.Minute ) -// newKubeDockerClient creates an kubeDockerClient from an existing docker client. -func newKubeDockerClient(dockerClient *dockerapi.Client) DockerInterface { +// newKubeDockerClient creates an kubeDockerClient from an existing docker client. If requestTimeout is 0, +// defaultTimeout will be applied. +func newKubeDockerClient(dockerClient *dockerapi.Client, requestTimeout time.Duration) DockerInterface { + if requestTimeout == 0 { + requestTimeout = defaultTimeout + } return &kubeDockerClient{ - client: dockerClient, + client: dockerClient, + timeout: requestTimeout, } } -func (k *kubeDockerClient) ListContainers(options dockertypes.ContainerListOptions) ([]dockertypes.Container, error) { - ctx, cancel := getDefaultContext() +func (d *kubeDockerClient) ListContainers(options dockertypes.ContainerListOptions) ([]dockertypes.Container, error) { + ctx, cancel := d.getTimeoutContext() defer cancel() - containers, err := k.client.ContainerList(ctx, options) + containers, err := d.client.ContainerList(ctx, options) if ctxErr := contextError(ctx); ctxErr != nil { return nil, ctxErr } @@ -93,7 +107,7 @@ func (k *kubeDockerClient) ListContainers(options dockertypes.ContainerListOptio } func (d *kubeDockerClient) InspectContainer(id string) (*dockertypes.ContainerJSON, error) { - ctx, cancel := getDefaultContext() + ctx, cancel := d.getTimeoutContext() defer cancel() containerJSON, err := d.client.ContainerInspect(ctx, id) if ctxErr := contextError(ctx); ctxErr != nil { @@ -109,7 +123,7 @@ func (d *kubeDockerClient) InspectContainer(id string) (*dockertypes.ContainerJS } func (d *kubeDockerClient) CreateContainer(opts dockertypes.ContainerCreateConfig) (*dockertypes.ContainerCreateResponse, error) { - ctx, cancel := getDefaultContext() + ctx, cancel := d.getTimeoutContext() defer cancel() // we provide an explicit default shm size as to not depend on docker daemon. // TODO: evaluate exposing this as a knob in the API @@ -127,7 +141,7 @@ func (d *kubeDockerClient) CreateContainer(opts dockertypes.ContainerCreateConfi } func (d *kubeDockerClient) StartContainer(id string) error { - ctx, cancel := getDefaultContext() + ctx, cancel := d.getTimeoutContext() defer cancel() err := d.client.ContainerStart(ctx, id) if ctxErr := contextError(ctx); ctxErr != nil { @@ -138,7 +152,7 @@ func (d *kubeDockerClient) StartContainer(id string) error { // Stopping an already stopped container will not cause an error in engine-api. func (d *kubeDockerClient) StopContainer(id string, timeout int) error { - ctx, cancel := getDefaultContext() + ctx, cancel := d.getTimeoutContext() defer cancel() err := d.client.ContainerStop(ctx, id, timeout) if ctxErr := contextError(ctx); ctxErr != nil { @@ -148,7 +162,7 @@ func (d *kubeDockerClient) StopContainer(id string, timeout int) error { } func (d *kubeDockerClient) RemoveContainer(id string, opts dockertypes.ContainerRemoveOptions) error { - ctx, cancel := getDefaultContext() + ctx, cancel := d.getTimeoutContext() defer cancel() err := d.client.ContainerRemove(ctx, id, opts) if ctxErr := contextError(ctx); ctxErr != nil { @@ -158,7 +172,7 @@ func (d *kubeDockerClient) RemoveContainer(id string, opts dockertypes.Container } func (d *kubeDockerClient) InspectImage(image string) (*dockertypes.ImageInspect, error) { - ctx, cancel := getDefaultContext() + ctx, cancel := d.getTimeoutContext() defer cancel() resp, _, err := d.client.ImageInspectWithRaw(ctx, image, true) if ctxErr := contextError(ctx); ctxErr != nil { @@ -174,7 +188,7 @@ func (d *kubeDockerClient) InspectImage(image string) (*dockertypes.ImageInspect } func (d *kubeDockerClient) ImageHistory(id string) ([]dockertypes.ImageHistory, error) { - ctx, cancel := getDefaultContext() + ctx, cancel := d.getTimeoutContext() defer cancel() resp, err := d.client.ImageHistory(ctx, id) if ctxErr := contextError(ctx); ctxErr != nil { @@ -184,7 +198,7 @@ func (d *kubeDockerClient) ImageHistory(id string) ([]dockertypes.ImageHistory, } func (d *kubeDockerClient) ListImages(opts dockertypes.ImageListOptions) ([]dockertypes.Image, error) { - ctx, cancel := getDefaultContext() + ctx, cancel := d.getTimeoutContext() defer cancel() images, err := d.client.ImageList(ctx, opts) if ctxErr := contextError(ctx); ctxErr != nil { @@ -297,7 +311,7 @@ func (d *kubeDockerClient) PullImage(image string, auth dockertypes.AuthConfig, return err } opts.RegistryAuth = base64Auth - ctx, cancel := context.WithCancel(context.Background()) + ctx, cancel := d.getCancelableContext() defer cancel() resp, err := d.client.ImagePull(ctx, image, opts) if err != nil { @@ -326,7 +340,7 @@ func (d *kubeDockerClient) PullImage(image string, auth dockertypes.AuthConfig, } func (d *kubeDockerClient) RemoveImage(image string, opts dockertypes.ImageRemoveOptions) ([]dockertypes.ImageDelete, error) { - ctx, cancel := getDefaultContext() + ctx, cancel := d.getTimeoutContext() defer cancel() resp, err := d.client.ImageRemove(ctx, image, opts) if ctxErr := contextError(ctx); ctxErr != nil { @@ -336,8 +350,12 @@ func (d *kubeDockerClient) RemoveImage(image string, opts dockertypes.ImageRemov } func (d *kubeDockerClient) Logs(id string, opts dockertypes.ContainerLogsOptions, sopts StreamOptions) error { - // Don't set timeout for log calls - resp, err := d.client.ContainerLogs(context.Background(), id, opts) + ctx, cancel := d.getCancelableContext() + defer cancel() + resp, err := d.client.ContainerLogs(ctx, id, opts) + if ctxErr := contextError(ctx); ctxErr != nil { + return ctxErr + } if err != nil { return err } @@ -346,7 +364,7 @@ func (d *kubeDockerClient) Logs(id string, opts dockertypes.ContainerLogsOptions } func (d *kubeDockerClient) Version() (*dockertypes.Version, error) { - ctx, cancel := getDefaultContext() + ctx, cancel := d.getTimeoutContext() defer cancel() resp, err := d.client.ServerVersion(ctx) if ctxErr := contextError(ctx); ctxErr != nil { @@ -359,7 +377,7 @@ func (d *kubeDockerClient) Version() (*dockertypes.Version, error) { } func (d *kubeDockerClient) Info() (*dockertypes.Info, error) { - ctx, cancel := getDefaultContext() + ctx, cancel := d.getTimeoutContext() defer cancel() resp, err := d.client.Info(ctx) if ctxErr := contextError(ctx); ctxErr != nil { @@ -373,7 +391,7 @@ func (d *kubeDockerClient) Info() (*dockertypes.Info, error) { // TODO(random-liu): Add unit test for exec and attach functions, just like what go-dockerclient did. func (d *kubeDockerClient) CreateExec(id string, opts dockertypes.ExecConfig) (*dockertypes.ContainerExecCreateResponse, error) { - ctx, cancel := getDefaultContext() + ctx, cancel := d.getTimeoutContext() defer cancel() resp, err := d.client.ContainerExecCreate(ctx, id, opts) if ctxErr := contextError(ctx); ctxErr != nil { @@ -386,7 +404,7 @@ func (d *kubeDockerClient) CreateExec(id string, opts dockertypes.ExecConfig) (* } func (d *kubeDockerClient) StartExec(startExec string, opts dockertypes.ExecStartCheck, sopts StreamOptions) error { - ctx, cancel := getDefaultContext() + ctx, cancel := d.getCancelableContext() defer cancel() if opts.Detach { err := d.client.ContainerExecStart(ctx, startExec, opts) @@ -410,7 +428,7 @@ func (d *kubeDockerClient) StartExec(startExec string, opts dockertypes.ExecStar } func (d *kubeDockerClient) InspectExec(id string) (*dockertypes.ContainerExecInspect, error) { - ctx, cancel := getDefaultContext() + ctx, cancel := d.getTimeoutContext() defer cancel() resp, err := d.client.ContainerExecInspect(ctx, id) if ctxErr := contextError(ctx); ctxErr != nil { @@ -423,7 +441,7 @@ func (d *kubeDockerClient) InspectExec(id string) (*dockertypes.ContainerExecIns } func (d *kubeDockerClient) AttachToContainer(id string, opts dockertypes.ContainerAttachOptions, sopts StreamOptions) error { - ctx, cancel := getDefaultContext() + ctx, cancel := d.getCancelableContext() defer cancel() resp, err := d.client.ContainerAttach(ctx, id, opts) if ctxErr := contextError(ctx); ctxErr != nil { @@ -484,16 +502,23 @@ func (d *kubeDockerClient) holdHijackedConnection(tty bool, inputStream io.Reade return nil } +// getCancelableContext returns a new cancelable context. For long running requests without timeout, we use cancelable +// context to avoid potential resource leak, although the current implementation shouldn't leak resource. +func (d *kubeDockerClient) getCancelableContext() (context.Context, context.CancelFunc) { + return context.WithCancel(context.Background()) +} + +// getTimeoutContext returns a new context with default request timeout +func (d *kubeDockerClient) getTimeoutContext() (context.Context, context.CancelFunc) { + return context.WithTimeout(context.Background(), d.timeout) +} + // parseDockerTimestamp parses the timestamp returned by DockerInterface from string to time.Time func parseDockerTimestamp(s string) (time.Time, error) { // Timestamp returned by Docker is in time.RFC3339Nano format. return time.Parse(time.RFC3339Nano, s) } -func getDefaultContext() (context.Context, context.CancelFunc) { - return context.WithTimeout(context.Background(), defaultTimeout) -} - // contextError checks the context, and returns error if the context is timeout. func contextError(ctx context.Context) error { if ctx.Err() == context.DeadlineExceeded { diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index 496176116b4..7f8519d22b9 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -206,6 +206,7 @@ func NewMainKubelet( osInterface kubecontainer.OSInterface, cgroupRoot string, containerRuntime string, + runtimeRequestTimeout time.Duration, rktPath string, rktAPIEndpoint string, rktStage1Image string, @@ -451,6 +452,7 @@ func NewMainKubelet( kubecontainer.RealOS{}, imageBackOff, serializeImagePulls, + runtimeRequestTimeout, ) if err != nil { return nil, err diff --git a/pkg/kubelet/rkt/config.go b/pkg/kubelet/rkt/config.go index 809eefc5431..d978847f080 100644 --- a/pkg/kubelet/rkt/config.go +++ b/pkg/kubelet/rkt/config.go @@ -79,7 +79,9 @@ func (c *Config) buildGlobalOptions() []string { // that the fields in the provided config will override the // result that get from the rkt api service. func (r *Runtime) getConfig(cfg *Config) (*Config, error) { - resp, err := r.apisvc.GetInfo(context.Background(), &rktapi.GetInfoRequest{}) + ctx, cancel := context.WithTimeout(context.Background(), r.requestTimeout) + defer cancel() + resp, err := r.apisvc.GetInfo(ctx, &rktapi.GetInfoRequest{}) if err != nil { return nil, err } diff --git a/pkg/kubelet/rkt/image.go b/pkg/kubelet/rkt/image.go index afdbe94ee92..0cad258c4fb 100644 --- a/pkg/kubelet/rkt/image.go +++ b/pkg/kubelet/rkt/image.go @@ -90,7 +90,9 @@ func (r *Runtime) IsImagePresent(image kubecontainer.ImageSpec) (bool, error) { // ListImages lists all the available appc images on the machine by invoking 'rkt image list'. func (r *Runtime) ListImages() ([]kubecontainer.Image, error) { - listResp, err := r.apisvc.ListImages(context.Background(), &rktapi.ListImagesRequest{}) + ctx, cancel := context.WithTimeout(context.Background(), r.requestTimeout) + defer cancel() + listResp, err := r.apisvc.ListImages(ctx, &rktapi.ListImagesRequest{}) if err != nil { return nil, fmt.Errorf("couldn't list images: %v", err) } @@ -155,7 +157,9 @@ func (r *Runtime) listImages(image string, detail bool) ([]*rktapi.Image, error) return nil, err } - listResp, err := r.apisvc.ListImages(context.Background(), &rktapi.ListImagesRequest{ + ctx, cancel := context.WithTimeout(context.Background(), r.requestTimeout) + defer cancel() + listResp, err := r.apisvc.ListImages(ctx, &rktapi.ListImagesRequest{ Detail: detail, Filters: []*rktapi.ImageFilter{ { @@ -231,7 +235,9 @@ func (r *Runtime) writeDockerAuthConfig(image string, credsSlice []credentialpro // ImageStats returns the image stat (total storage bytes). func (r *Runtime) ImageStats() (*kubecontainer.ImageStats, error) { var imageStat kubecontainer.ImageStats - listResp, err := r.apisvc.ListImages(context.Background(), &rktapi.ListImagesRequest{}) + ctx, cancel := context.WithTimeout(context.Background(), r.requestTimeout) + defer cancel() + listResp, err := r.apisvc.ListImages(ctx, &rktapi.ListImagesRequest{}) if err != nil { return nil, fmt.Errorf("couldn't list images: %v", err) } diff --git a/pkg/kubelet/rkt/rkt.go b/pkg/kubelet/rkt/rkt.go index 31350127a32..84e7c5412a9 100644 --- a/pkg/kubelet/rkt/rkt.go +++ b/pkg/kubelet/rkt/rkt.go @@ -128,6 +128,9 @@ const ( // under the CNI directory directly. // See https://github.com/coreos/rkt/pull/2312#issuecomment-200068370. defaultNetworkName = "rkt.kubernetes.io" + + // defaultRequestTimeout is the default timeout of rkt requests. + defaultRequestTimeout = 2 * time.Minute ) // Runtime implements the Containerruntime for rkt. The implementation @@ -166,6 +169,9 @@ type Runtime struct { nsenterPath string versions versions + + // requestTimeout is the timeout of rkt requests. + requestTimeout time.Duration } var _ kubecontainer.Runtime = &Runtime{} @@ -200,6 +206,7 @@ func New( os kubecontainer.OSInterface, imageBackOff *flowcontrol.Backoff, serializeImagePulls bool, + requestTimeout time.Duration, ) (*Runtime, error) { // Create dbus connection. systemd, err := newSystemd() @@ -233,6 +240,10 @@ func New( return nil, fmt.Errorf("cannot find nsenter binary: %v", err) } + if requestTimeout == 0 { + requestTimeout = defaultRequestTimeout + } + rkt := &Runtime{ os: kubecontainer.RealOS{}, systemd: systemd, @@ -249,6 +260,7 @@ func New( execer: execer, touchPath: touchPath, nsenterPath: nsenterPath, + requestTimeout: requestTimeout, } rkt.config, err = rkt.getConfig(rkt.config) @@ -585,7 +597,9 @@ func setApp(imgManifest *appcschema.ImageManifest, c *api.Container, opts *kubec func (r *Runtime) makePodManifest(pod *api.Pod, podIP string, pullSecrets []api.Secret) (*appcschema.PodManifest, error) { manifest := appcschema.BlankPodManifest() - listResp, err := r.apisvc.ListPods(context.Background(), &rktapi.ListPodsRequest{ + ctx, cancel := context.WithTimeout(context.Background(), r.requestTimeout) + defer cancel() + listResp, err := r.apisvc.ListPods(ctx, &rktapi.ListPodsRequest{ Detail: true, Filters: kubernetesPodFilters(pod.UID), }) @@ -1349,7 +1363,9 @@ func (r *Runtime) runPostStartHook(containerID kubecontainer.ContainerID, pod *a } isContainerRunning := func() (done bool, err error) { - resp, err := r.apisvc.InspectPod(context.Background(), &rktapi.InspectPodRequest{Id: cid.uuid}) + ctx, cancel := context.WithTimeout(context.Background(), r.requestTimeout) + defer cancel() + resp, err := r.apisvc.InspectPod(ctx, &rktapi.InspectPodRequest{Id: cid.uuid}) if err != nil { return false, fmt.Errorf("failed to inspect rkt pod %q for pod %q", cid.uuid, format.Pod(pod)) } @@ -1520,7 +1536,9 @@ func (r *Runtime) GetPods(all bool) ([]*kubecontainer.Pod, error) { if !all { listReq.Filters[0].States = []rktapi.PodState{rktapi.PodState_POD_STATE_RUNNING} } - listResp, err := r.apisvc.ListPods(context.Background(), listReq) + ctx, cancel := context.WithTimeout(context.Background(), r.requestTimeout) + defer cancel() + listResp, err := r.apisvc.ListPods(ctx, listReq) if err != nil { return nil, fmt.Errorf("couldn't list pods: %v", err) } @@ -1829,7 +1847,9 @@ func (r *Runtime) GarbageCollect(gcPolicy kubecontainer.ContainerGCPolicy, allSo return err } - resp, err := r.apisvc.ListPods(context.Background(), &rktapi.ListPodsRequest{Filters: kubernetesPodsFilters()}) + ctx, cancel := context.WithTimeout(context.Background(), r.requestTimeout) + defer cancel() + resp, err := r.apisvc.ListPods(ctx, &rktapi.ListPodsRequest{Filters: kubernetesPodsFilters()}) if err != nil { glog.Errorf("rkt: Failed to list pods: %v", err) return err @@ -2047,7 +2067,9 @@ func (r *Runtime) ExecInContainer(containerID kubecontainer.ContainerID, cmd []s func (r *Runtime) PortForward(pod *kubecontainer.Pod, port uint16, stream io.ReadWriteCloser) error { glog.V(4).Infof("Rkt port forwarding in container.") - listResp, err := r.apisvc.ListPods(context.Background(), &rktapi.ListPodsRequest{ + ctx, cancel := context.WithTimeout(context.Background(), r.requestTimeout) + defer cancel() + listResp, err := r.apisvc.ListPods(ctx, &rktapi.ListPodsRequest{ Detail: true, Filters: runningKubernetesPodFilters(pod.ID), }) @@ -2197,7 +2219,9 @@ func (r *Runtime) GetPodStatus(uid kubetypes.UID, name, namespace string) (*kube Namespace: namespace, } - listResp, err := r.apisvc.ListPods(context.Background(), &rktapi.ListPodsRequest{ + ctx, cancel := context.WithTimeout(context.Background(), r.requestTimeout) + defer cancel() + listResp, err := r.apisvc.ListPods(ctx, &rktapi.ListPodsRequest{ Detail: true, Filters: kubernetesPodFilters(uid), }) diff --git a/pkg/kubelet/rkt/version.go b/pkg/kubelet/rkt/version.go index 9144cf2ff33..2cf7a634616 100644 --- a/pkg/kubelet/rkt/version.go +++ b/pkg/kubelet/rkt/version.go @@ -73,9 +73,11 @@ func (r *Runtime) getVersions() error { return err } + ctx, cancel := context.WithTimeout(context.Background(), r.requestTimeout) + defer cancel() // Example for the version strings returned by GetInfo(): // RktVersion:"0.10.0+gitb7349b1" AppcVersion:"0.7.1" ApiVersion:"1.0.0-alpha" - resp, err := r.apisvc.GetInfo(context.Background(), &rktapi.GetInfoRequest{}) + resp, err := r.apisvc.GetInfo(ctx, &rktapi.GetInfoRequest{}) if err != nil { return err } diff --git a/test/e2e_node/image.go b/test/e2e_node/image.go index 8a47e5406ff..dfbbac5e78e 100644 --- a/test/e2e_node/image.go +++ b/test/e2e_node/image.go @@ -40,7 +40,7 @@ func NewConformanceImage(containerRuntime string, image string) (ci ConformanceI //TODO: do not expose kubelet implementation details after we refactor the runtime API. func dockerRuntime() kubecontainer.Runtime { - dockerClient := dockertools.ConnectToDockerOrDie("") + dockerClient := dockertools.ConnectToDockerOrDie("", 0) pm := kubepod.NewBasicPodManager(nil) dm := dockertools.NewDockerManager( dockerClient,