From 38efc837b906d475daf683beb559b90b9a03f5af Mon Sep 17 00:00:00 2001 From: Vishnu kannan Date: Thu, 4 Feb 2016 17:49:17 -0800 Subject: [PATCH 1/4] Make container runtime's cgroup configurable. Use the real cgroups for metrics generation. Signed-off-by: Vishnu kannan --- cmd/kubelet/app/options/options.go | 10 +- cmd/kubelet/app/server.go | 20 +- contrib/mesos/pkg/executor/service/service.go | 9 +- docs/admin/kubelet.md | 1 + hack/verify-flags/known-flags.txt | 1 + pkg/apis/componentconfig/types.generated.go | 5518 ----------------- pkg/apis/componentconfig/types.go | 2 + pkg/kubelet/cm/container_manager.go | 12 +- pkg/kubelet/cm/container_manager_linux.go | 140 +- pkg/kubelet/cm/container_manager_stub.go | 6 +- .../cm/container_manager_unsupported.go | 8 +- pkg/kubelet/kubelet.go | 82 +- pkg/kubelet/server/stats/summary.go | 2 +- pkg/kubelet/server/stats/summary_test.go | 6 +- 14 files changed, 172 insertions(+), 5645 deletions(-) delete mode 100644 pkg/apis/componentconfig/types.generated.go diff --git a/cmd/kubelet/app/options/options.go b/cmd/kubelet/app/options/options.go index af60672f58..9e18ab5ab0 100644 --- a/cmd/kubelet/app/options/options.go +++ b/cmd/kubelet/app/options/options.go @@ -47,8 +47,7 @@ type KubeletServer struct { KubeConfig util.StringFlag APIServerList []string - DockerDaemonContainer string - RunOnce bool + RunOnce bool // Insert a probability of random errors during calls to the master. ChaosChance float64 @@ -61,9 +60,8 @@ type KubeletServer struct { // NewKubeletServer will create a new KubeletServer with default values. func NewKubeletServer() *KubeletServer { return &KubeletServer{ - AuthPath: util.NewStringFlag("/var/lib/kubelet/kubernetes_auth"), // deprecated - KubeConfig: util.NewStringFlag("/var/lib/kubelet/kubeconfig"), - DockerDaemonContainer: "/docker-daemon", + AuthPath: util.NewStringFlag("/var/lib/kubelet/kubernetes_auth"), // deprecated + KubeConfig: util.NewStringFlag("/var/lib/kubelet/kubeconfig"), SystemReserved: make(util.ConfigurationMap), KubeReserved: make(util.ConfigurationMap), @@ -117,6 +115,7 @@ func NewKubeletServer() *KubeletServer { RktPath: "", RktStage1Image: "", RootDirectory: defaultRootDir, + RuntimeContainer: "/docker-daemon", SerializeImagePulls: true, StreamingConnectionIdleTimeout: unversioned.Duration{4 * time.Hour}, SyncFrequency: unversioned.Duration{1 * time.Minute}, @@ -223,4 +222,5 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) { fs.DurationVar(&s.OutOfDiskTransitionFrequency.Duration, "outofdisk-transition-frequency", s.OutOfDiskTransitionFrequency.Duration, "Duration for which the kubelet has to wait before transitioning out of out-of-disk node condition status. Default: 5m0s") fs.StringVar(&s.NodeIP, "node-ip", s.NodeIP, "IP address of the node. If set, kubelet will use this IP address for the node") fs.BoolVar(&s.EnableCustomMetrics, "enable-custom-metrics", s.EnableCustomMetrics, "Support for gathering custom metrics.") + fs.StringVar(&s.RuntimeContainer, "runtime-container", s.RuntimeContainer, "Absolute name of the cgroups to create (if required) and run the runtime in (Default: /docker-daemon).") } diff --git a/cmd/kubelet/app/server.go b/cmd/kubelet/app/server.go index 56594c3c87..d60adfaa74 100644 --- a/cmd/kubelet/app/server.go +++ b/cmd/kubelet/app/server.go @@ -194,7 +194,7 @@ func UnsecuredKubeletConfig(s *options.KubeletServer) (*KubeletConfig, error) { CPUCFSQuota: s.CPUCFSQuota, DiskSpacePolicy: diskSpacePolicy, DockerClient: dockertools.ConnectToDockerOrDie(s.DockerEndpoint), - DockerDaemonContainer: s.DockerDaemonContainer, + RuntimeContainer: s.RuntimeContainer, DockerExecHandler: dockerExecHandler, EnableCustomMetrics: s.EnableCustomMetrics, EnableDebuggingHandlers: s.EnableDebuggingHandlers, @@ -306,7 +306,16 @@ func Run(s *options.KubeletServer, kcfg *KubeletConfig) error { } if kcfg.ContainerManager == nil { - kcfg.ContainerManager, err = cm.NewContainerManager(kcfg.Mounter, kcfg.CAdvisorInterface) + if kcfg.SystemContainer != "" && kcfg.CgroupRoot == "" { + return fmt.Errorf("invalid configuration: system container was specified and cgroup root was not specified") + } + + kcfg.ContainerManager, err = cm.NewContainerManager(kcfg.Mounter, kcfg.CAdvisorInterface, cm.NodeConfig{ + RuntimeContainerName: kcfg.RuntimeContainer, + SystemContainerName: kcfg.SystemContainer, + KubeletContainerName: kcfg.ResourceContainer, + ContainerRuntime: kcfg.ContainerRuntime, + }) if err != nil { return err } @@ -501,7 +510,7 @@ func SimpleKubelet(client *clientset.Clientset, CPUCFSQuota: true, DiskSpacePolicy: diskSpacePolicy, DockerClient: dockerClient, - DockerDaemonContainer: "/docker-daemon", + RuntimeContainer: "/docker-daemon", DockerExecHandler: &dockertools.NativeExecHandler{}, EnableCustomMetrics: false, EnableDebuggingHandlers: true, @@ -677,7 +686,7 @@ type KubeletConfig struct { CPUCFSQuota bool DiskSpacePolicy kubelet.DiskSpacePolicy DockerClient dockertools.DockerInterface - DockerDaemonContainer string + RuntimeContainer string DockerExecHandler dockertools.ExecHandler EnableCustomMetrics bool EnableDebuggingHandlers bool @@ -802,7 +811,6 @@ func CreateAndInitKubelet(kc *KubeletConfig) (k KubeletBootstrap, pc *config.Pod kc.Cloud, kc.NodeLabels, kc.NodeStatusUpdateFrequency, - kc.ResourceContainer, kc.OSInterface, kc.CgroupRoot, kc.ContainerRuntime, @@ -810,8 +818,6 @@ func CreateAndInitKubelet(kc *KubeletConfig) (k KubeletBootstrap, pc *config.Pod kc.RktStage1Image, kc.Mounter, kc.Writer, - kc.DockerDaemonContainer, - kc.SystemContainer, kc.ConfigureCBR0, kc.NonMasqueradeCIDR, kc.PodCIDR, diff --git a/contrib/mesos/pkg/executor/service/service.go b/contrib/mesos/pkg/executor/service/service.go index 23b1b62693..f4f79ced77 100644 --- a/contrib/mesos/pkg/executor/service/service.go +++ b/contrib/mesos/pkg/executor/service/service.go @@ -180,7 +180,7 @@ func (s *KubeletExecutorServer) runKubelet( return decorated, pc, nil } - kcfg.DockerDaemonContainer = "" // don't move the docker daemon into a cgroup + kcfg.RuntimeContainer = "" // don't move the docker daemon into a cgroup kcfg.Hostname = kcfg.HostnameOverride kcfg.KubeClient = apiclient @@ -216,7 +216,12 @@ func (s *KubeletExecutorServer) runKubelet( } kcfg.CAdvisorInterface = cAdvisorInterface - kcfg.ContainerManager, err = cm.NewContainerManager(kcfg.Mounter, cAdvisorInterface) + kcfg.ContainerManager, err = cm.NewContainerManager(kcfg.Mounter, cAdvisorInterface, cm.NodeConfig{ + RuntimeContainerName: kcfg.RuntimeContainer, + SystemContainerName: kcfg.SystemContainer, + KubeletContainerName: kcfg.ResourceContainer, + ContainerRuntime: kcfg.ContainerRuntime, + }) if err != nil { return err } diff --git a/docs/admin/kubelet.md b/docs/admin/kubelet.md index 931b31fba8..cbe8d63b8d 100644 --- a/docs/admin/kubelet.md +++ b/docs/admin/kubelet.md @@ -139,6 +139,7 @@ kubelet --rkt-stage1-image="": image to use as stage1. Local paths and http/https URLs are supported. If empty, the 'stage1.aci' in the same directory as '--rkt-path' will be used --root-dir="/var/lib/kubelet": Directory path for managing kubelet files (volume mounts,etc). --runonce[=false]: If true, exit after spawning pods from local manifests or remote urls. Exclusive with --api-servers, and --enable-server + --runtime-container="/docker-daemon": Absolute name of the cgroups to create (if required) and run the runtime in (Default: /docker-daemon). --serialize-image-pulls[=true]: Pull images one at a time. We recommend *not* changing the default value on nodes that run docker daemon with version < 1.9 or an Aufs storage backend. Issue #10959 has more details. [default=true] --streaming-connection-idle-timeout=4h0m0s: Maximum time a streaming connection can be idle before the connection is automatically closed. 0 indicates no timeout. Example: '5m' --sync-frequency=1m0s: Max period between synchronizing running containers and config diff --git a/hack/verify-flags/known-flags.txt b/hack/verify-flags/known-flags.txt index b3917feacf..54a093531e 100644 --- a/hack/verify-flags/known-flags.txt +++ b/hack/verify-flags/known-flags.txt @@ -311,6 +311,7 @@ root-ca-file root-dir run-proxy runtime-config +runtime-container save-config scheduler-config scheduler-name diff --git a/pkg/apis/componentconfig/types.generated.go b/pkg/apis/componentconfig/types.generated.go deleted file mode 100644 index 33febf3dbc..0000000000 --- a/pkg/apis/componentconfig/types.generated.go +++ /dev/null @@ -1,5518 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// ************************************************************ -// DO NOT EDIT. -// THIS FILE IS AUTO-GENERATED BY codecgen. -// ************************************************************ - -package componentconfig - -import ( - "errors" - "fmt" - codec1978 "github.com/ugorji/go/codec" - pkg1_unversioned "k8s.io/kubernetes/pkg/api/unversioned" - "reflect" - "runtime" - time "time" -) - -const ( - // ----- content types ---- - codecSelferC_UTF81234 = 1 - codecSelferC_RAW1234 = 0 - // ----- value types used ---- - codecSelferValueTypeArray1234 = 10 - codecSelferValueTypeMap1234 = 9 - // ----- containerStateValues ---- - codecSelfer_containerMapKey1234 = 2 - codecSelfer_containerMapValue1234 = 3 - codecSelfer_containerMapEnd1234 = 4 - codecSelfer_containerArrayElem1234 = 6 - codecSelfer_containerArrayEnd1234 = 7 -) - -var ( - codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) - codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) -) - -type codecSelfer1234 struct{} - -func init() { - if codec1978.GenVersion != 5 { - _, file, _, _ := runtime.Caller(0) - err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", - 5, codec1978.GenVersion, file) - panic(err) - } - if false { // reference the types, but skip this branch at build/run time - var v0 pkg1_unversioned.TypeMeta - var v1 time.Duration - _, _ = v0, v1 - } -} - -func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [18]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - yyq2[16] = x.Kind != "" - yyq2[17] = x.APIVersion != "" - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(18) - } else { - yynn2 = 16 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym4 := z.EncBinary() - _ = yym4 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.BindAddress)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("bindAddress")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym5 := z.EncBinary() - _ = yym5 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.BindAddress)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym7 := z.EncBinary() - _ = yym7 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.HealthzBindAddress)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("healthzBindAddress")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym8 := z.EncBinary() - _ = yym8 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.HealthzBindAddress)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym10 := z.EncBinary() - _ = yym10 - if false { - } else { - r.EncodeInt(int64(x.HealthzPort)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("healthzPort")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym11 := z.EncBinary() - _ = yym11 - if false { - } else { - r.EncodeInt(int64(x.HealthzPort)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym13 := z.EncBinary() - _ = yym13 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.HostnameOverride)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("hostnameOverride")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym14 := z.EncBinary() - _ = yym14 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.HostnameOverride)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.IPTablesMasqueradeBit == nil { - r.EncodeNil() - } else { - yy16 := *x.IPTablesMasqueradeBit - yym17 := z.EncBinary() - _ = yym17 - if false { - } else { - r.EncodeInt(int64(yy16)) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("iptablesMasqueradeBit")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.IPTablesMasqueradeBit == nil { - r.EncodeNil() - } else { - yy18 := *x.IPTablesMasqueradeBit - yym19 := z.EncBinary() - _ = yym19 - if false { - } else { - r.EncodeInt(int64(yy18)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy21 := &x.IPTablesSyncPeriod - yym22 := z.EncBinary() - _ = yym22 - if false { - } else if z.HasExtensions() && z.EncExt(yy21) { - } else if !yym22 && z.IsJSONHandle() { - z.EncJSONMarshal(yy21) - } else { - z.EncFallback(yy21) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("iptablesSyncPeriodSeconds")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy23 := &x.IPTablesSyncPeriod - yym24 := z.EncBinary() - _ = yym24 - if false { - } else if z.HasExtensions() && z.EncExt(yy23) { - } else if !yym24 && z.IsJSONHandle() { - z.EncJSONMarshal(yy23) - } else { - z.EncFallback(yy23) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym26 := z.EncBinary() - _ = yym26 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.KubeconfigPath)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kubeconfigPath")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym27 := z.EncBinary() - _ = yym27 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.KubeconfigPath)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym29 := z.EncBinary() - _ = yym29 - if false { - } else { - r.EncodeBool(bool(x.MasqueradeAll)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("masqueradeAll")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym30 := z.EncBinary() - _ = yym30 - if false { - } else { - r.EncodeBool(bool(x.MasqueradeAll)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym32 := z.EncBinary() - _ = yym32 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Master)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("master")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym33 := z.EncBinary() - _ = yym33 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Master)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.OOMScoreAdj == nil { - r.EncodeNil() - } else { - yy35 := *x.OOMScoreAdj - yym36 := z.EncBinary() - _ = yym36 - if false { - } else { - r.EncodeInt(int64(yy35)) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("oomScoreAdj")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.OOMScoreAdj == nil { - r.EncodeNil() - } else { - yy37 := *x.OOMScoreAdj - yym38 := z.EncBinary() - _ = yym38 - if false { - } else { - r.EncodeInt(int64(yy37)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - x.Mode.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("mode")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - x.Mode.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym41 := z.EncBinary() - _ = yym41 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.PortRange)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("portRange")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym42 := z.EncBinary() - _ = yym42 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.PortRange)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym44 := z.EncBinary() - _ = yym44 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ResourceContainer)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("resourceContainer")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym45 := z.EncBinary() - _ = yym45 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ResourceContainer)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy47 := &x.UDPIdleTimeout - yym48 := z.EncBinary() - _ = yym48 - if false { - } else if z.HasExtensions() && z.EncExt(yy47) { - } else if !yym48 && z.IsJSONHandle() { - z.EncJSONMarshal(yy47) - } else { - z.EncFallback(yy47) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("udpTimeoutMilliseconds")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy49 := &x.UDPIdleTimeout - yym50 := z.EncBinary() - _ = yym50 - if false { - } else if z.HasExtensions() && z.EncExt(yy49) { - } else if !yym50 && z.IsJSONHandle() { - z.EncJSONMarshal(yy49) - } else { - z.EncFallback(yy49) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym52 := z.EncBinary() - _ = yym52 - if false { - } else { - r.EncodeInt(int64(x.ConntrackMax)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("conntrackMax")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym53 := z.EncBinary() - _ = yym53 - if false { - } else { - r.EncodeInt(int64(x.ConntrackMax)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy55 := &x.ConntrackTCPEstablishedTimeout - yym56 := z.EncBinary() - _ = yym56 - if false { - } else if z.HasExtensions() && z.EncExt(yy55) { - } else if !yym56 && z.IsJSONHandle() { - z.EncJSONMarshal(yy55) - } else { - z.EncFallback(yy55) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("conntrackTCPEstablishedTimeout")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy57 := &x.ConntrackTCPEstablishedTimeout - yym58 := z.EncBinary() - _ = yym58 - if false { - } else if z.HasExtensions() && z.EncExt(yy57) { - } else if !yym58 && z.IsJSONHandle() { - z.EncJSONMarshal(yy57) - } else { - z.EncFallback(yy57) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[16] { - yym60 := z.EncBinary() - _ = yym60 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[16] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym61 := z.EncBinary() - _ = yym61 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[17] { - yym63 := z.EncBinary() - _ = yym63 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[17] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym64 := z.EncBinary() - _ = yym64 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *KubeProxyConfiguration) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym65 := z.DecBinary() - _ = yym65 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct66 := r.ContainerType() - if yyct66 == codecSelferValueTypeMap1234 { - yyl66 := r.ReadMapStart() - if yyl66 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl66, d) - } - } else if yyct66 == codecSelferValueTypeArray1234 { - yyl66 := r.ReadArrayStart() - if yyl66 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl66, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *KubeProxyConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys67Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys67Slc - var yyhl67 bool = l >= 0 - for yyj67 := 0; ; yyj67++ { - if yyhl67 { - if yyj67 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys67Slc = r.DecodeBytes(yys67Slc, true, true) - yys67 := string(yys67Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys67 { - case "bindAddress": - if r.TryDecodeAsNil() { - x.BindAddress = "" - } else { - x.BindAddress = string(r.DecodeString()) - } - case "healthzBindAddress": - if r.TryDecodeAsNil() { - x.HealthzBindAddress = "" - } else { - x.HealthzBindAddress = string(r.DecodeString()) - } - case "healthzPort": - if r.TryDecodeAsNil() { - x.HealthzPort = 0 - } else { - x.HealthzPort = int(r.DecodeInt(codecSelferBitsize1234)) - } - case "hostnameOverride": - if r.TryDecodeAsNil() { - x.HostnameOverride = "" - } else { - x.HostnameOverride = string(r.DecodeString()) - } - case "iptablesMasqueradeBit": - if r.TryDecodeAsNil() { - if x.IPTablesMasqueradeBit != nil { - x.IPTablesMasqueradeBit = nil - } - } else { - if x.IPTablesMasqueradeBit == nil { - x.IPTablesMasqueradeBit = new(int) - } - yym73 := z.DecBinary() - _ = yym73 - if false { - } else { - *((*int)(x.IPTablesMasqueradeBit)) = int(r.DecodeInt(codecSelferBitsize1234)) - } - } - case "iptablesSyncPeriodSeconds": - if r.TryDecodeAsNil() { - x.IPTablesSyncPeriod = pkg1_unversioned.Duration{} - } else { - yyv74 := &x.IPTablesSyncPeriod - yym75 := z.DecBinary() - _ = yym75 - if false { - } else if z.HasExtensions() && z.DecExt(yyv74) { - } else if !yym75 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv74) - } else { - z.DecFallback(yyv74, false) - } - } - case "kubeconfigPath": - if r.TryDecodeAsNil() { - x.KubeconfigPath = "" - } else { - x.KubeconfigPath = string(r.DecodeString()) - } - case "masqueradeAll": - if r.TryDecodeAsNil() { - x.MasqueradeAll = false - } else { - x.MasqueradeAll = bool(r.DecodeBool()) - } - case "master": - if r.TryDecodeAsNil() { - x.Master = "" - } else { - x.Master = string(r.DecodeString()) - } - case "oomScoreAdj": - if r.TryDecodeAsNil() { - if x.OOMScoreAdj != nil { - x.OOMScoreAdj = nil - } - } else { - if x.OOMScoreAdj == nil { - x.OOMScoreAdj = new(int) - } - yym80 := z.DecBinary() - _ = yym80 - if false { - } else { - *((*int)(x.OOMScoreAdj)) = int(r.DecodeInt(codecSelferBitsize1234)) - } - } - case "mode": - if r.TryDecodeAsNil() { - x.Mode = "" - } else { - x.Mode = ProxyMode(r.DecodeString()) - } - case "portRange": - if r.TryDecodeAsNil() { - x.PortRange = "" - } else { - x.PortRange = string(r.DecodeString()) - } - case "resourceContainer": - if r.TryDecodeAsNil() { - x.ResourceContainer = "" - } else { - x.ResourceContainer = string(r.DecodeString()) - } - case "udpTimeoutMilliseconds": - if r.TryDecodeAsNil() { - x.UDPIdleTimeout = pkg1_unversioned.Duration{} - } else { - yyv84 := &x.UDPIdleTimeout - yym85 := z.DecBinary() - _ = yym85 - if false { - } else if z.HasExtensions() && z.DecExt(yyv84) { - } else if !yym85 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv84) - } else { - z.DecFallback(yyv84, false) - } - } - case "conntrackMax": - if r.TryDecodeAsNil() { - x.ConntrackMax = 0 - } else { - x.ConntrackMax = int(r.DecodeInt(codecSelferBitsize1234)) - } - case "conntrackTCPEstablishedTimeout": - if r.TryDecodeAsNil() { - x.ConntrackTCPEstablishedTimeout = pkg1_unversioned.Duration{} - } else { - yyv87 := &x.ConntrackTCPEstablishedTimeout - yym88 := z.DecBinary() - _ = yym88 - if false { - } else if z.HasExtensions() && z.DecExt(yyv87) { - } else if !yym88 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv87) - } else { - z.DecFallback(yyv87, false) - } - } - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys67) - } // end switch yys67 - } // end for yyj67 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj91 int - var yyb91 bool - var yyhl91 bool = l >= 0 - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.BindAddress = "" - } else { - x.BindAddress = string(r.DecodeString()) - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HealthzBindAddress = "" - } else { - x.HealthzBindAddress = string(r.DecodeString()) - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HealthzPort = 0 - } else { - x.HealthzPort = int(r.DecodeInt(codecSelferBitsize1234)) - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HostnameOverride = "" - } else { - x.HostnameOverride = string(r.DecodeString()) - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.IPTablesMasqueradeBit != nil { - x.IPTablesMasqueradeBit = nil - } - } else { - if x.IPTablesMasqueradeBit == nil { - x.IPTablesMasqueradeBit = new(int) - } - yym97 := z.DecBinary() - _ = yym97 - if false { - } else { - *((*int)(x.IPTablesMasqueradeBit)) = int(r.DecodeInt(codecSelferBitsize1234)) - } - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.IPTablesSyncPeriod = pkg1_unversioned.Duration{} - } else { - yyv98 := &x.IPTablesSyncPeriod - yym99 := z.DecBinary() - _ = yym99 - if false { - } else if z.HasExtensions() && z.DecExt(yyv98) { - } else if !yym99 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv98) - } else { - z.DecFallback(yyv98, false) - } - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.KubeconfigPath = "" - } else { - x.KubeconfigPath = string(r.DecodeString()) - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.MasqueradeAll = false - } else { - x.MasqueradeAll = bool(r.DecodeBool()) - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Master = "" - } else { - x.Master = string(r.DecodeString()) - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.OOMScoreAdj != nil { - x.OOMScoreAdj = nil - } - } else { - if x.OOMScoreAdj == nil { - x.OOMScoreAdj = new(int) - } - yym104 := z.DecBinary() - _ = yym104 - if false { - } else { - *((*int)(x.OOMScoreAdj)) = int(r.DecodeInt(codecSelferBitsize1234)) - } - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Mode = "" - } else { - x.Mode = ProxyMode(r.DecodeString()) - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.PortRange = "" - } else { - x.PortRange = string(r.DecodeString()) - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ResourceContainer = "" - } else { - x.ResourceContainer = string(r.DecodeString()) - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.UDPIdleTimeout = pkg1_unversioned.Duration{} - } else { - yyv108 := &x.UDPIdleTimeout - yym109 := z.DecBinary() - _ = yym109 - if false { - } else if z.HasExtensions() && z.DecExt(yyv108) { - } else if !yym109 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv108) - } else { - z.DecFallback(yyv108, false) - } - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ConntrackMax = 0 - } else { - x.ConntrackMax = int(r.DecodeInt(codecSelferBitsize1234)) - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ConntrackTCPEstablishedTimeout = pkg1_unversioned.Duration{} - } else { - yyv111 := &x.ConntrackTCPEstablishedTimeout - yym112 := z.DecBinary() - _ = yym112 - if false { - } else if z.HasExtensions() && z.DecExt(yyv111) { - } else if !yym112 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv111) - } else { - z.DecFallback(yyv111, false) - } - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - for { - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj91-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x ProxyMode) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym115 := z.EncBinary() - _ = yym115 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x)) - } -} - -func (x *ProxyMode) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym116 := z.DecBinary() - _ = yym116 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - *((*string)(x)) = r.DecodeString() - } -} - -func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym117 := z.EncBinary() - _ = yym117 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep118 := !z.EncBinary() - yy2arr118 := z.EncBasicHandle().StructToArray - var yyq118 [75]bool - _, _, _ = yysep118, yyq118, yy2arr118 - const yyr118 bool = false - yyq118[46] = x.CloudProvider != "" - yyq118[47] = x.CloudConfigFile != "" - yyq118[48] = x.ResourceContainer != "" - yyq118[49] = x.CgroupRoot != "" - yyq118[51] = x.RktPath != "" - yyq118[53] = x.RktStage1Image != "" - yyq118[70] = true - yyq118[71] = x.NodeIP != "" - var yynn118 int - if yyr118 || yy2arr118 { - r.EncodeArrayStart(75) - } else { - yynn118 = 67 - for _, b := range yyq118 { - if b { - yynn118++ - } - } - r.EncodeMapStart(yynn118) - yynn118 = 0 - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym120 := z.EncBinary() - _ = yym120 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Config)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("config")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym121 := z.EncBinary() - _ = yym121 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Config)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy123 := &x.SyncFrequency - yym124 := z.EncBinary() - _ = yym124 - if false { - } else if z.HasExtensions() && z.EncExt(yy123) { - } else if !yym124 && z.IsJSONHandle() { - z.EncJSONMarshal(yy123) - } else { - z.EncFallback(yy123) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("syncFrequency")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy125 := &x.SyncFrequency - yym126 := z.EncBinary() - _ = yym126 - if false { - } else if z.HasExtensions() && z.EncExt(yy125) { - } else if !yym126 && z.IsJSONHandle() { - z.EncJSONMarshal(yy125) - } else { - z.EncFallback(yy125) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy128 := &x.FileCheckFrequency - yym129 := z.EncBinary() - _ = yym129 - if false { - } else if z.HasExtensions() && z.EncExt(yy128) { - } else if !yym129 && z.IsJSONHandle() { - z.EncJSONMarshal(yy128) - } else { - z.EncFallback(yy128) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("fileCheckFrequency")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy130 := &x.FileCheckFrequency - yym131 := z.EncBinary() - _ = yym131 - if false { - } else if z.HasExtensions() && z.EncExt(yy130) { - } else if !yym131 && z.IsJSONHandle() { - z.EncJSONMarshal(yy130) - } else { - z.EncFallback(yy130) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy133 := &x.HTTPCheckFrequency - yym134 := z.EncBinary() - _ = yym134 - if false { - } else if z.HasExtensions() && z.EncExt(yy133) { - } else if !yym134 && z.IsJSONHandle() { - z.EncJSONMarshal(yy133) - } else { - z.EncFallback(yy133) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("httpCheckFrequency")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy135 := &x.HTTPCheckFrequency - yym136 := z.EncBinary() - _ = yym136 - if false { - } else if z.HasExtensions() && z.EncExt(yy135) { - } else if !yym136 && z.IsJSONHandle() { - z.EncJSONMarshal(yy135) - } else { - z.EncFallback(yy135) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym138 := z.EncBinary() - _ = yym138 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ManifestURL)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("manifestURL")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym139 := z.EncBinary() - _ = yym139 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ManifestURL)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym141 := z.EncBinary() - _ = yym141 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ManifestURLHeader)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("manifestURLHeader")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym142 := z.EncBinary() - _ = yym142 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ManifestURLHeader)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym144 := z.EncBinary() - _ = yym144 - if false { - } else { - r.EncodeBool(bool(x.EnableServer)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("enableServer")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym145 := z.EncBinary() - _ = yym145 - if false { - } else { - r.EncodeBool(bool(x.EnableServer)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym147 := z.EncBinary() - _ = yym147 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Address)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("address")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym148 := z.EncBinary() - _ = yym148 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Address)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym150 := z.EncBinary() - _ = yym150 - if false { - } else { - r.EncodeUint(uint64(x.Port)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("port")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym151 := z.EncBinary() - _ = yym151 - if false { - } else { - r.EncodeUint(uint64(x.Port)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym153 := z.EncBinary() - _ = yym153 - if false { - } else { - r.EncodeUint(uint64(x.ReadOnlyPort)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("readOnlyPort")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym154 := z.EncBinary() - _ = yym154 - if false { - } else { - r.EncodeUint(uint64(x.ReadOnlyPort)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym156 := z.EncBinary() - _ = yym156 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.TLSCertFile)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("tLSCertFile")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym157 := z.EncBinary() - _ = yym157 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.TLSCertFile)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym159 := z.EncBinary() - _ = yym159 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.TLSPrivateKeyFile)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("tLSPrivateKeyFile")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym160 := z.EncBinary() - _ = yym160 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.TLSPrivateKeyFile)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym162 := z.EncBinary() - _ = yym162 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.CertDirectory)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("certDirectory")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym163 := z.EncBinary() - _ = yym163 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.CertDirectory)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym165 := z.EncBinary() - _ = yym165 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.HostnameOverride)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("hostnameOverride")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym166 := z.EncBinary() - _ = yym166 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.HostnameOverride)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym168 := z.EncBinary() - _ = yym168 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.PodInfraContainerImage)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("podInfraContainerImage")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym169 := z.EncBinary() - _ = yym169 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.PodInfraContainerImage)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym171 := z.EncBinary() - _ = yym171 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.DockerEndpoint)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("dockerEndpoint")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym172 := z.EncBinary() - _ = yym172 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.DockerEndpoint)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym174 := z.EncBinary() - _ = yym174 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.RootDirectory)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("rootDirectory")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym175 := z.EncBinary() - _ = yym175 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.RootDirectory)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym177 := z.EncBinary() - _ = yym177 - if false { - } else { - r.EncodeBool(bool(x.AllowPrivileged)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("allowPrivileged")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym178 := z.EncBinary() - _ = yym178 - if false { - } else { - r.EncodeBool(bool(x.AllowPrivileged)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym180 := z.EncBinary() - _ = yym180 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.HostNetworkSources)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("hostNetworkSources")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym181 := z.EncBinary() - _ = yym181 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.HostNetworkSources)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym183 := z.EncBinary() - _ = yym183 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.HostPIDSources)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("hostPIDSources")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym184 := z.EncBinary() - _ = yym184 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.HostPIDSources)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym186 := z.EncBinary() - _ = yym186 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.HostIPCSources)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("hostIPCSources")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym187 := z.EncBinary() - _ = yym187 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.HostIPCSources)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym189 := z.EncBinary() - _ = yym189 - if false { - } else { - r.EncodeFloat64(float64(x.RegistryPullQPS)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("registryPullQPS")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym190 := z.EncBinary() - _ = yym190 - if false { - } else { - r.EncodeFloat64(float64(x.RegistryPullQPS)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym192 := z.EncBinary() - _ = yym192 - if false { - } else { - r.EncodeInt(int64(x.RegistryBurst)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("registryBurst")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym193 := z.EncBinary() - _ = yym193 - if false { - } else { - r.EncodeInt(int64(x.RegistryBurst)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym195 := z.EncBinary() - _ = yym195 - if false { - } else { - r.EncodeFloat32(float32(x.EventRecordQPS)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("eventRecordQPS")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym196 := z.EncBinary() - _ = yym196 - if false { - } else { - r.EncodeFloat32(float32(x.EventRecordQPS)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym198 := z.EncBinary() - _ = yym198 - if false { - } else { - r.EncodeInt(int64(x.EventBurst)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("eventBurst")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym199 := z.EncBinary() - _ = yym199 - if false { - } else { - r.EncodeInt(int64(x.EventBurst)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym201 := z.EncBinary() - _ = yym201 - if false { - } else { - r.EncodeBool(bool(x.EnableDebuggingHandlers)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("enableDebuggingHandlers")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym202 := z.EncBinary() - _ = yym202 - if false { - } else { - r.EncodeBool(bool(x.EnableDebuggingHandlers)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy204 := &x.MinimumGCAge - yym205 := z.EncBinary() - _ = yym205 - if false { - } else if z.HasExtensions() && z.EncExt(yy204) { - } else if !yym205 && z.IsJSONHandle() { - z.EncJSONMarshal(yy204) - } else { - z.EncFallback(yy204) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("minimumGCAge")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy206 := &x.MinimumGCAge - yym207 := z.EncBinary() - _ = yym207 - if false { - } else if z.HasExtensions() && z.EncExt(yy206) { - } else if !yym207 && z.IsJSONHandle() { - z.EncJSONMarshal(yy206) - } else { - z.EncFallback(yy206) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym209 := z.EncBinary() - _ = yym209 - if false { - } else { - r.EncodeInt(int64(x.MaxPerPodContainerCount)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("maxPerPodContainerCount")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym210 := z.EncBinary() - _ = yym210 - if false { - } else { - r.EncodeInt(int64(x.MaxPerPodContainerCount)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym212 := z.EncBinary() - _ = yym212 - if false { - } else { - r.EncodeInt(int64(x.MaxContainerCount)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("maxContainerCount")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym213 := z.EncBinary() - _ = yym213 - if false { - } else { - r.EncodeInt(int64(x.MaxContainerCount)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym215 := z.EncBinary() - _ = yym215 - if false { - } else { - r.EncodeUint(uint64(x.CAdvisorPort)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("cAdvisorPort")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym216 := z.EncBinary() - _ = yym216 - if false { - } else { - r.EncodeUint(uint64(x.CAdvisorPort)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym218 := z.EncBinary() - _ = yym218 - if false { - } else { - r.EncodeInt(int64(x.HealthzPort)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("healthzPort")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym219 := z.EncBinary() - _ = yym219 - if false { - } else { - r.EncodeInt(int64(x.HealthzPort)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym221 := z.EncBinary() - _ = yym221 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.HealthzBindAddress)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("healthzBindAddress")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym222 := z.EncBinary() - _ = yym222 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.HealthzBindAddress)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym224 := z.EncBinary() - _ = yym224 - if false { - } else { - r.EncodeInt(int64(x.OOMScoreAdj)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("oomScoreAdj")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym225 := z.EncBinary() - _ = yym225 - if false { - } else { - r.EncodeInt(int64(x.OOMScoreAdj)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym227 := z.EncBinary() - _ = yym227 - if false { - } else { - r.EncodeBool(bool(x.RegisterNode)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("registerNode")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym228 := z.EncBinary() - _ = yym228 - if false { - } else { - r.EncodeBool(bool(x.RegisterNode)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym230 := z.EncBinary() - _ = yym230 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ClusterDomain)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("clusterDomain")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym231 := z.EncBinary() - _ = yym231 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ClusterDomain)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym233 := z.EncBinary() - _ = yym233 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.MasterServiceNamespace)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("masterServiceNamespace")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym234 := z.EncBinary() - _ = yym234 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.MasterServiceNamespace)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym236 := z.EncBinary() - _ = yym236 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ClusterDNS)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("clusterDNS")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym237 := z.EncBinary() - _ = yym237 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ClusterDNS)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy239 := &x.StreamingConnectionIdleTimeout - yym240 := z.EncBinary() - _ = yym240 - if false { - } else if z.HasExtensions() && z.EncExt(yy239) { - } else if !yym240 && z.IsJSONHandle() { - z.EncJSONMarshal(yy239) - } else { - z.EncFallback(yy239) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("streamingConnectionIdleTimeout")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy241 := &x.StreamingConnectionIdleTimeout - yym242 := z.EncBinary() - _ = yym242 - if false { - } else if z.HasExtensions() && z.EncExt(yy241) { - } else if !yym242 && z.IsJSONHandle() { - z.EncJSONMarshal(yy241) - } else { - z.EncFallback(yy241) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy244 := &x.NodeStatusUpdateFrequency - yym245 := z.EncBinary() - _ = yym245 - if false { - } else if z.HasExtensions() && z.EncExt(yy244) { - } else if !yym245 && z.IsJSONHandle() { - z.EncJSONMarshal(yy244) - } else { - z.EncFallback(yy244) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("nodeStatusUpdateFrequency")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy246 := &x.NodeStatusUpdateFrequency - yym247 := z.EncBinary() - _ = yym247 - if false { - } else if z.HasExtensions() && z.EncExt(yy246) { - } else if !yym247 && z.IsJSONHandle() { - z.EncJSONMarshal(yy246) - } else { - z.EncFallback(yy246) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym249 := z.EncBinary() - _ = yym249 - if false { - } else { - r.EncodeInt(int64(x.ImageGCHighThresholdPercent)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("imageGCHighThresholdPercent")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym250 := z.EncBinary() - _ = yym250 - if false { - } else { - r.EncodeInt(int64(x.ImageGCHighThresholdPercent)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym252 := z.EncBinary() - _ = yym252 - if false { - } else { - r.EncodeInt(int64(x.ImageGCLowThresholdPercent)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("imageGCLowThresholdPercent")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym253 := z.EncBinary() - _ = yym253 - if false { - } else { - r.EncodeInt(int64(x.ImageGCLowThresholdPercent)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym255 := z.EncBinary() - _ = yym255 - if false { - } else { - r.EncodeInt(int64(x.LowDiskSpaceThresholdMB)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("lowDiskSpaceThresholdMB")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym256 := z.EncBinary() - _ = yym256 - if false { - } else { - r.EncodeInt(int64(x.LowDiskSpaceThresholdMB)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy258 := &x.VolumeStatsAggPeriod - yym259 := z.EncBinary() - _ = yym259 - if false { - } else if z.HasExtensions() && z.EncExt(yy258) { - } else if !yym259 && z.IsJSONHandle() { - z.EncJSONMarshal(yy258) - } else { - z.EncFallback(yy258) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("VolumeStatsAggPeriod")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy260 := &x.VolumeStatsAggPeriod - yym261 := z.EncBinary() - _ = yym261 - if false { - } else if z.HasExtensions() && z.EncExt(yy260) { - } else if !yym261 && z.IsJSONHandle() { - z.EncJSONMarshal(yy260) - } else { - z.EncFallback(yy260) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym263 := z.EncBinary() - _ = yym263 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.NetworkPluginName)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("networkPluginName")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym264 := z.EncBinary() - _ = yym264 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.NetworkPluginName)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym266 := z.EncBinary() - _ = yym266 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.NetworkPluginDir)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("networkPluginDir")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym267 := z.EncBinary() - _ = yym267 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.NetworkPluginDir)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym269 := z.EncBinary() - _ = yym269 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.VolumePluginDir)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("volumePluginDir")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym270 := z.EncBinary() - _ = yym270 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.VolumePluginDir)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq118[46] { - yym272 := z.EncBinary() - _ = yym272 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.CloudProvider)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq118[46] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("cloudProvider")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym273 := z.EncBinary() - _ = yym273 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.CloudProvider)) - } - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq118[47] { - yym275 := z.EncBinary() - _ = yym275 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.CloudConfigFile)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq118[47] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("cloudConfigFile")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym276 := z.EncBinary() - _ = yym276 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.CloudConfigFile)) - } - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq118[48] { - yym278 := z.EncBinary() - _ = yym278 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ResourceContainer)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq118[48] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("resourceContainer")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym279 := z.EncBinary() - _ = yym279 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ResourceContainer)) - } - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq118[49] { - yym281 := z.EncBinary() - _ = yym281 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.CgroupRoot)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq118[49] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("cgroupRoot")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym282 := z.EncBinary() - _ = yym282 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.CgroupRoot)) - } - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym284 := z.EncBinary() - _ = yym284 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ContainerRuntime)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("containerRuntime")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym285 := z.EncBinary() - _ = yym285 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ContainerRuntime)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq118[51] { - yym287 := z.EncBinary() - _ = yym287 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.RktPath)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq118[51] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("rktPath")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym288 := z.EncBinary() - _ = yym288 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.RktPath)) - } - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym290 := z.EncBinary() - _ = yym290 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.LockFilePath)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("lockFilePath")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym291 := z.EncBinary() - _ = yym291 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.LockFilePath)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq118[53] { - yym293 := z.EncBinary() - _ = yym293 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.RktStage1Image)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq118[53] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("rktStage1Image")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym294 := z.EncBinary() - _ = yym294 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.RktStage1Image)) - } - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym296 := z.EncBinary() - _ = yym296 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.SystemContainer)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("systemContainer")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym297 := z.EncBinary() - _ = yym297 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.SystemContainer)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym299 := z.EncBinary() - _ = yym299 - if false { - } else { - r.EncodeBool(bool(x.ConfigureCBR0)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("configureCbr0")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym300 := z.EncBinary() - _ = yym300 - if false { - } else { - r.EncodeBool(bool(x.ConfigureCBR0)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym302 := z.EncBinary() - _ = yym302 - if false { - } else { - r.EncodeBool(bool(x.HairpinMode)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("configureHairpinMode")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym303 := z.EncBinary() - _ = yym303 - if false { - } else { - r.EncodeBool(bool(x.HairpinMode)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym305 := z.EncBinary() - _ = yym305 - if false { - } else { - r.EncodeInt(int64(x.MaxPods)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("maxPods")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym306 := z.EncBinary() - _ = yym306 - if false { - } else { - r.EncodeInt(int64(x.MaxPods)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym308 := z.EncBinary() - _ = yym308 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.DockerExecHandlerName)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("dockerExecHandlerName")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym309 := z.EncBinary() - _ = yym309 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.DockerExecHandlerName)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym311 := z.EncBinary() - _ = yym311 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.PodCIDR)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("podCIDR")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym312 := z.EncBinary() - _ = yym312 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.PodCIDR)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym314 := z.EncBinary() - _ = yym314 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ResolverConfig)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("resolvConf")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym315 := z.EncBinary() - _ = yym315 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ResolverConfig)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym317 := z.EncBinary() - _ = yym317 - if false { - } else { - r.EncodeBool(bool(x.CPUCFSQuota)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("cpuCFSQuota")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym318 := z.EncBinary() - _ = yym318 - if false { - } else { - r.EncodeBool(bool(x.CPUCFSQuota)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym320 := z.EncBinary() - _ = yym320 - if false { - } else { - r.EncodeBool(bool(x.Containerized)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("containerized")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym321 := z.EncBinary() - _ = yym321 - if false { - } else { - r.EncodeBool(bool(x.Containerized)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym323 := z.EncBinary() - _ = yym323 - if false { - } else { - r.EncodeUint(uint64(x.MaxOpenFiles)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("maxOpenFiles")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym324 := z.EncBinary() - _ = yym324 - if false { - } else { - r.EncodeUint(uint64(x.MaxOpenFiles)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym326 := z.EncBinary() - _ = yym326 - if false { - } else { - r.EncodeBool(bool(x.ReconcileCIDR)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("reconcileCIDR")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym327 := z.EncBinary() - _ = yym327 - if false { - } else { - r.EncodeBool(bool(x.ReconcileCIDR)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym329 := z.EncBinary() - _ = yym329 - if false { - } else { - r.EncodeBool(bool(x.RegisterSchedulable)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("registerSchedulable")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym330 := z.EncBinary() - _ = yym330 - if false { - } else { - r.EncodeBool(bool(x.RegisterSchedulable)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym332 := z.EncBinary() - _ = yym332 - if false { - } else { - r.EncodeFloat32(float32(x.KubeAPIQPS)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kubeAPIQPS")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym333 := z.EncBinary() - _ = yym333 - if false { - } else { - r.EncodeFloat32(float32(x.KubeAPIQPS)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym335 := z.EncBinary() - _ = yym335 - if false { - } else { - r.EncodeInt(int64(x.KubeAPIBurst)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kubeAPIBurst")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym336 := z.EncBinary() - _ = yym336 - if false { - } else { - r.EncodeInt(int64(x.KubeAPIBurst)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym338 := z.EncBinary() - _ = yym338 - if false { - } else { - r.EncodeBool(bool(x.SerializeImagePulls)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("serializeImagePulls")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym339 := z.EncBinary() - _ = yym339 - if false { - } else { - r.EncodeBool(bool(x.SerializeImagePulls)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym341 := z.EncBinary() - _ = yym341 - if false { - } else { - r.EncodeBool(bool(x.ExperimentalFlannelOverlay)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("experimentalFlannelOverlay")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym342 := z.EncBinary() - _ = yym342 - if false { - } else { - r.EncodeBool(bool(x.ExperimentalFlannelOverlay)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq118[70] { - yy344 := &x.OutOfDiskTransitionFrequency - yym345 := z.EncBinary() - _ = yym345 - if false { - } else if z.HasExtensions() && z.EncExt(yy344) { - } else if !yym345 && z.IsJSONHandle() { - z.EncJSONMarshal(yy344) - } else { - z.EncFallback(yy344) - } - } else { - r.EncodeNil() - } - } else { - if yyq118[70] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("outOfDiskTransitionFrequency")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy346 := &x.OutOfDiskTransitionFrequency - yym347 := z.EncBinary() - _ = yym347 - if false { - } else if z.HasExtensions() && z.EncExt(yy346) { - } else if !yym347 && z.IsJSONHandle() { - z.EncJSONMarshal(yy346) - } else { - z.EncFallback(yy346) - } - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq118[71] { - yym349 := z.EncBinary() - _ = yym349 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.NodeIP)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq118[71] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("nodeIP")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym350 := z.EncBinary() - _ = yym350 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.NodeIP)) - } - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.NodeLabels == nil { - r.EncodeNil() - } else { - yym352 := z.EncBinary() - _ = yym352 - if false { - } else { - z.F.EncMapStringStringV(x.NodeLabels, false, e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("nodeLabels")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.NodeLabels == nil { - r.EncodeNil() - } else { - yym353 := z.EncBinary() - _ = yym353 - if false { - } else { - z.F.EncMapStringStringV(x.NodeLabels, false, e) - } - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym355 := z.EncBinary() - _ = yym355 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.NonMasqueradeCIDR)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("nonMasqueradeCIDR")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym356 := z.EncBinary() - _ = yym356 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.NonMasqueradeCIDR)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym358 := z.EncBinary() - _ = yym358 - if false { - } else { - r.EncodeBool(bool(x.EnableCustomMetrics)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("enableCustomMetrics")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym359 := z.EncBinary() - _ = yym359 - if false { - } else { - r.EncodeBool(bool(x.EnableCustomMetrics)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *KubeletConfiguration) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym360 := z.DecBinary() - _ = yym360 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct361 := r.ContainerType() - if yyct361 == codecSelferValueTypeMap1234 { - yyl361 := r.ReadMapStart() - if yyl361 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl361, d) - } - } else if yyct361 == codecSelferValueTypeArray1234 { - yyl361 := r.ReadArrayStart() - if yyl361 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl361, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys362Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys362Slc - var yyhl362 bool = l >= 0 - for yyj362 := 0; ; yyj362++ { - if yyhl362 { - if yyj362 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys362Slc = r.DecodeBytes(yys362Slc, true, true) - yys362 := string(yys362Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys362 { - case "config": - if r.TryDecodeAsNil() { - x.Config = "" - } else { - x.Config = string(r.DecodeString()) - } - case "syncFrequency": - if r.TryDecodeAsNil() { - x.SyncFrequency = pkg1_unversioned.Duration{} - } else { - yyv364 := &x.SyncFrequency - yym365 := z.DecBinary() - _ = yym365 - if false { - } else if z.HasExtensions() && z.DecExt(yyv364) { - } else if !yym365 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv364) - } else { - z.DecFallback(yyv364, false) - } - } - case "fileCheckFrequency": - if r.TryDecodeAsNil() { - x.FileCheckFrequency = pkg1_unversioned.Duration{} - } else { - yyv366 := &x.FileCheckFrequency - yym367 := z.DecBinary() - _ = yym367 - if false { - } else if z.HasExtensions() && z.DecExt(yyv366) { - } else if !yym367 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv366) - } else { - z.DecFallback(yyv366, false) - } - } - case "httpCheckFrequency": - if r.TryDecodeAsNil() { - x.HTTPCheckFrequency = pkg1_unversioned.Duration{} - } else { - yyv368 := &x.HTTPCheckFrequency - yym369 := z.DecBinary() - _ = yym369 - if false { - } else if z.HasExtensions() && z.DecExt(yyv368) { - } else if !yym369 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv368) - } else { - z.DecFallback(yyv368, false) - } - } - case "manifestURL": - if r.TryDecodeAsNil() { - x.ManifestURL = "" - } else { - x.ManifestURL = string(r.DecodeString()) - } - case "manifestURLHeader": - if r.TryDecodeAsNil() { - x.ManifestURLHeader = "" - } else { - x.ManifestURLHeader = string(r.DecodeString()) - } - case "enableServer": - if r.TryDecodeAsNil() { - x.EnableServer = false - } else { - x.EnableServer = bool(r.DecodeBool()) - } - case "address": - if r.TryDecodeAsNil() { - x.Address = "" - } else { - x.Address = string(r.DecodeString()) - } - case "port": - if r.TryDecodeAsNil() { - x.Port = 0 - } else { - x.Port = uint(r.DecodeUint(codecSelferBitsize1234)) - } - case "readOnlyPort": - if r.TryDecodeAsNil() { - x.ReadOnlyPort = 0 - } else { - x.ReadOnlyPort = uint(r.DecodeUint(codecSelferBitsize1234)) - } - case "tLSCertFile": - if r.TryDecodeAsNil() { - x.TLSCertFile = "" - } else { - x.TLSCertFile = string(r.DecodeString()) - } - case "tLSPrivateKeyFile": - if r.TryDecodeAsNil() { - x.TLSPrivateKeyFile = "" - } else { - x.TLSPrivateKeyFile = string(r.DecodeString()) - } - case "certDirectory": - if r.TryDecodeAsNil() { - x.CertDirectory = "" - } else { - x.CertDirectory = string(r.DecodeString()) - } - case "hostnameOverride": - if r.TryDecodeAsNil() { - x.HostnameOverride = "" - } else { - x.HostnameOverride = string(r.DecodeString()) - } - case "podInfraContainerImage": - if r.TryDecodeAsNil() { - x.PodInfraContainerImage = "" - } else { - x.PodInfraContainerImage = string(r.DecodeString()) - } - case "dockerEndpoint": - if r.TryDecodeAsNil() { - x.DockerEndpoint = "" - } else { - x.DockerEndpoint = string(r.DecodeString()) - } - case "rootDirectory": - if r.TryDecodeAsNil() { - x.RootDirectory = "" - } else { - x.RootDirectory = string(r.DecodeString()) - } - case "allowPrivileged": - if r.TryDecodeAsNil() { - x.AllowPrivileged = false - } else { - x.AllowPrivileged = bool(r.DecodeBool()) - } - case "hostNetworkSources": - if r.TryDecodeAsNil() { - x.HostNetworkSources = "" - } else { - x.HostNetworkSources = string(r.DecodeString()) - } - case "hostPIDSources": - if r.TryDecodeAsNil() { - x.HostPIDSources = "" - } else { - x.HostPIDSources = string(r.DecodeString()) - } - case "hostIPCSources": - if r.TryDecodeAsNil() { - x.HostIPCSources = "" - } else { - x.HostIPCSources = string(r.DecodeString()) - } - case "registryPullQPS": - if r.TryDecodeAsNil() { - x.RegistryPullQPS = 0 - } else { - x.RegistryPullQPS = float64(r.DecodeFloat(false)) - } - case "registryBurst": - if r.TryDecodeAsNil() { - x.RegistryBurst = 0 - } else { - x.RegistryBurst = int(r.DecodeInt(codecSelferBitsize1234)) - } - case "eventRecordQPS": - if r.TryDecodeAsNil() { - x.EventRecordQPS = 0 - } else { - x.EventRecordQPS = float32(r.DecodeFloat(true)) - } - case "eventBurst": - if r.TryDecodeAsNil() { - x.EventBurst = 0 - } else { - x.EventBurst = int(r.DecodeInt(codecSelferBitsize1234)) - } - case "enableDebuggingHandlers": - if r.TryDecodeAsNil() { - x.EnableDebuggingHandlers = false - } else { - x.EnableDebuggingHandlers = bool(r.DecodeBool()) - } - case "minimumGCAge": - if r.TryDecodeAsNil() { - x.MinimumGCAge = pkg1_unversioned.Duration{} - } else { - yyv392 := &x.MinimumGCAge - yym393 := z.DecBinary() - _ = yym393 - if false { - } else if z.HasExtensions() && z.DecExt(yyv392) { - } else if !yym393 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv392) - } else { - z.DecFallback(yyv392, false) - } - } - case "maxPerPodContainerCount": - if r.TryDecodeAsNil() { - x.MaxPerPodContainerCount = 0 - } else { - x.MaxPerPodContainerCount = int(r.DecodeInt(codecSelferBitsize1234)) - } - case "maxContainerCount": - if r.TryDecodeAsNil() { - x.MaxContainerCount = 0 - } else { - x.MaxContainerCount = int(r.DecodeInt(codecSelferBitsize1234)) - } - case "cAdvisorPort": - if r.TryDecodeAsNil() { - x.CAdvisorPort = 0 - } else { - x.CAdvisorPort = uint(r.DecodeUint(codecSelferBitsize1234)) - } - case "healthzPort": - if r.TryDecodeAsNil() { - x.HealthzPort = 0 - } else { - x.HealthzPort = int(r.DecodeInt(codecSelferBitsize1234)) - } - case "healthzBindAddress": - if r.TryDecodeAsNil() { - x.HealthzBindAddress = "" - } else { - x.HealthzBindAddress = string(r.DecodeString()) - } - case "oomScoreAdj": - if r.TryDecodeAsNil() { - x.OOMScoreAdj = 0 - } else { - x.OOMScoreAdj = int(r.DecodeInt(codecSelferBitsize1234)) - } - case "registerNode": - if r.TryDecodeAsNil() { - x.RegisterNode = false - } else { - x.RegisterNode = bool(r.DecodeBool()) - } - case "clusterDomain": - if r.TryDecodeAsNil() { - x.ClusterDomain = "" - } else { - x.ClusterDomain = string(r.DecodeString()) - } - case "masterServiceNamespace": - if r.TryDecodeAsNil() { - x.MasterServiceNamespace = "" - } else { - x.MasterServiceNamespace = string(r.DecodeString()) - } - case "clusterDNS": - if r.TryDecodeAsNil() { - x.ClusterDNS = "" - } else { - x.ClusterDNS = string(r.DecodeString()) - } - case "streamingConnectionIdleTimeout": - if r.TryDecodeAsNil() { - x.StreamingConnectionIdleTimeout = pkg1_unversioned.Duration{} - } else { - yyv404 := &x.StreamingConnectionIdleTimeout - yym405 := z.DecBinary() - _ = yym405 - if false { - } else if z.HasExtensions() && z.DecExt(yyv404) { - } else if !yym405 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv404) - } else { - z.DecFallback(yyv404, false) - } - } - case "nodeStatusUpdateFrequency": - if r.TryDecodeAsNil() { - x.NodeStatusUpdateFrequency = pkg1_unversioned.Duration{} - } else { - yyv406 := &x.NodeStatusUpdateFrequency - yym407 := z.DecBinary() - _ = yym407 - if false { - } else if z.HasExtensions() && z.DecExt(yyv406) { - } else if !yym407 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv406) - } else { - z.DecFallback(yyv406, false) - } - } - case "imageGCHighThresholdPercent": - if r.TryDecodeAsNil() { - x.ImageGCHighThresholdPercent = 0 - } else { - x.ImageGCHighThresholdPercent = int(r.DecodeInt(codecSelferBitsize1234)) - } - case "imageGCLowThresholdPercent": - if r.TryDecodeAsNil() { - x.ImageGCLowThresholdPercent = 0 - } else { - x.ImageGCLowThresholdPercent = int(r.DecodeInt(codecSelferBitsize1234)) - } - case "lowDiskSpaceThresholdMB": - if r.TryDecodeAsNil() { - x.LowDiskSpaceThresholdMB = 0 - } else { - x.LowDiskSpaceThresholdMB = int(r.DecodeInt(codecSelferBitsize1234)) - } - case "VolumeStatsAggPeriod": - if r.TryDecodeAsNil() { - x.VolumeStatsAggPeriod = pkg1_unversioned.Duration{} - } else { - yyv411 := &x.VolumeStatsAggPeriod - yym412 := z.DecBinary() - _ = yym412 - if false { - } else if z.HasExtensions() && z.DecExt(yyv411) { - } else if !yym412 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv411) - } else { - z.DecFallback(yyv411, false) - } - } - case "networkPluginName": - if r.TryDecodeAsNil() { - x.NetworkPluginName = "" - } else { - x.NetworkPluginName = string(r.DecodeString()) - } - case "networkPluginDir": - if r.TryDecodeAsNil() { - x.NetworkPluginDir = "" - } else { - x.NetworkPluginDir = string(r.DecodeString()) - } - case "volumePluginDir": - if r.TryDecodeAsNil() { - x.VolumePluginDir = "" - } else { - x.VolumePluginDir = string(r.DecodeString()) - } - case "cloudProvider": - if r.TryDecodeAsNil() { - x.CloudProvider = "" - } else { - x.CloudProvider = string(r.DecodeString()) - } - case "cloudConfigFile": - if r.TryDecodeAsNil() { - x.CloudConfigFile = "" - } else { - x.CloudConfigFile = string(r.DecodeString()) - } - case "resourceContainer": - if r.TryDecodeAsNil() { - x.ResourceContainer = "" - } else { - x.ResourceContainer = string(r.DecodeString()) - } - case "cgroupRoot": - if r.TryDecodeAsNil() { - x.CgroupRoot = "" - } else { - x.CgroupRoot = string(r.DecodeString()) - } - case "containerRuntime": - if r.TryDecodeAsNil() { - x.ContainerRuntime = "" - } else { - x.ContainerRuntime = string(r.DecodeString()) - } - case "rktPath": - if r.TryDecodeAsNil() { - x.RktPath = "" - } else { - x.RktPath = string(r.DecodeString()) - } - case "lockFilePath": - if r.TryDecodeAsNil() { - x.LockFilePath = "" - } else { - x.LockFilePath = string(r.DecodeString()) - } - case "rktStage1Image": - if r.TryDecodeAsNil() { - x.RktStage1Image = "" - } else { - x.RktStage1Image = string(r.DecodeString()) - } - case "systemContainer": - if r.TryDecodeAsNil() { - x.SystemContainer = "" - } else { - x.SystemContainer = string(r.DecodeString()) - } - case "configureCbr0": - if r.TryDecodeAsNil() { - x.ConfigureCBR0 = false - } else { - x.ConfigureCBR0 = bool(r.DecodeBool()) - } - case "configureHairpinMode": - if r.TryDecodeAsNil() { - x.HairpinMode = false - } else { - x.HairpinMode = bool(r.DecodeBool()) - } - case "maxPods": - if r.TryDecodeAsNil() { - x.MaxPods = 0 - } else { - x.MaxPods = int(r.DecodeInt(codecSelferBitsize1234)) - } - case "dockerExecHandlerName": - if r.TryDecodeAsNil() { - x.DockerExecHandlerName = "" - } else { - x.DockerExecHandlerName = string(r.DecodeString()) - } - case "podCIDR": - if r.TryDecodeAsNil() { - x.PodCIDR = "" - } else { - x.PodCIDR = string(r.DecodeString()) - } - case "resolvConf": - if r.TryDecodeAsNil() { - x.ResolverConfig = "" - } else { - x.ResolverConfig = string(r.DecodeString()) - } - case "cpuCFSQuota": - if r.TryDecodeAsNil() { - x.CPUCFSQuota = false - } else { - x.CPUCFSQuota = bool(r.DecodeBool()) - } - case "containerized": - if r.TryDecodeAsNil() { - x.Containerized = false - } else { - x.Containerized = bool(r.DecodeBool()) - } - case "maxOpenFiles": - if r.TryDecodeAsNil() { - x.MaxOpenFiles = 0 - } else { - x.MaxOpenFiles = uint64(r.DecodeUint(64)) - } - case "reconcileCIDR": - if r.TryDecodeAsNil() { - x.ReconcileCIDR = false - } else { - x.ReconcileCIDR = bool(r.DecodeBool()) - } - case "registerSchedulable": - if r.TryDecodeAsNil() { - x.RegisterSchedulable = false - } else { - x.RegisterSchedulable = bool(r.DecodeBool()) - } - case "kubeAPIQPS": - if r.TryDecodeAsNil() { - x.KubeAPIQPS = 0 - } else { - x.KubeAPIQPS = float32(r.DecodeFloat(true)) - } - case "kubeAPIBurst": - if r.TryDecodeAsNil() { - x.KubeAPIBurst = 0 - } else { - x.KubeAPIBurst = int(r.DecodeInt(codecSelferBitsize1234)) - } - case "serializeImagePulls": - if r.TryDecodeAsNil() { - x.SerializeImagePulls = false - } else { - x.SerializeImagePulls = bool(r.DecodeBool()) - } - case "experimentalFlannelOverlay": - if r.TryDecodeAsNil() { - x.ExperimentalFlannelOverlay = false - } else { - x.ExperimentalFlannelOverlay = bool(r.DecodeBool()) - } - case "outOfDiskTransitionFrequency": - if r.TryDecodeAsNil() { - x.OutOfDiskTransitionFrequency = pkg1_unversioned.Duration{} - } else { - yyv440 := &x.OutOfDiskTransitionFrequency - yym441 := z.DecBinary() - _ = yym441 - if false { - } else if z.HasExtensions() && z.DecExt(yyv440) { - } else if !yym441 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv440) - } else { - z.DecFallback(yyv440, false) - } - } - case "nodeIP": - if r.TryDecodeAsNil() { - x.NodeIP = "" - } else { - x.NodeIP = string(r.DecodeString()) - } - case "nodeLabels": - if r.TryDecodeAsNil() { - x.NodeLabels = nil - } else { - yyv443 := &x.NodeLabels - yym444 := z.DecBinary() - _ = yym444 - if false { - } else { - z.F.DecMapStringStringX(yyv443, false, d) - } - } - case "nonMasqueradeCIDR": - if r.TryDecodeAsNil() { - x.NonMasqueradeCIDR = "" - } else { - x.NonMasqueradeCIDR = string(r.DecodeString()) - } - case "enableCustomMetrics": - if r.TryDecodeAsNil() { - x.EnableCustomMetrics = false - } else { - x.EnableCustomMetrics = bool(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys362) - } // end switch yys362 - } // end for yyj362 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj447 int - var yyb447 bool - var yyhl447 bool = l >= 0 - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Config = "" - } else { - x.Config = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.SyncFrequency = pkg1_unversioned.Duration{} - } else { - yyv449 := &x.SyncFrequency - yym450 := z.DecBinary() - _ = yym450 - if false { - } else if z.HasExtensions() && z.DecExt(yyv449) { - } else if !yym450 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv449) - } else { - z.DecFallback(yyv449, false) - } - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.FileCheckFrequency = pkg1_unversioned.Duration{} - } else { - yyv451 := &x.FileCheckFrequency - yym452 := z.DecBinary() - _ = yym452 - if false { - } else if z.HasExtensions() && z.DecExt(yyv451) { - } else if !yym452 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv451) - } else { - z.DecFallback(yyv451, false) - } - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HTTPCheckFrequency = pkg1_unversioned.Duration{} - } else { - yyv453 := &x.HTTPCheckFrequency - yym454 := z.DecBinary() - _ = yym454 - if false { - } else if z.HasExtensions() && z.DecExt(yyv453) { - } else if !yym454 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv453) - } else { - z.DecFallback(yyv453, false) - } - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ManifestURL = "" - } else { - x.ManifestURL = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ManifestURLHeader = "" - } else { - x.ManifestURLHeader = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.EnableServer = false - } else { - x.EnableServer = bool(r.DecodeBool()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Address = "" - } else { - x.Address = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Port = 0 - } else { - x.Port = uint(r.DecodeUint(codecSelferBitsize1234)) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ReadOnlyPort = 0 - } else { - x.ReadOnlyPort = uint(r.DecodeUint(codecSelferBitsize1234)) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.TLSCertFile = "" - } else { - x.TLSCertFile = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.TLSPrivateKeyFile = "" - } else { - x.TLSPrivateKeyFile = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.CertDirectory = "" - } else { - x.CertDirectory = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HostnameOverride = "" - } else { - x.HostnameOverride = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.PodInfraContainerImage = "" - } else { - x.PodInfraContainerImage = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.DockerEndpoint = "" - } else { - x.DockerEndpoint = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.RootDirectory = "" - } else { - x.RootDirectory = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.AllowPrivileged = false - } else { - x.AllowPrivileged = bool(r.DecodeBool()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HostNetworkSources = "" - } else { - x.HostNetworkSources = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HostPIDSources = "" - } else { - x.HostPIDSources = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HostIPCSources = "" - } else { - x.HostIPCSources = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.RegistryPullQPS = 0 - } else { - x.RegistryPullQPS = float64(r.DecodeFloat(false)) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.RegistryBurst = 0 - } else { - x.RegistryBurst = int(r.DecodeInt(codecSelferBitsize1234)) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.EventRecordQPS = 0 - } else { - x.EventRecordQPS = float32(r.DecodeFloat(true)) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.EventBurst = 0 - } else { - x.EventBurst = int(r.DecodeInt(codecSelferBitsize1234)) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.EnableDebuggingHandlers = false - } else { - x.EnableDebuggingHandlers = bool(r.DecodeBool()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.MinimumGCAge = pkg1_unversioned.Duration{} - } else { - yyv477 := &x.MinimumGCAge - yym478 := z.DecBinary() - _ = yym478 - if false { - } else if z.HasExtensions() && z.DecExt(yyv477) { - } else if !yym478 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv477) - } else { - z.DecFallback(yyv477, false) - } - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.MaxPerPodContainerCount = 0 - } else { - x.MaxPerPodContainerCount = int(r.DecodeInt(codecSelferBitsize1234)) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.MaxContainerCount = 0 - } else { - x.MaxContainerCount = int(r.DecodeInt(codecSelferBitsize1234)) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.CAdvisorPort = 0 - } else { - x.CAdvisorPort = uint(r.DecodeUint(codecSelferBitsize1234)) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HealthzPort = 0 - } else { - x.HealthzPort = int(r.DecodeInt(codecSelferBitsize1234)) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HealthzBindAddress = "" - } else { - x.HealthzBindAddress = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.OOMScoreAdj = 0 - } else { - x.OOMScoreAdj = int(r.DecodeInt(codecSelferBitsize1234)) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.RegisterNode = false - } else { - x.RegisterNode = bool(r.DecodeBool()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ClusterDomain = "" - } else { - x.ClusterDomain = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.MasterServiceNamespace = "" - } else { - x.MasterServiceNamespace = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ClusterDNS = "" - } else { - x.ClusterDNS = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.StreamingConnectionIdleTimeout = pkg1_unversioned.Duration{} - } else { - yyv489 := &x.StreamingConnectionIdleTimeout - yym490 := z.DecBinary() - _ = yym490 - if false { - } else if z.HasExtensions() && z.DecExt(yyv489) { - } else if !yym490 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv489) - } else { - z.DecFallback(yyv489, false) - } - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.NodeStatusUpdateFrequency = pkg1_unversioned.Duration{} - } else { - yyv491 := &x.NodeStatusUpdateFrequency - yym492 := z.DecBinary() - _ = yym492 - if false { - } else if z.HasExtensions() && z.DecExt(yyv491) { - } else if !yym492 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv491) - } else { - z.DecFallback(yyv491, false) - } - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ImageGCHighThresholdPercent = 0 - } else { - x.ImageGCHighThresholdPercent = int(r.DecodeInt(codecSelferBitsize1234)) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ImageGCLowThresholdPercent = 0 - } else { - x.ImageGCLowThresholdPercent = int(r.DecodeInt(codecSelferBitsize1234)) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.LowDiskSpaceThresholdMB = 0 - } else { - x.LowDiskSpaceThresholdMB = int(r.DecodeInt(codecSelferBitsize1234)) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.VolumeStatsAggPeriod = pkg1_unversioned.Duration{} - } else { - yyv496 := &x.VolumeStatsAggPeriod - yym497 := z.DecBinary() - _ = yym497 - if false { - } else if z.HasExtensions() && z.DecExt(yyv496) { - } else if !yym497 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv496) - } else { - z.DecFallback(yyv496, false) - } - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.NetworkPluginName = "" - } else { - x.NetworkPluginName = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.NetworkPluginDir = "" - } else { - x.NetworkPluginDir = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.VolumePluginDir = "" - } else { - x.VolumePluginDir = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.CloudProvider = "" - } else { - x.CloudProvider = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.CloudConfigFile = "" - } else { - x.CloudConfigFile = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ResourceContainer = "" - } else { - x.ResourceContainer = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.CgroupRoot = "" - } else { - x.CgroupRoot = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ContainerRuntime = "" - } else { - x.ContainerRuntime = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.RktPath = "" - } else { - x.RktPath = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.LockFilePath = "" - } else { - x.LockFilePath = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.RktStage1Image = "" - } else { - x.RktStage1Image = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.SystemContainer = "" - } else { - x.SystemContainer = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ConfigureCBR0 = false - } else { - x.ConfigureCBR0 = bool(r.DecodeBool()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HairpinMode = false - } else { - x.HairpinMode = bool(r.DecodeBool()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.MaxPods = 0 - } else { - x.MaxPods = int(r.DecodeInt(codecSelferBitsize1234)) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.DockerExecHandlerName = "" - } else { - x.DockerExecHandlerName = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.PodCIDR = "" - } else { - x.PodCIDR = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ResolverConfig = "" - } else { - x.ResolverConfig = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.CPUCFSQuota = false - } else { - x.CPUCFSQuota = bool(r.DecodeBool()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Containerized = false - } else { - x.Containerized = bool(r.DecodeBool()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.MaxOpenFiles = 0 - } else { - x.MaxOpenFiles = uint64(r.DecodeUint(64)) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ReconcileCIDR = false - } else { - x.ReconcileCIDR = bool(r.DecodeBool()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.RegisterSchedulable = false - } else { - x.RegisterSchedulable = bool(r.DecodeBool()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.KubeAPIQPS = 0 - } else { - x.KubeAPIQPS = float32(r.DecodeFloat(true)) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.KubeAPIBurst = 0 - } else { - x.KubeAPIBurst = int(r.DecodeInt(codecSelferBitsize1234)) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.SerializeImagePulls = false - } else { - x.SerializeImagePulls = bool(r.DecodeBool()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ExperimentalFlannelOverlay = false - } else { - x.ExperimentalFlannelOverlay = bool(r.DecodeBool()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.OutOfDiskTransitionFrequency = pkg1_unversioned.Duration{} - } else { - yyv525 := &x.OutOfDiskTransitionFrequency - yym526 := z.DecBinary() - _ = yym526 - if false { - } else if z.HasExtensions() && z.DecExt(yyv525) { - } else if !yym526 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv525) - } else { - z.DecFallback(yyv525, false) - } - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.NodeIP = "" - } else { - x.NodeIP = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.NodeLabels = nil - } else { - yyv528 := &x.NodeLabels - yym529 := z.DecBinary() - _ = yym529 - if false { - } else { - z.F.DecMapStringStringX(yyv528, false, d) - } - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.NonMasqueradeCIDR = "" - } else { - x.NonMasqueradeCIDR = string(r.DecodeString()) - } - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.EnableCustomMetrics = false - } else { - x.EnableCustomMetrics = bool(r.DecodeBool()) - } - for { - yyj447++ - if yyhl447 { - yyb447 = yyj447 > l - } else { - yyb447 = r.CheckBreak() - } - if yyb447 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj447-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym532 := z.EncBinary() - _ = yym532 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep533 := !z.EncBinary() - yy2arr533 := z.EncBasicHandle().StructToArray - var yyq533 [11]bool - _, _, _ = yysep533, yyq533, yy2arr533 - const yyr533 bool = false - yyq533[9] = x.Kind != "" - yyq533[10] = x.APIVersion != "" - var yynn533 int - if yyr533 || yy2arr533 { - r.EncodeArrayStart(11) - } else { - yynn533 = 9 - for _, b := range yyq533 { - if b { - yynn533++ - } - } - r.EncodeMapStart(yynn533) - yynn533 = 0 - } - if yyr533 || yy2arr533 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym535 := z.EncBinary() - _ = yym535 - if false { - } else { - r.EncodeInt(int64(x.Port)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("port")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym536 := z.EncBinary() - _ = yym536 - if false { - } else { - r.EncodeInt(int64(x.Port)) - } - } - if yyr533 || yy2arr533 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym538 := z.EncBinary() - _ = yym538 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Address)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("address")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym539 := z.EncBinary() - _ = yym539 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Address)) - } - } - if yyr533 || yy2arr533 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym541 := z.EncBinary() - _ = yym541 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.AlgorithmProvider)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("algorithmProvider")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym542 := z.EncBinary() - _ = yym542 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.AlgorithmProvider)) - } - } - if yyr533 || yy2arr533 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym544 := z.EncBinary() - _ = yym544 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.PolicyConfigFile)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("policyConfigFile")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym545 := z.EncBinary() - _ = yym545 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.PolicyConfigFile)) - } - } - if yyr533 || yy2arr533 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym547 := z.EncBinary() - _ = yym547 - if false { - } else { - r.EncodeBool(bool(x.EnableProfiling)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("enableProfiling")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym548 := z.EncBinary() - _ = yym548 - if false { - } else { - r.EncodeBool(bool(x.EnableProfiling)) - } - } - if yyr533 || yy2arr533 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym550 := z.EncBinary() - _ = yym550 - if false { - } else { - r.EncodeFloat32(float32(x.KubeAPIQPS)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kubeAPIQPS")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym551 := z.EncBinary() - _ = yym551 - if false { - } else { - r.EncodeFloat32(float32(x.KubeAPIQPS)) - } - } - if yyr533 || yy2arr533 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym553 := z.EncBinary() - _ = yym553 - if false { - } else { - r.EncodeInt(int64(x.KubeAPIBurst)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kubeAPIBurst")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym554 := z.EncBinary() - _ = yym554 - if false { - } else { - r.EncodeInt(int64(x.KubeAPIBurst)) - } - } - if yyr533 || yy2arr533 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym556 := z.EncBinary() - _ = yym556 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("schedulerName")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym557 := z.EncBinary() - _ = yym557 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName)) - } - } - if yyr533 || yy2arr533 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy559 := &x.LeaderElection - yy559.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("leaderElection")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy560 := &x.LeaderElection - yy560.CodecEncodeSelf(e) - } - if yyr533 || yy2arr533 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq533[9] { - yym562 := z.EncBinary() - _ = yym562 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq533[9] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym563 := z.EncBinary() - _ = yym563 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr533 || yy2arr533 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq533[10] { - yym565 := z.EncBinary() - _ = yym565 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq533[10] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym566 := z.EncBinary() - _ = yym566 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr533 || yy2arr533 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *KubeSchedulerConfiguration) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym567 := z.DecBinary() - _ = yym567 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct568 := r.ContainerType() - if yyct568 == codecSelferValueTypeMap1234 { - yyl568 := r.ReadMapStart() - if yyl568 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl568, d) - } - } else if yyct568 == codecSelferValueTypeArray1234 { - yyl568 := r.ReadArrayStart() - if yyl568 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl568, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *KubeSchedulerConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys569Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys569Slc - var yyhl569 bool = l >= 0 - for yyj569 := 0; ; yyj569++ { - if yyhl569 { - if yyj569 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys569Slc = r.DecodeBytes(yys569Slc, true, true) - yys569 := string(yys569Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys569 { - case "port": - if r.TryDecodeAsNil() { - x.Port = 0 - } else { - x.Port = int(r.DecodeInt(codecSelferBitsize1234)) - } - case "address": - if r.TryDecodeAsNil() { - x.Address = "" - } else { - x.Address = string(r.DecodeString()) - } - case "algorithmProvider": - if r.TryDecodeAsNil() { - x.AlgorithmProvider = "" - } else { - x.AlgorithmProvider = string(r.DecodeString()) - } - case "policyConfigFile": - if r.TryDecodeAsNil() { - x.PolicyConfigFile = "" - } else { - x.PolicyConfigFile = string(r.DecodeString()) - } - case "enableProfiling": - if r.TryDecodeAsNil() { - x.EnableProfiling = false - } else { - x.EnableProfiling = bool(r.DecodeBool()) - } - case "kubeAPIQPS": - if r.TryDecodeAsNil() { - x.KubeAPIQPS = 0 - } else { - x.KubeAPIQPS = float32(r.DecodeFloat(true)) - } - case "kubeAPIBurst": - if r.TryDecodeAsNil() { - x.KubeAPIBurst = 0 - } else { - x.KubeAPIBurst = int(r.DecodeInt(codecSelferBitsize1234)) - } - case "schedulerName": - if r.TryDecodeAsNil() { - x.SchedulerName = "" - } else { - x.SchedulerName = string(r.DecodeString()) - } - case "leaderElection": - if r.TryDecodeAsNil() { - x.LeaderElection = LeaderElectionConfiguration{} - } else { - yyv578 := &x.LeaderElection - yyv578.CodecDecodeSelf(d) - } - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys569) - } // end switch yys569 - } // end for yyj569 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj581 int - var yyb581 bool - var yyhl581 bool = l >= 0 - yyj581++ - if yyhl581 { - yyb581 = yyj581 > l - } else { - yyb581 = r.CheckBreak() - } - if yyb581 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Port = 0 - } else { - x.Port = int(r.DecodeInt(codecSelferBitsize1234)) - } - yyj581++ - if yyhl581 { - yyb581 = yyj581 > l - } else { - yyb581 = r.CheckBreak() - } - if yyb581 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Address = "" - } else { - x.Address = string(r.DecodeString()) - } - yyj581++ - if yyhl581 { - yyb581 = yyj581 > l - } else { - yyb581 = r.CheckBreak() - } - if yyb581 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.AlgorithmProvider = "" - } else { - x.AlgorithmProvider = string(r.DecodeString()) - } - yyj581++ - if yyhl581 { - yyb581 = yyj581 > l - } else { - yyb581 = r.CheckBreak() - } - if yyb581 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.PolicyConfigFile = "" - } else { - x.PolicyConfigFile = string(r.DecodeString()) - } - yyj581++ - if yyhl581 { - yyb581 = yyj581 > l - } else { - yyb581 = r.CheckBreak() - } - if yyb581 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.EnableProfiling = false - } else { - x.EnableProfiling = bool(r.DecodeBool()) - } - yyj581++ - if yyhl581 { - yyb581 = yyj581 > l - } else { - yyb581 = r.CheckBreak() - } - if yyb581 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.KubeAPIQPS = 0 - } else { - x.KubeAPIQPS = float32(r.DecodeFloat(true)) - } - yyj581++ - if yyhl581 { - yyb581 = yyj581 > l - } else { - yyb581 = r.CheckBreak() - } - if yyb581 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.KubeAPIBurst = 0 - } else { - x.KubeAPIBurst = int(r.DecodeInt(codecSelferBitsize1234)) - } - yyj581++ - if yyhl581 { - yyb581 = yyj581 > l - } else { - yyb581 = r.CheckBreak() - } - if yyb581 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.SchedulerName = "" - } else { - x.SchedulerName = string(r.DecodeString()) - } - yyj581++ - if yyhl581 { - yyb581 = yyj581 > l - } else { - yyb581 = r.CheckBreak() - } - if yyb581 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.LeaderElection = LeaderElectionConfiguration{} - } else { - yyv590 := &x.LeaderElection - yyv590.CodecDecodeSelf(d) - } - yyj581++ - if yyhl581 { - yyb581 = yyj581 > l - } else { - yyb581 = r.CheckBreak() - } - if yyb581 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj581++ - if yyhl581 { - yyb581 = yyj581 > l - } else { - yyb581 = r.CheckBreak() - } - if yyb581 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - for { - yyj581++ - if yyhl581 { - yyb581 = yyj581 > l - } else { - yyb581 = r.CheckBreak() - } - if yyb581 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj581-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym593 := z.EncBinary() - _ = yym593 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep594 := !z.EncBinary() - yy2arr594 := z.EncBasicHandle().StructToArray - var yyq594 [4]bool - _, _, _ = yysep594, yyq594, yy2arr594 - const yyr594 bool = false - var yynn594 int - if yyr594 || yy2arr594 { - r.EncodeArrayStart(4) - } else { - yynn594 = 4 - for _, b := range yyq594 { - if b { - yynn594++ - } - } - r.EncodeMapStart(yynn594) - yynn594 = 0 - } - if yyr594 || yy2arr594 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym596 := z.EncBinary() - _ = yym596 - if false { - } else { - r.EncodeBool(bool(x.LeaderElect)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("leaderElect")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym597 := z.EncBinary() - _ = yym597 - if false { - } else { - r.EncodeBool(bool(x.LeaderElect)) - } - } - if yyr594 || yy2arr594 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy599 := &x.LeaseDuration - yym600 := z.EncBinary() - _ = yym600 - if false { - } else if z.HasExtensions() && z.EncExt(yy599) { - } else if !yym600 && z.IsJSONHandle() { - z.EncJSONMarshal(yy599) - } else { - z.EncFallback(yy599) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("leaseDuration")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy601 := &x.LeaseDuration - yym602 := z.EncBinary() - _ = yym602 - if false { - } else if z.HasExtensions() && z.EncExt(yy601) { - } else if !yym602 && z.IsJSONHandle() { - z.EncJSONMarshal(yy601) - } else { - z.EncFallback(yy601) - } - } - if yyr594 || yy2arr594 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy604 := &x.RenewDeadline - yym605 := z.EncBinary() - _ = yym605 - if false { - } else if z.HasExtensions() && z.EncExt(yy604) { - } else if !yym605 && z.IsJSONHandle() { - z.EncJSONMarshal(yy604) - } else { - z.EncFallback(yy604) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("renewDeadline")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy606 := &x.RenewDeadline - yym607 := z.EncBinary() - _ = yym607 - if false { - } else if z.HasExtensions() && z.EncExt(yy606) { - } else if !yym607 && z.IsJSONHandle() { - z.EncJSONMarshal(yy606) - } else { - z.EncFallback(yy606) - } - } - if yyr594 || yy2arr594 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy609 := &x.RetryPeriod - yym610 := z.EncBinary() - _ = yym610 - if false { - } else if z.HasExtensions() && z.EncExt(yy609) { - } else if !yym610 && z.IsJSONHandle() { - z.EncJSONMarshal(yy609) - } else { - z.EncFallback(yy609) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("retryPeriod")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy611 := &x.RetryPeriod - yym612 := z.EncBinary() - _ = yym612 - if false { - } else if z.HasExtensions() && z.EncExt(yy611) { - } else if !yym612 && z.IsJSONHandle() { - z.EncJSONMarshal(yy611) - } else { - z.EncFallback(yy611) - } - } - if yyr594 || yy2arr594 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *LeaderElectionConfiguration) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym613 := z.DecBinary() - _ = yym613 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct614 := r.ContainerType() - if yyct614 == codecSelferValueTypeMap1234 { - yyl614 := r.ReadMapStart() - if yyl614 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl614, d) - } - } else if yyct614 == codecSelferValueTypeArray1234 { - yyl614 := r.ReadArrayStart() - if yyl614 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl614, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *LeaderElectionConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys615Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys615Slc - var yyhl615 bool = l >= 0 - for yyj615 := 0; ; yyj615++ { - if yyhl615 { - if yyj615 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys615Slc = r.DecodeBytes(yys615Slc, true, true) - yys615 := string(yys615Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys615 { - case "leaderElect": - if r.TryDecodeAsNil() { - x.LeaderElect = false - } else { - x.LeaderElect = bool(r.DecodeBool()) - } - case "leaseDuration": - if r.TryDecodeAsNil() { - x.LeaseDuration = pkg1_unversioned.Duration{} - } else { - yyv617 := &x.LeaseDuration - yym618 := z.DecBinary() - _ = yym618 - if false { - } else if z.HasExtensions() && z.DecExt(yyv617) { - } else if !yym618 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv617) - } else { - z.DecFallback(yyv617, false) - } - } - case "renewDeadline": - if r.TryDecodeAsNil() { - x.RenewDeadline = pkg1_unversioned.Duration{} - } else { - yyv619 := &x.RenewDeadline - yym620 := z.DecBinary() - _ = yym620 - if false { - } else if z.HasExtensions() && z.DecExt(yyv619) { - } else if !yym620 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv619) - } else { - z.DecFallback(yyv619, false) - } - } - case "retryPeriod": - if r.TryDecodeAsNil() { - x.RetryPeriod = pkg1_unversioned.Duration{} - } else { - yyv621 := &x.RetryPeriod - yym622 := z.DecBinary() - _ = yym622 - if false { - } else if z.HasExtensions() && z.DecExt(yyv621) { - } else if !yym622 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv621) - } else { - z.DecFallback(yyv621, false) - } - } - default: - z.DecStructFieldNotFound(-1, yys615) - } // end switch yys615 - } // end for yyj615 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj623 int - var yyb623 bool - var yyhl623 bool = l >= 0 - yyj623++ - if yyhl623 { - yyb623 = yyj623 > l - } else { - yyb623 = r.CheckBreak() - } - if yyb623 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.LeaderElect = false - } else { - x.LeaderElect = bool(r.DecodeBool()) - } - yyj623++ - if yyhl623 { - yyb623 = yyj623 > l - } else { - yyb623 = r.CheckBreak() - } - if yyb623 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.LeaseDuration = pkg1_unversioned.Duration{} - } else { - yyv625 := &x.LeaseDuration - yym626 := z.DecBinary() - _ = yym626 - if false { - } else if z.HasExtensions() && z.DecExt(yyv625) { - } else if !yym626 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv625) - } else { - z.DecFallback(yyv625, false) - } - } - yyj623++ - if yyhl623 { - yyb623 = yyj623 > l - } else { - yyb623 = r.CheckBreak() - } - if yyb623 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.RenewDeadline = pkg1_unversioned.Duration{} - } else { - yyv627 := &x.RenewDeadline - yym628 := z.DecBinary() - _ = yym628 - if false { - } else if z.HasExtensions() && z.DecExt(yyv627) { - } else if !yym628 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv627) - } else { - z.DecFallback(yyv627, false) - } - } - yyj623++ - if yyhl623 { - yyb623 = yyj623 > l - } else { - yyb623 = r.CheckBreak() - } - if yyb623 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.RetryPeriod = pkg1_unversioned.Duration{} - } else { - yyv629 := &x.RetryPeriod - yym630 := z.DecBinary() - _ = yym630 - if false { - } else if z.HasExtensions() && z.DecExt(yyv629) { - } else if !yym630 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv629) - } else { - z.DecFallback(yyv629, false) - } - } - for { - yyj623++ - if yyhl623 { - yyb623 = yyj623 > l - } else { - yyb623 = r.CheckBreak() - } - if yyb623 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj623-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} diff --git a/pkg/apis/componentconfig/types.go b/pkg/apis/componentconfig/types.go index 3127071c55..52fc1226ce 100644 --- a/pkg/apis/componentconfig/types.go +++ b/pkg/apis/componentconfig/types.go @@ -304,6 +304,8 @@ type KubeletConfiguration struct { NonMasqueradeCIDR string `json:"nonMasqueradeCIDR"` // enable gathering custom metrics. EnableCustomMetrics bool `json:"enableCustomMetrics"` + // The cgroup that container runtime is expected to be isolated in. + RuntimeContainer string `json:"runtimeContainer,omitempty"` } type KubeSchedulerConfiguration struct { diff --git a/pkg/kubelet/cm/container_manager.go b/pkg/kubelet/cm/container_manager.go index 60173fdcc8..db037ac18c 100644 --- a/pkg/kubelet/cm/container_manager.go +++ b/pkg/kubelet/cm/container_manager.go @@ -25,15 +25,19 @@ type ContainerManager interface { // Runs the container manager's housekeeping. // - Ensures that the Docker daemon is in a container. // - Creates the system container where all non-containerized processes run. - Start(NodeConfig) error + Start() error // Returns resources allocated to system containers in the machine. // These containers include the system and Kubernetes services. SystemContainersLimit() api.ResourceList + + // Returns a NodeConfig that is being used by the container manager. + GetNodeConfig() NodeConfig } type NodeConfig struct { - DockerDaemonContainerName string - SystemContainerName string - KubeletContainerName string + RuntimeContainerName string + SystemContainerName string + KubeletContainerName string + ContainerRuntime string } diff --git a/pkg/kubelet/cm/container_manager_linux.go b/pkg/kubelet/cm/container_manager_linux.go index 1764400865..79200a5bb4 100644 --- a/pkg/kubelet/cm/container_manager_linux.go +++ b/pkg/kubelet/cm/container_manager_linux.go @@ -114,11 +114,11 @@ func validateSystemRequirements(mountUtil mount.Interface) error { // TODO(vmarmol): Add limits to the system containers. // Takes the absolute name of the specified containers. // Empty container name disables use of the specified container. -func NewContainerManager(mountUtil mount.Interface, cadvisorInterface cadvisor.Interface) (ContainerManager, error) { +func NewContainerManager(mountUtil mount.Interface, cadvisorInterface cadvisor.Interface, nodeConfig NodeConfig) (ContainerManager, error) { return &containerManagerImpl{ cadvisorInterface: cadvisorInterface, mountUtil: mountUtil, - NodeConfig: NodeConfig{}, + NodeConfig: nodeConfig, }, nil } @@ -192,70 +192,113 @@ func (cm *containerManagerImpl) setupNode() error { } systemContainers := []*systemContainer{} - if cm.DockerDaemonContainerName != "" { - cont := newSystemContainer(cm.DockerDaemonContainerName) + if cm.ContainerRuntime == "docker" { + if cm.RuntimeContainerName != "" { + cont := newSystemContainer(cm.RuntimeContainerName) + info, err := cm.cadvisorInterface.MachineInfo() + var capacity = api.ResourceList{} + if err != nil { + } else { + capacity = cadvisor.CapacityFromMachineInfo(info) + } + memoryLimit := (int64(capacity.Memory().Value() * DockerMemoryLimitThresholdPercent / 100)) + if memoryLimit < MinDockerMemoryLimit { + glog.Warningf("Memory limit %d for container %s is too small, reset it to %d", memoryLimit, cm.RuntimeContainerName, MinDockerMemoryLimit) + memoryLimit = MinDockerMemoryLimit + } - info, err := cm.cadvisorInterface.MachineInfo() - var capacity = api.ResourceList{} - if err != nil { - } else { - capacity = cadvisor.CapacityFromMachineInfo(info) - } - memoryLimit := (int64(capacity.Memory().Value() * DockerMemoryLimitThresholdPercent / 100)) - if memoryLimit < MinDockerMemoryLimit { - glog.Warningf("Memory limit %d for container %s is too small, reset it to %d", memoryLimit, cm.DockerDaemonContainerName, MinDockerMemoryLimit) - memoryLimit = MinDockerMemoryLimit - } + glog.V(2).Infof("Configure resource-only container %s with memory limit: %d", cm.RuntimeContainerName, memoryLimit) - glog.V(2).Infof("Configure resource-only container %s with memory limit: %d", cm.DockerDaemonContainerName, memoryLimit) - - dockerContainer := &fs.Manager{ - Cgroups: &configs.Cgroup{ - Parent: "/", - Name: cm.DockerDaemonContainerName, - Resources: &configs.Resources{ - Memory: memoryLimit, - MemorySwap: -1, - AllowAllDevices: true, + dockerContainer := &fs.Manager{ + Cgroups: &configs.Cgroup{ + Parent: "/", + Name: cm.RuntimeContainerName, + Resources: &configs.Resources{ + Memory: memoryLimit, + MemorySwap: -1, + AllowAllDevices: true, + }, }, - }, + } + cont.ensureStateFunc = func(manager *fs.Manager) error { + return ensureDockerInContainer(cm.cadvisorInterface, -900, dockerContainer) + } + systemContainers = append(systemContainers, cont) + } else { + cont, err := getContainerNameForProcess("docker") + if err != nil { + glog.Error(err) + } else { + cm.RuntimeContainerName = cont + } } - cont.ensureStateFunc = func(manager *fs.Manager) error { - return ensureDockerInContainer(cm.cadvisorInterface, -900, dockerContainer) - } - systemContainers = append(systemContainers, cont) } if cm.SystemContainerName != "" { if cm.SystemContainerName == "/" { return fmt.Errorf("system container cannot be root (\"/\")") } - + cont := newSystemContainer(cm.SystemContainerName) rootContainer := &fs.Manager{ Cgroups: &configs.Cgroup{ Parent: "/", Name: "/", }, } - manager := createManager(cm.SystemContainerName) - - err := ensureSystemContainer(rootContainer, manager) - if err != nil { - return err + cont.ensureStateFunc = func(manager *fs.Manager) error { + return ensureSystemContainer(rootContainer, manager) } - systemContainers = append(systemContainers, newSystemContainer(cm.SystemContainerName)) + systemContainers = append(systemContainers, cont) } if cm.KubeletContainerName != "" { - systemContainers = append(systemContainers, newSystemContainer(cm.KubeletContainerName)) + cont := newSystemContainer(cm.KubeletContainerName) + manager := fs.Manager{ + Cgroups: &configs.Cgroup{ + Parent: "/", + Name: cm.KubeletContainerName, + Resources: &configs.Resources{ + AllowAllDevices: true, + }, + }, + } + cont.ensureStateFunc = func(_ *fs.Manager) error { + return manager.Apply(os.Getpid()) + } + systemContainers = append(systemContainers, cont) + } else { + cont, err := getContainer(os.Getpid()) + if err != nil { + glog.Error("failed to find cgroups of kubelet - %v", err) + } else { + cm.KubeletContainerName = cont + } } + cm.systemContainers = systemContainers return nil } -func (cm *containerManagerImpl) Start(nodeConfig NodeConfig) error { - cm.NodeConfig = nodeConfig +func getContainerNameForProcess(name string) (string, error) { + pids, err := getPidsForProcess(name) + if err != nil { + return "", fmt.Errorf("failed to detect process id for %q - %v", name, err) + } + if len(pids) == 0 { + return "", nil + } + cont, err := getContainer(pids[0]) + if err != nil { + return "", err + } + return cont, nil +} +func (cm *containerManagerImpl) GetNodeConfig() NodeConfig { + return cm.NodeConfig +} + +func (cm *containerManagerImpl) Start() error { // Setup the node if err := cm.setupNode(); err != nil { return err @@ -313,16 +356,13 @@ func isProcessRunningInHost(pid int) (bool, error) { return initMntNs == processMntNs, nil } -// Ensures that the Docker daemon is in the desired container. -func ensureDockerInContainer(cadvisor cadvisor.Interface, oomScoreAdj int, manager *fs.Manager) error { - // What container is Docker in? - out, err := exec.Command("pidof", "docker").Output() +func getPidsForProcess(name string) ([]int, error) { + out, err := exec.Command("pidof", "name").Output() if err != nil { - return fmt.Errorf("failed to find pid of Docker container: %v", err) + return []int{}, fmt.Errorf("failed to find pid of %q: %v", name, err) } // The output of pidof is a list of pids. - // Docker may be forking and thus there would be more than one result. pids := []int{} for _, pidStr := range strings.Split(strings.TrimSpace(string(out)), " ") { pid, err := strconv.Atoi(pidStr) @@ -331,7 +371,15 @@ func ensureDockerInContainer(cadvisor cadvisor.Interface, oomScoreAdj int, manag } pids = append(pids, pid) } + return pids, nil +} +// Ensures that the Docker daemon is in the desired container. +func ensureDockerInContainer(cadvisor cadvisor.Interface, oomScoreAdj int, manager *fs.Manager) error { + pids, err := getPidsForProcess("docker") + if err != nil { + return err + } // Move if the pid is not already in the desired container. errs := []error{} for _, pid := range pids { diff --git a/pkg/kubelet/cm/container_manager_stub.go b/pkg/kubelet/cm/container_manager_stub.go index b3e583a93b..9f757b830b 100644 --- a/pkg/kubelet/cm/container_manager_stub.go +++ b/pkg/kubelet/cm/container_manager_stub.go @@ -25,7 +25,7 @@ type containerManagerStub struct{} var _ ContainerManager = &containerManagerStub{} -func (cm *containerManagerStub) Start(_ NodeConfig) error { +func (cm *containerManagerStub) Start() error { glog.V(2).Infof("Starting stub container manager") return nil } @@ -34,6 +34,10 @@ func (cm *containerManagerStub) SystemContainersLimit() api.ResourceList { return api.ResourceList{} } +func (cm *containerManagerStub) GetNodeConfig() NodeConfig { + return NodeConfig{} +} + func NewStubContainerManager() ContainerManager { return &containerManagerStub{} } diff --git a/pkg/kubelet/cm/container_manager_unsupported.go b/pkg/kubelet/cm/container_manager_unsupported.go index af37f070d0..5043bc2d44 100644 --- a/pkg/kubelet/cm/container_manager_unsupported.go +++ b/pkg/kubelet/cm/container_manager_unsupported.go @@ -31,7 +31,7 @@ type unsupportedContainerManager struct { var _ ContainerManager = &unsupportedContainerManager{} -func (unsupportedContainerManager) Start(_ NodeConfig) error { +func (unsupportedContainerManager) Start() error { return fmt.Errorf("Container Manager is unsupported in this build") } @@ -39,6 +39,10 @@ func (unsupportedContainerManager) SystemContainersLimit() api.ResourceList { return api.ResourceList{} } -func NewContainerManager(mounter mount.Interface, cadvisorInterface cadvisor.Interface) (ContainerManager, error) { +func (unsupportedContainerManager) GetNodeConfig() NodeConfig { + return NodeConfig{} +} + +func NewContainerManager(_ mount.Interface, _ cadvisor.Interface, _ NodeConfig) (ContainerManager, error) { return &unsupportedContainerManager{}, nil } diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index b88ff60e70..f66fad114e 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -178,7 +178,6 @@ func NewMainKubelet( cloud cloudprovider.Interface, nodeLabels map[string]string, nodeStatusUpdateFrequency time.Duration, - resourceContainer string, osInterface kubecontainer.OSInterface, cgroupRoot string, containerRuntime string, @@ -186,8 +185,6 @@ func NewMainKubelet( rktStage1Image string, mounter mount.Interface, writer kubeio.Writer, - dockerDaemonContainer string, - systemContainer string, configureCBR0 bool, nonMasqueradeCIDR string, podCIDR string, @@ -215,9 +212,6 @@ func NewMainKubelet( if resyncInterval <= 0 { return nil, fmt.Errorf("invalid sync frequency %d", resyncInterval) } - if systemContainer != "" && cgroupRoot == "" { - return nil, fmt.Errorf("invalid configuration: system container was specified and cgroup root was not specified") - } dockerClient = dockertools.NewInstrumentedDockerInterface(dockerClient) serviceStore := cache.NewStore(cache.MetaNamespaceKeyFunc) @@ -311,25 +305,24 @@ func NewMainKubelet( nodeRef: nodeRef, nodeLabels: nodeLabels, nodeStatusUpdateFrequency: nodeStatusUpdateFrequency, - resourceContainer: resourceContainer, - os: osInterface, - oomWatcher: oomWatcher, - cgroupRoot: cgroupRoot, - mounter: mounter, - writer: writer, - configureCBR0: configureCBR0, - nonMasqueradeCIDR: nonMasqueradeCIDR, - reconcileCIDR: reconcileCIDR, - maxPods: maxPods, - syncLoopMonitor: atomic.Value{}, - resolverConfig: resolverConfig, - cpuCFSQuota: cpuCFSQuota, - daemonEndpoints: daemonEndpoints, - containerManager: containerManager, - flannelExperimentalOverlay: flannelExperimentalOverlay, - flannelHelper: NewFlannelHelper(), - nodeIP: nodeIP, - clock: util.RealClock{}, + os: osInterface, + oomWatcher: oomWatcher, + cgroupRoot: cgroupRoot, + mounter: mounter, + writer: writer, + configureCBR0: configureCBR0, + nonMasqueradeCIDR: nonMasqueradeCIDR, + reconcileCIDR: reconcileCIDR, + maxPods: maxPods, + syncLoopMonitor: atomic.Value{}, + resolverConfig: resolverConfig, + cpuCFSQuota: cpuCFSQuota, + daemonEndpoints: daemonEndpoints, + containerManager: containerManager, + flannelExperimentalOverlay: flannelExperimentalOverlay, + flannelHelper: NewFlannelHelper(), + nodeIP: nodeIP, + clock: util.RealClock{}, outOfDiskTransitionFrequency: outOfDiskTransitionFrequency, reservation: reservation, enableCustomMetrics: enableCustomMetrics, @@ -414,8 +407,6 @@ func NewMainKubelet( return nil, err } klet.containerRuntime = rktRuntime - // No Docker daemon to put in a container. - dockerDaemonContainer = "" default: return nil, fmt.Errorf("unsupported container runtime %q specified", containerRuntime) } @@ -438,13 +429,6 @@ func NewMainKubelet( } klet.imageManager = imageManager - // Setup container manager, can fail if the devices hierarchy is not mounted - // (it is required by Docker however). - klet.nodeConfig = cm.NodeConfig{ - DockerDaemonContainerName: dockerDaemonContainer, - SystemContainerName: systemContainer, - KubeletContainerName: resourceContainer, - } klet.runtimeState.setRuntimeSync(klet.clock.Now()) klet.runner = klet.containerRuntime @@ -613,10 +597,6 @@ type Kubelet struct { // Store kubecontainer.PodStatus for all pods. podCache kubecontainer.Cache - // The name of the resource-only container to run the Kubelet in (empty for no container). - // Name must be absolute. - resourceContainer string - os kubecontainer.OSInterface // Watcher of out of memory events. @@ -913,42 +893,32 @@ func (kl *Kubelet) StartGarbageCollection() { // initializeModules will initialize internal modules that do not require the container runtime to be up. // Note that the modules here must not depend on modules that are not initialized here. func (kl *Kubelet) initializeModules() error { - // Step 1: Move Kubelet to a container, if required. - if kl.resourceContainer != "" { - // Fixme: I need to reside inside ContainerManager interface. - err := util.RunInResourceContainer(kl.resourceContainer) - if err != nil { - glog.Warningf("Failed to move Kubelet to container %q: %v", kl.resourceContainer, err) - } - glog.Infof("Running in container %q", kl.resourceContainer) - } - - // Step 2: Promethues metrics. + // Step 1: Promethues metrics. metrics.Register(kl.runtimeCache) - // Step 3: Setup filesystem directories. + // Step 2: Setup filesystem directories. if err := kl.setupDataDirs(); err != nil { return err } - // Step 4: If the container logs directory does not exist, create it. + // Step 3: If the container logs directory does not exist, create it. if _, err := os.Stat(containerLogsDir); err != nil { if err := kl.os.Mkdir(containerLogsDir, 0755); err != nil { glog.Errorf("Failed to create directory %q: %v", containerLogsDir, err) } } - // Step 5: Start the image manager. + // Step 4: Start the image manager. if err := kl.imageManager.Start(); err != nil { return fmt.Errorf("Failed to start ImageManager, images may not be garbage collected: %v", err) } - // Step 6: Start container manager. - if err := kl.containerManager.Start(kl.nodeConfig); err != nil { + // Step 5: Start container manager. + if err := kl.containerManager.Start(); err != nil { return fmt.Errorf("Failed to start ContainerManager %v", err) } - // Step 7: Start out of memory watcher. + // Step 6: Start out of memory watcher. if err := kl.oomWatcher.Start(kl.nodeRef); err != nil { return fmt.Errorf("Failed to start OOM watcher %v", err) } @@ -3513,7 +3483,7 @@ func (kl *Kubelet) updatePodCIDR(cidr string) { } } func (kl *Kubelet) GetNodeConfig() cm.NodeConfig { - return kl.nodeConfig + return kl.containerManager.GetNodeConfig() } var minRsrc = resource.MustParse("1k") diff --git a/pkg/kubelet/server/stats/summary.go b/pkg/kubelet/server/stats/summary.go index 4f5fba9a17..d9edf74cee 100644 --- a/pkg/kubelet/server/stats/summary.go +++ b/pkg/kubelet/server/stats/summary.go @@ -120,7 +120,7 @@ func (sb *summaryBuilder) build() (*Summary, error) { systemContainers := map[string]string{ SystemContainerKubelet: sb.nodeConfig.KubeletContainerName, - SystemContainerRuntime: sb.nodeConfig.DockerDaemonContainerName, // TODO: add support for other runtimes + SystemContainerRuntime: sb.nodeConfig.RuntimeContainerName, SystemContainerMisc: sb.nodeConfig.SystemContainerName, } for sys, name := range systemContainers { diff --git a/pkg/kubelet/server/stats/summary_test.go b/pkg/kubelet/server/stats/summary_test.go index 1a8c4955bd..b5854586f5 100644 --- a/pkg/kubelet/server/stats/summary_test.go +++ b/pkg/kubelet/server/stats/summary_test.go @@ -48,9 +48,9 @@ func TestBuildSummary(t *testing.T) { node := api.Node{} node.Name = "FooNode" nodeConfig := cm.NodeConfig{ - DockerDaemonContainerName: "/docker-daemon", - SystemContainerName: "/system", - KubeletContainerName: "/kubelet", + RuntimeContainerName: "/docker-daemon", + SystemContainerName: "/system", + KubeletContainerName: "/kubelet", } const ( namespace0 = "test0" From 51e4ccf10657e0649f9c038e2621915b6ccd647d Mon Sep 17 00:00:00 2001 From: Vishnu kannan Date: Tue, 9 Feb 2016 13:39:23 -0800 Subject: [PATCH 2/4] Updating the default values for the cgroups hierarchies that kubelet creates for managing the nodes. Signed-off-by: Vishnu kannan --- cluster/gce/trusty/master.yaml | 2 ++ cluster/gce/trusty/node.yaml | 2 ++ cluster/saltbase/salt/kubelet/default | 12 ++++++++---- cmd/kubelet/app/options/options.go | 8 ++++---- cmd/kubelet/app/server.go | 2 +- docs/admin/kubelet.md | 4 ++-- 6 files changed, 19 insertions(+), 11 deletions(-) diff --git a/cluster/gce/trusty/master.yaml b/cluster/gce/trusty/master.yaml index 12b4922daf..0cfe0d30aa 100644 --- a/cluster/gce/trusty/master.yaml +++ b/cluster/gce/trusty/master.yaml @@ -154,6 +154,8 @@ script --configure-cbr0=${ALLOCATE_NODE_CIDRS} \ --cgroup-root=/ \ --system-container=/system \ + --runtime-container=/docker-daemon \ + --resource-container=/kubelet \ --nosystemd=true \ ${ARGS} end script diff --git a/cluster/gce/trusty/node.yaml b/cluster/gce/trusty/node.yaml index cb0078af3b..2cc301b3cc 100644 --- a/cluster/gce/trusty/node.yaml +++ b/cluster/gce/trusty/node.yaml @@ -139,6 +139,8 @@ script --configure-cbr0=true \ --cgroup-root=/ \ --system-container=/system \ + --runtime-container=/docker-daemon \ + --resource-container=/kubelet \ --nosystemd=true \ ${ARGS} end script diff --git a/cluster/saltbase/salt/kubelet/default b/cluster/saltbase/salt/kubelet/default index 3e37fe6b8c..50b8802b93 100644 --- a/cluster/saltbase/salt/kubelet/default +++ b/cluster/saltbase/salt/kubelet/default @@ -102,15 +102,19 @@ {% set experimental_flannel_overlay = "--experimental-flannel-overlay=true" %} {% endif -%} -# Run containers under the root cgroup and create a system container. -{% set system_container = "" -%} +# Setup cgroups hierarchies. {% set cgroup_root = "" -%} -{% if grains['os_family'] == 'Debian' -%} - {% set system_container = "--system-container=/system" -%} +{% set system_container = "" -%} +{% set kubelet_container = "" -%} +{% set runtime_container = "" -%} +{% if grains['os_family'] == 'Debian' -%} {% if pillar.get('is_systemd') %} {% set cgroup_root = "--cgroup-root=docker" -%} {% else %} {% set cgroup_root = "--cgroup-root=/" -%} + {% set system_container = "--system-container=/system" -%} + {% set runtime_container = "--runtime-container=/docker-daemon" -%} + {% set kubelet_container= "--resource-container=/kubelet" -%} {% endif %} {% endif -%} {% if grains['oscodename'] == 'vivid' -%} diff --git a/cmd/kubelet/app/options/options.go b/cmd/kubelet/app/options/options.go index 9e18ab5ab0..d417fe1641 100644 --- a/cmd/kubelet/app/options/options.go +++ b/cmd/kubelet/app/options/options.go @@ -111,11 +111,11 @@ func NewKubeletServer() *KubeletServer { RegisterSchedulable: true, RegistryBurst: 10, RegistryPullQPS: 5.0, - ResourceContainer: "/kubelet", + ResourceContainer: "", RktPath: "", RktStage1Image: "", RootDirectory: defaultRootDir, - RuntimeContainer: "/docker-daemon", + RuntimeContainer: "", SerializeImagePulls: true, StreamingConnectionIdleTimeout: unversioned.Duration{4 * time.Hour}, SyncFrequency: unversioned.Duration{1 * time.Minute}, @@ -191,7 +191,7 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) { fs.StringVar(&s.VolumePluginDir, "volume-plugin-dir", s.VolumePluginDir, " The full path of the directory in which to search for additional third party volume plugins") fs.StringVar(&s.CloudProvider, "cloud-provider", s.CloudProvider, "The provider for cloud services. Empty string for no provider.") fs.StringVar(&s.CloudConfigFile, "cloud-config", s.CloudConfigFile, "The path to the cloud provider configuration file. Empty string for no configuration file.") - fs.StringVar(&s.ResourceContainer, "resource-container", s.ResourceContainer, "Absolute name of the resource-only container to create and run the Kubelet in (Default: /kubelet).") + fs.StringVar(&s.ResourceContainer, "resource-container", s.ResourceContainer, "Optional absolute name of the resource-only container to create and run the Kubelet in.") 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.StringVar(&s.LockFilePath, "lock-file", s.LockFilePath, " The path to file for kubelet to use as a lock file.") @@ -222,5 +222,5 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) { fs.DurationVar(&s.OutOfDiskTransitionFrequency.Duration, "outofdisk-transition-frequency", s.OutOfDiskTransitionFrequency.Duration, "Duration for which the kubelet has to wait before transitioning out of out-of-disk node condition status. Default: 5m0s") fs.StringVar(&s.NodeIP, "node-ip", s.NodeIP, "IP address of the node. If set, kubelet will use this IP address for the node") fs.BoolVar(&s.EnableCustomMetrics, "enable-custom-metrics", s.EnableCustomMetrics, "Support for gathering custom metrics.") - fs.StringVar(&s.RuntimeContainer, "runtime-container", s.RuntimeContainer, "Absolute name of the cgroups to create (if required) and run the runtime in (Default: /docker-daemon).") + fs.StringVar(&s.RuntimeContainer, "runtime-container", s.RuntimeContainer, "Optional absolute name of cgroups to create and run the runtime in.") } diff --git a/cmd/kubelet/app/server.go b/cmd/kubelet/app/server.go index d60adfaa74..db75bb35ad 100644 --- a/cmd/kubelet/app/server.go +++ b/cmd/kubelet/app/server.go @@ -510,7 +510,7 @@ func SimpleKubelet(client *clientset.Clientset, CPUCFSQuota: true, DiskSpacePolicy: diskSpacePolicy, DockerClient: dockerClient, - RuntimeContainer: "/docker-daemon", + RuntimeContainer: "", DockerExecHandler: &dockertools.NativeExecHandler{}, EnableCustomMetrics: false, EnableDebuggingHandlers: true, diff --git a/docs/admin/kubelet.md b/docs/admin/kubelet.md index cbe8d63b8d..5dedc2dadc 100644 --- a/docs/admin/kubelet.md +++ b/docs/admin/kubelet.md @@ -134,12 +134,12 @@ kubelet --registry-burst=10: Maximum size of a bursty pulls, temporarily allows pulls to burst to this number, while still not exceeding registry-qps. Only used if --registry-qps > 0 --registry-qps=5: If > 0, limit registry pull QPS to this value. If 0, unlimited. [default=5.0] --resolv-conf="/etc/resolv.conf": Resolver configuration file used as the basis for the container DNS resolution configuration. - --resource-container="/kubelet": Absolute name of the resource-only container to create and run the Kubelet in (Default: /kubelet). + --resource-container="": Optional absolute name of the resource-only container to create and run the Kubelet in. --rkt-path="": Path of rkt binary. Leave empty to use the first rkt in $PATH. Only used if --container-runtime='rkt' --rkt-stage1-image="": image to use as stage1. Local paths and http/https URLs are supported. If empty, the 'stage1.aci' in the same directory as '--rkt-path' will be used --root-dir="/var/lib/kubelet": Directory path for managing kubelet files (volume mounts,etc). --runonce[=false]: If true, exit after spawning pods from local manifests or remote urls. Exclusive with --api-servers, and --enable-server - --runtime-container="/docker-daemon": Absolute name of the cgroups to create (if required) and run the runtime in (Default: /docker-daemon). + --runtime-container="": Optional absolute name of the cgroups to create and run the runtime in. --serialize-image-pulls[=true]: Pull images one at a time. We recommend *not* changing the default value on nodes that run docker daemon with version < 1.9 or an Aufs storage backend. Issue #10959 has more details. [default=true] --streaming-connection-idle-timeout=4h0m0s: Maximum time a streaming connection can be idle before the connection is automatically closed. 0 indicates no timeout. Example: '5m' --sync-frequency=1m0s: Max period between synchronizing running containers and config From 575812787db7149ed458fda14544dc74a5e4f6e4 Mon Sep 17 00:00:00 2001 From: Vishnu kannan Date: Tue, 9 Feb 2016 16:58:44 -0800 Subject: [PATCH 3/4] Replace `--resource-container` and `--system-container` with `--kubelet-cgroups` and `--system-cgroups` respectively. Updated `--runtime-container` to `--runtime-cgroups`. Cleaned up most of the kubelet code that consumes these flags to match the flag name changes. Signed-off-by: Vishnu kannan --- cmd/kubelet/app/options/options.go | 19 +- cmd/kubelet/app/server.go | 28 +- contrib/mesos/pkg/executor/service/service.go | 12 +- hack/verify-flags/known-flags.txt | 4 +- pkg/apis/componentconfig/types.go | 21 +- .../v1alpha1/types.generated.go | 2098 ----------------- pkg/kubelet/cm/container_manager.go | 14 +- pkg/kubelet/cm/container_manager_linux.go | 34 +- pkg/kubelet/cm/container_manager_stub.go | 2 +- .../cm/container_manager_unsupported.go | 2 +- pkg/kubelet/server/stats/summary.go | 6 +- pkg/kubelet/server/stats/summary_test.go | 6 +- 12 files changed, 78 insertions(+), 2168 deletions(-) delete mode 100644 pkg/apis/componentconfig/v1alpha1/types.generated.go diff --git a/cmd/kubelet/app/options/options.go b/cmd/kubelet/app/options/options.go index d417fe1641..e4c767525e 100644 --- a/cmd/kubelet/app/options/options.go +++ b/cmd/kubelet/app/options/options.go @@ -111,15 +111,15 @@ func NewKubeletServer() *KubeletServer { RegisterSchedulable: true, RegistryBurst: 10, RegistryPullQPS: 5.0, - ResourceContainer: "", + KubeletCgroups: "", RktPath: "", RktStage1Image: "", RootDirectory: defaultRootDir, - RuntimeContainer: "", + RuntimeCgroups: "", SerializeImagePulls: true, StreamingConnectionIdleTimeout: unversioned.Duration{4 * time.Hour}, SyncFrequency: unversioned.Duration{1 * time.Minute}, - SystemContainer: "", + SystemCgroups: "", ReconcileCIDR: true, KubeAPIQPS: 5.0, KubeAPIBurst: 10, @@ -191,13 +191,20 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) { fs.StringVar(&s.VolumePluginDir, "volume-plugin-dir", s.VolumePluginDir, " The full path of the directory in which to search for additional third party volume plugins") fs.StringVar(&s.CloudProvider, "cloud-provider", s.CloudProvider, "The provider for cloud services. Empty string for no provider.") fs.StringVar(&s.CloudConfigFile, "cloud-config", s.CloudConfigFile, "The path to the cloud provider configuration file. Empty string for no configuration file.") - fs.StringVar(&s.ResourceContainer, "resource-container", s.ResourceContainer, "Optional absolute name of the resource-only container to create and run the Kubelet in.") + + fs.StringVar(&s.KubeletCgroups, "resource-container", s.KubeletCgroups, "Optional absolute name of the resource-only container to create and run the Kubelet in.") + fs.MarkDeprecated("resource-container", "Use --kubelet-cgroups instead. Will be removed in a future version.") + fs.StringVar(&s.KubeletCgroups, "kubelet-cgroups", s.KubeletCgroups, "Optional absolute name of cgroups to create and run the Kubelet in.") + + fs.StringVar(&s.SystemCgroups, "system-container", s.SystemCgroups, "Optional resource-only container in which to place all non-kernel processes that are not already in a container. Empty for no container. Rolling back the flag requires a reboot. (Default: \"\").") + fs.MarkDeprecated("system-container", "Use --system-cgroups instead. Will be removed in a future version.") + fs.StringVar(&s.SystemCgroups, "system-cgroups", s.SystemCgroups, "Optional absolute name of cgroups in which to place all non-kernel processes that are not already inside a cgroup under `/`. Empty for no container. Rolling back the flag requires a reboot. (Default: \"\").") + 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.StringVar(&s.LockFilePath, "lock-file", s.LockFilePath, " The path to file for kubelet to use as a lock file.") 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'") fs.StringVar(&s.RktStage1Image, "rkt-stage1-image", s.RktStage1Image, "image to use as stage1. Local paths and http/https URLs are supported. If empty, the 'stage1.aci' in the same directory as '--rkt-path' will be used") - fs.StringVar(&s.SystemContainer, "system-container", s.SystemContainer, "Optional resource-only container in which to place all non-kernel processes that are not already in a container. Empty for no container. Rolling back the flag requires a reboot. (Default: \"\").") fs.BoolVar(&s.ConfigureCBR0, "configure-cbr0", s.ConfigureCBR0, "If true, kubelet will configure cbr0 based on Node.Spec.PodCIDR.") fs.BoolVar(&s.HairpinMode, "configure-hairpin-mode", s.HairpinMode, "If true, kubelet will set the hairpin mode flag on container interfaces. This allows endpoints of a Service to loadbalance back to themselves if they should try to access their own Service.") fs.IntVar(&s.MaxPods, "max-pods", s.MaxPods, "Number of Pods that can run on this Kubelet.") @@ -222,5 +229,5 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) { fs.DurationVar(&s.OutOfDiskTransitionFrequency.Duration, "outofdisk-transition-frequency", s.OutOfDiskTransitionFrequency.Duration, "Duration for which the kubelet has to wait before transitioning out of out-of-disk node condition status. Default: 5m0s") fs.StringVar(&s.NodeIP, "node-ip", s.NodeIP, "IP address of the node. If set, kubelet will use this IP address for the node") fs.BoolVar(&s.EnableCustomMetrics, "enable-custom-metrics", s.EnableCustomMetrics, "Support for gathering custom metrics.") - fs.StringVar(&s.RuntimeContainer, "runtime-container", s.RuntimeContainer, "Optional absolute name of cgroups to create and run the runtime in.") + fs.StringVar(&s.RuntimeCgroups, "runtime-cgroups", s.RuntimeCgroups, "Optional absolute name of cgroups to create and run the runtime in.") } diff --git a/cmd/kubelet/app/server.go b/cmd/kubelet/app/server.go index db75bb35ad..04c287a155 100644 --- a/cmd/kubelet/app/server.go +++ b/cmd/kubelet/app/server.go @@ -194,7 +194,7 @@ func UnsecuredKubeletConfig(s *options.KubeletServer) (*KubeletConfig, error) { CPUCFSQuota: s.CPUCFSQuota, DiskSpacePolicy: diskSpacePolicy, DockerClient: dockertools.ConnectToDockerOrDie(s.DockerEndpoint), - RuntimeContainer: s.RuntimeContainer, + RuntimeCgroups: s.RuntimeCgroups, DockerExecHandler: dockerExecHandler, EnableCustomMetrics: s.EnableCustomMetrics, EnableDebuggingHandlers: s.EnableDebuggingHandlers, @@ -236,7 +236,7 @@ func UnsecuredKubeletConfig(s *options.KubeletServer) (*KubeletConfig, error) { RegistryPullQPS: s.RegistryPullQPS, ResolverConfig: s.ResolverConfig, Reservation: *reservation, - ResourceContainer: s.ResourceContainer, + KubeletCgroups: s.KubeletCgroups, RktPath: s.RktPath, RktStage1Image: s.RktStage1Image, RootDirectory: s.RootDirectory, @@ -245,7 +245,7 @@ func UnsecuredKubeletConfig(s *options.KubeletServer) (*KubeletConfig, error) { StandaloneMode: (len(s.APIServerList) == 0), StreamingConnectionIdleTimeout: s.StreamingConnectionIdleTimeout.Duration, SyncFrequency: s.SyncFrequency.Duration, - SystemContainer: s.SystemContainer, + SystemCgroups: s.SystemCgroups, TLSOptions: tlsOptions, Writer: writer, VolumePlugins: ProbeVolumePlugins(s.VolumePluginDir), @@ -306,15 +306,15 @@ func Run(s *options.KubeletServer, kcfg *KubeletConfig) error { } if kcfg.ContainerManager == nil { - if kcfg.SystemContainer != "" && kcfg.CgroupRoot == "" { + if kcfg.SystemCgroups != "" && kcfg.CgroupRoot == "" { return fmt.Errorf("invalid configuration: system container was specified and cgroup root was not specified") } kcfg.ContainerManager, err = cm.NewContainerManager(kcfg.Mounter, kcfg.CAdvisorInterface, cm.NodeConfig{ - RuntimeContainerName: kcfg.RuntimeContainer, - SystemContainerName: kcfg.SystemContainer, - KubeletContainerName: kcfg.ResourceContainer, - ContainerRuntime: kcfg.ContainerRuntime, + RuntimeCgroupsName: kcfg.RuntimeCgroups, + SystemCgroupsName: kcfg.SystemCgroups, + KubeletCgroupsName: kcfg.KubeletCgroups, + ContainerRuntime: kcfg.ContainerRuntime, }) if err != nil { return err @@ -510,7 +510,7 @@ func SimpleKubelet(client *clientset.Clientset, CPUCFSQuota: true, DiskSpacePolicy: diskSpacePolicy, DockerClient: dockerClient, - RuntimeContainer: "", + RuntimeCgroups: "", DockerExecHandler: &dockertools.NativeExecHandler{}, EnableCustomMetrics: false, EnableDebuggingHandlers: true, @@ -539,11 +539,11 @@ func SimpleKubelet(client *clientset.Clientset, RegistryBurst: 10, RegistryPullQPS: 5.0, ResolverConfig: kubetypes.ResolvConfDefault, - ResourceContainer: "/kubelet", + KubeletCgroups: "/kubelet", RootDirectory: rootDir, SerializeImagePulls: true, SyncFrequency: syncFrequency, - SystemContainer: "", + SystemCgroups: "", TLSOptions: tlsOptions, VolumePlugins: volumePlugins, Writer: &io.StdWriter{}, @@ -686,7 +686,7 @@ type KubeletConfig struct { CPUCFSQuota bool DiskSpacePolicy kubelet.DiskSpacePolicy DockerClient dockertools.DockerInterface - RuntimeContainer string + RuntimeCgroups string DockerExecHandler dockertools.ExecHandler EnableCustomMetrics bool EnableDebuggingHandlers bool @@ -733,7 +733,7 @@ type KubeletConfig struct { RegistryPullQPS float64 Reservation kubetypes.Reservation ResolverConfig string - ResourceContainer string + KubeletCgroups string RktPath string RktStage1Image string RootDirectory string @@ -742,7 +742,7 @@ type KubeletConfig struct { StandaloneMode bool StreamingConnectionIdleTimeout time.Duration SyncFrequency time.Duration - SystemContainer string + SystemCgroups string TLSOptions *server.TLSOptions Writer io.Writer VolumePlugins []volume.VolumePlugin diff --git a/contrib/mesos/pkg/executor/service/service.go b/contrib/mesos/pkg/executor/service/service.go index f4f79ced77..a613a9cb36 100644 --- a/contrib/mesos/pkg/executor/service/service.go +++ b/contrib/mesos/pkg/executor/service/service.go @@ -180,7 +180,7 @@ func (s *KubeletExecutorServer) runKubelet( return decorated, pc, nil } - kcfg.RuntimeContainer = "" // don't move the docker daemon into a cgroup + kcfg.RuntimeCgroups = "" // don't move the docker daemon into a cgroup kcfg.Hostname = kcfg.HostnameOverride kcfg.KubeClient = apiclient @@ -201,7 +201,7 @@ func (s *KubeletExecutorServer) runKubelet( kcfg.NodeName = kcfg.HostnameOverride kcfg.PodConfig = kconfig.NewPodConfig(kconfig.PodConfigNotificationIncremental, kcfg.Recorder) // override the default pod source kcfg.StandaloneMode = false - kcfg.SystemContainer = "" // don't take control over other system processes. + kcfg.SystemCgroups = "" // don't take control over other system processes. if kcfg.Cloud != nil { // fail early and hard because having the cloud provider loaded would go unnoticed, // but break bigger cluster because accessing the state.json from every slave kills the master. @@ -217,10 +217,10 @@ func (s *KubeletExecutorServer) runKubelet( kcfg.CAdvisorInterface = cAdvisorInterface kcfg.ContainerManager, err = cm.NewContainerManager(kcfg.Mounter, cAdvisorInterface, cm.NodeConfig{ - RuntimeContainerName: kcfg.RuntimeContainer, - SystemContainerName: kcfg.SystemContainer, - KubeletContainerName: kcfg.ResourceContainer, - ContainerRuntime: kcfg.ContainerRuntime, + RuntimeCgroupsName: kcfg.RuntimeCgroups, + SystemCgroupsName: kcfg.SystemCgroups, + KubeletCgroupsName: kcfg.KubeletCgroups, + ContainerRuntime: kcfg.ContainerRuntime, }) if err != nil { return err diff --git a/hack/verify-flags/known-flags.txt b/hack/verify-flags/known-flags.txt index 54a093531e..0d63b18d04 100644 --- a/hack/verify-flags/known-flags.txt +++ b/hack/verify-flags/known-flags.txt @@ -171,6 +171,7 @@ kubectl-path kubelet-address kubelet-cadvisor-port kubelet-certificate-authority +kubelet-cgroups kubelet-client-certificate kubelet-client-key kubelet-docker-endpoint @@ -311,7 +312,7 @@ root-ca-file root-dir run-proxy runtime-config -runtime-container +runtime-cgroups save-config scheduler-config scheduler-name @@ -348,6 +349,7 @@ storage-versions streaming-connection-idle-timeout suicide-timeout sync-frequency +system-cgroups system-container system-reserved target-port diff --git a/pkg/apis/componentconfig/types.go b/pkg/apis/componentconfig/types.go index 52fc1226ce..376ab823be 100644 --- a/pkg/apis/componentconfig/types.go +++ b/pkg/apis/componentconfig/types.go @@ -52,9 +52,9 @@ type KubeProxyConfiguration struct { // portRange is the range of host ports (beginPort-endPort, inclusive) that may be consumed // in order to proxy service traffic. If unspecified (0-0) then ports will be randomly chosen. PortRange string `json:"portRange"` - // resourceContainer is the bsolute name of the resource-only container to create and run + // resourceContainer is the absolute name of the resource-only container to create and run // the Kube-proxy in (Default: /kube-proxy). - ResourceContainer string `json:"resourceContainer"` + ResourceContainer string `json:"kubeletCgroups"` // udpIdleTimeout is how long an idle UDP connection will be kept open (e.g. '250ms', '2s'). // Must be greater than 0. Only applicable for proxyMode=userspace. UDPIdleTimeout unversioned.Duration `json:"udpTimeoutMilliseconds"` @@ -223,9 +223,14 @@ type KubeletConfiguration struct { CloudProvider string `json:"cloudProvider,omitempty"` // cloudConfigFile is the path to the cloud provider configuration file. CloudConfigFile string `json:"cloudConfigFile,omitempty"` - // resourceContainer is the absolute name of the resource-only container - // to create and run the Kubelet in. - ResourceContainer string `json:"resourceContainer,omitempty"` + // KubeletCgroups is the absolute name of cgroups to isolate the kubelet in. + KubeletCgroups string `json:"kubeletCgroups,omitempty"` + // Cgroups that container runtime is expected to be isolated in. + RuntimeCgroups string `json:"runtimeCgroups,omitempty"` + // SystemCgroups is absolute name of cgroups in which to place + // all non-kernel processes that are not already in a container. Empty + // for no container. Rolling back the flag requires a reboot. + SystemCgroups string `json:"systemContainer,omitempty"` // cgroupRoot is the root cgroup to use for pods. This is handled by the // container runtime on a best effort basis. CgroupRoot string `json:"cgroupRoot,omitempty"` @@ -241,10 +246,6 @@ type KubeletConfiguration struct { // rktStage1Image is the image to use as stage1. Local paths and // http/https URLs are supported. RktStage1Image string `json:"rktStage1Image,omitempty"` - // systemContainer is the resource-only container in which to place - // all non-kernel processes that are not already in a container. Empty - // for no container. Rolling back the flag requires a reboot. - SystemContainer string `json:"systemContainer"` // configureCBR0 enables the kublet to configure cbr0 based on // Node.Spec.PodCIDR. ConfigureCBR0 bool `json:"configureCbr0"` @@ -304,8 +305,6 @@ type KubeletConfiguration struct { NonMasqueradeCIDR string `json:"nonMasqueradeCIDR"` // enable gathering custom metrics. EnableCustomMetrics bool `json:"enableCustomMetrics"` - // The cgroup that container runtime is expected to be isolated in. - RuntimeContainer string `json:"runtimeContainer,omitempty"` } type KubeSchedulerConfiguration struct { diff --git a/pkg/apis/componentconfig/v1alpha1/types.generated.go b/pkg/apis/componentconfig/v1alpha1/types.generated.go deleted file mode 100644 index a25f860c2e..0000000000 --- a/pkg/apis/componentconfig/v1alpha1/types.generated.go +++ /dev/null @@ -1,2098 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// ************************************************************ -// DO NOT EDIT. -// THIS FILE IS AUTO-GENERATED BY codecgen. -// ************************************************************ - -package v1alpha1 - -import ( - "errors" - "fmt" - codec1978 "github.com/ugorji/go/codec" - pkg1_unversioned "k8s.io/kubernetes/pkg/api/unversioned" - "reflect" - "runtime" - time "time" -) - -const ( - // ----- content types ---- - codecSelferC_UTF81234 = 1 - codecSelferC_RAW1234 = 0 - // ----- value types used ---- - codecSelferValueTypeArray1234 = 10 - codecSelferValueTypeMap1234 = 9 - // ----- containerStateValues ---- - codecSelfer_containerMapKey1234 = 2 - codecSelfer_containerMapValue1234 = 3 - codecSelfer_containerMapEnd1234 = 4 - codecSelfer_containerArrayElem1234 = 6 - codecSelfer_containerArrayEnd1234 = 7 -) - -var ( - codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) - codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) -) - -type codecSelfer1234 struct{} - -func init() { - if codec1978.GenVersion != 5 { - _, file, _, _ := runtime.Caller(0) - err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", - 5, codec1978.GenVersion, file) - panic(err) - } - if false { // reference the types, but skip this branch at build/run time - var v0 pkg1_unversioned.TypeMeta - var v1 time.Duration - _, _ = v0, v1 - } -} - -func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [18]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - yyq2[16] = x.Kind != "" - yyq2[17] = x.APIVersion != "" - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(18) - } else { - yynn2 = 16 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym4 := z.EncBinary() - _ = yym4 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.BindAddress)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("bindAddress")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym5 := z.EncBinary() - _ = yym5 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.BindAddress)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym7 := z.EncBinary() - _ = yym7 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.HealthzBindAddress)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("healthzBindAddress")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym8 := z.EncBinary() - _ = yym8 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.HealthzBindAddress)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym10 := z.EncBinary() - _ = yym10 - if false { - } else { - r.EncodeInt(int64(x.HealthzPort)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("healthzPort")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym11 := z.EncBinary() - _ = yym11 - if false { - } else { - r.EncodeInt(int64(x.HealthzPort)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym13 := z.EncBinary() - _ = yym13 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.HostnameOverride)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("hostnameOverride")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym14 := z.EncBinary() - _ = yym14 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.HostnameOverride)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.IPTablesMasqueradeBit == nil { - r.EncodeNil() - } else { - yy16 := *x.IPTablesMasqueradeBit - yym17 := z.EncBinary() - _ = yym17 - if false { - } else { - r.EncodeInt(int64(yy16)) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("iptablesMasqueradeBit")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.IPTablesMasqueradeBit == nil { - r.EncodeNil() - } else { - yy18 := *x.IPTablesMasqueradeBit - yym19 := z.EncBinary() - _ = yym19 - if false { - } else { - r.EncodeInt(int64(yy18)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy21 := &x.IPTablesSyncPeriod - yym22 := z.EncBinary() - _ = yym22 - if false { - } else if z.HasExtensions() && z.EncExt(yy21) { - } else if !yym22 && z.IsJSONHandle() { - z.EncJSONMarshal(yy21) - } else { - z.EncFallback(yy21) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("iptablesSyncPeriodSeconds")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy23 := &x.IPTablesSyncPeriod - yym24 := z.EncBinary() - _ = yym24 - if false { - } else if z.HasExtensions() && z.EncExt(yy23) { - } else if !yym24 && z.IsJSONHandle() { - z.EncJSONMarshal(yy23) - } else { - z.EncFallback(yy23) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym26 := z.EncBinary() - _ = yym26 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.KubeconfigPath)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kubeconfigPath")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym27 := z.EncBinary() - _ = yym27 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.KubeconfigPath)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym29 := z.EncBinary() - _ = yym29 - if false { - } else { - r.EncodeBool(bool(x.MasqueradeAll)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("masqueradeAll")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym30 := z.EncBinary() - _ = yym30 - if false { - } else { - r.EncodeBool(bool(x.MasqueradeAll)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym32 := z.EncBinary() - _ = yym32 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Master)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("master")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym33 := z.EncBinary() - _ = yym33 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Master)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.OOMScoreAdj == nil { - r.EncodeNil() - } else { - yy35 := *x.OOMScoreAdj - yym36 := z.EncBinary() - _ = yym36 - if false { - } else { - r.EncodeInt(int64(yy35)) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("oomScoreAdj")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.OOMScoreAdj == nil { - r.EncodeNil() - } else { - yy37 := *x.OOMScoreAdj - yym38 := z.EncBinary() - _ = yym38 - if false { - } else { - r.EncodeInt(int64(yy37)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - x.Mode.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("mode")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - x.Mode.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym41 := z.EncBinary() - _ = yym41 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.PortRange)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("portRange")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym42 := z.EncBinary() - _ = yym42 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.PortRange)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym44 := z.EncBinary() - _ = yym44 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ResourceContainer)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("resourceContainer")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym45 := z.EncBinary() - _ = yym45 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ResourceContainer)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy47 := &x.UDPIdleTimeout - yym48 := z.EncBinary() - _ = yym48 - if false { - } else if z.HasExtensions() && z.EncExt(yy47) { - } else if !yym48 && z.IsJSONHandle() { - z.EncJSONMarshal(yy47) - } else { - z.EncFallback(yy47) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("udpTimeoutMilliseconds")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy49 := &x.UDPIdleTimeout - yym50 := z.EncBinary() - _ = yym50 - if false { - } else if z.HasExtensions() && z.EncExt(yy49) { - } else if !yym50 && z.IsJSONHandle() { - z.EncJSONMarshal(yy49) - } else { - z.EncFallback(yy49) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym52 := z.EncBinary() - _ = yym52 - if false { - } else { - r.EncodeInt(int64(x.ConntrackMax)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("conntrackMax")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym53 := z.EncBinary() - _ = yym53 - if false { - } else { - r.EncodeInt(int64(x.ConntrackMax)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy55 := &x.ConntrackTCPEstablishedTimeout - yym56 := z.EncBinary() - _ = yym56 - if false { - } else if z.HasExtensions() && z.EncExt(yy55) { - } else if !yym56 && z.IsJSONHandle() { - z.EncJSONMarshal(yy55) - } else { - z.EncFallback(yy55) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("conntrackTCPEstablishedTimeout")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy57 := &x.ConntrackTCPEstablishedTimeout - yym58 := z.EncBinary() - _ = yym58 - if false { - } else if z.HasExtensions() && z.EncExt(yy57) { - } else if !yym58 && z.IsJSONHandle() { - z.EncJSONMarshal(yy57) - } else { - z.EncFallback(yy57) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[16] { - yym60 := z.EncBinary() - _ = yym60 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[16] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym61 := z.EncBinary() - _ = yym61 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[17] { - yym63 := z.EncBinary() - _ = yym63 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[17] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym64 := z.EncBinary() - _ = yym64 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *KubeProxyConfiguration) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym65 := z.DecBinary() - _ = yym65 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct66 := r.ContainerType() - if yyct66 == codecSelferValueTypeMap1234 { - yyl66 := r.ReadMapStart() - if yyl66 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl66, d) - } - } else if yyct66 == codecSelferValueTypeArray1234 { - yyl66 := r.ReadArrayStart() - if yyl66 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl66, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *KubeProxyConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys67Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys67Slc - var yyhl67 bool = l >= 0 - for yyj67 := 0; ; yyj67++ { - if yyhl67 { - if yyj67 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys67Slc = r.DecodeBytes(yys67Slc, true, true) - yys67 := string(yys67Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys67 { - case "bindAddress": - if r.TryDecodeAsNil() { - x.BindAddress = "" - } else { - x.BindAddress = string(r.DecodeString()) - } - case "healthzBindAddress": - if r.TryDecodeAsNil() { - x.HealthzBindAddress = "" - } else { - x.HealthzBindAddress = string(r.DecodeString()) - } - case "healthzPort": - if r.TryDecodeAsNil() { - x.HealthzPort = 0 - } else { - x.HealthzPort = int32(r.DecodeInt(32)) - } - case "hostnameOverride": - if r.TryDecodeAsNil() { - x.HostnameOverride = "" - } else { - x.HostnameOverride = string(r.DecodeString()) - } - case "iptablesMasqueradeBit": - if r.TryDecodeAsNil() { - if x.IPTablesMasqueradeBit != nil { - x.IPTablesMasqueradeBit = nil - } - } else { - if x.IPTablesMasqueradeBit == nil { - x.IPTablesMasqueradeBit = new(int32) - } - yym73 := z.DecBinary() - _ = yym73 - if false { - } else { - *((*int32)(x.IPTablesMasqueradeBit)) = int32(r.DecodeInt(32)) - } - } - case "iptablesSyncPeriodSeconds": - if r.TryDecodeAsNil() { - x.IPTablesSyncPeriod = pkg1_unversioned.Duration{} - } else { - yyv74 := &x.IPTablesSyncPeriod - yym75 := z.DecBinary() - _ = yym75 - if false { - } else if z.HasExtensions() && z.DecExt(yyv74) { - } else if !yym75 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv74) - } else { - z.DecFallback(yyv74, false) - } - } - case "kubeconfigPath": - if r.TryDecodeAsNil() { - x.KubeconfigPath = "" - } else { - x.KubeconfigPath = string(r.DecodeString()) - } - case "masqueradeAll": - if r.TryDecodeAsNil() { - x.MasqueradeAll = false - } else { - x.MasqueradeAll = bool(r.DecodeBool()) - } - case "master": - if r.TryDecodeAsNil() { - x.Master = "" - } else { - x.Master = string(r.DecodeString()) - } - case "oomScoreAdj": - if r.TryDecodeAsNil() { - if x.OOMScoreAdj != nil { - x.OOMScoreAdj = nil - } - } else { - if x.OOMScoreAdj == nil { - x.OOMScoreAdj = new(int32) - } - yym80 := z.DecBinary() - _ = yym80 - if false { - } else { - *((*int32)(x.OOMScoreAdj)) = int32(r.DecodeInt(32)) - } - } - case "mode": - if r.TryDecodeAsNil() { - x.Mode = "" - } else { - x.Mode = ProxyMode(r.DecodeString()) - } - case "portRange": - if r.TryDecodeAsNil() { - x.PortRange = "" - } else { - x.PortRange = string(r.DecodeString()) - } - case "resourceContainer": - if r.TryDecodeAsNil() { - x.ResourceContainer = "" - } else { - x.ResourceContainer = string(r.DecodeString()) - } - case "udpTimeoutMilliseconds": - if r.TryDecodeAsNil() { - x.UDPIdleTimeout = pkg1_unversioned.Duration{} - } else { - yyv84 := &x.UDPIdleTimeout - yym85 := z.DecBinary() - _ = yym85 - if false { - } else if z.HasExtensions() && z.DecExt(yyv84) { - } else if !yym85 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv84) - } else { - z.DecFallback(yyv84, false) - } - } - case "conntrackMax": - if r.TryDecodeAsNil() { - x.ConntrackMax = 0 - } else { - x.ConntrackMax = int32(r.DecodeInt(32)) - } - case "conntrackTCPEstablishedTimeout": - if r.TryDecodeAsNil() { - x.ConntrackTCPEstablishedTimeout = pkg1_unversioned.Duration{} - } else { - yyv87 := &x.ConntrackTCPEstablishedTimeout - yym88 := z.DecBinary() - _ = yym88 - if false { - } else if z.HasExtensions() && z.DecExt(yyv87) { - } else if !yym88 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv87) - } else { - z.DecFallback(yyv87, false) - } - } - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys67) - } // end switch yys67 - } // end for yyj67 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj91 int - var yyb91 bool - var yyhl91 bool = l >= 0 - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.BindAddress = "" - } else { - x.BindAddress = string(r.DecodeString()) - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HealthzBindAddress = "" - } else { - x.HealthzBindAddress = string(r.DecodeString()) - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HealthzPort = 0 - } else { - x.HealthzPort = int32(r.DecodeInt(32)) - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HostnameOverride = "" - } else { - x.HostnameOverride = string(r.DecodeString()) - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.IPTablesMasqueradeBit != nil { - x.IPTablesMasqueradeBit = nil - } - } else { - if x.IPTablesMasqueradeBit == nil { - x.IPTablesMasqueradeBit = new(int32) - } - yym97 := z.DecBinary() - _ = yym97 - if false { - } else { - *((*int32)(x.IPTablesMasqueradeBit)) = int32(r.DecodeInt(32)) - } - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.IPTablesSyncPeriod = pkg1_unversioned.Duration{} - } else { - yyv98 := &x.IPTablesSyncPeriod - yym99 := z.DecBinary() - _ = yym99 - if false { - } else if z.HasExtensions() && z.DecExt(yyv98) { - } else if !yym99 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv98) - } else { - z.DecFallback(yyv98, false) - } - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.KubeconfigPath = "" - } else { - x.KubeconfigPath = string(r.DecodeString()) - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.MasqueradeAll = false - } else { - x.MasqueradeAll = bool(r.DecodeBool()) - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Master = "" - } else { - x.Master = string(r.DecodeString()) - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.OOMScoreAdj != nil { - x.OOMScoreAdj = nil - } - } else { - if x.OOMScoreAdj == nil { - x.OOMScoreAdj = new(int32) - } - yym104 := z.DecBinary() - _ = yym104 - if false { - } else { - *((*int32)(x.OOMScoreAdj)) = int32(r.DecodeInt(32)) - } - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Mode = "" - } else { - x.Mode = ProxyMode(r.DecodeString()) - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.PortRange = "" - } else { - x.PortRange = string(r.DecodeString()) - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ResourceContainer = "" - } else { - x.ResourceContainer = string(r.DecodeString()) - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.UDPIdleTimeout = pkg1_unversioned.Duration{} - } else { - yyv108 := &x.UDPIdleTimeout - yym109 := z.DecBinary() - _ = yym109 - if false { - } else if z.HasExtensions() && z.DecExt(yyv108) { - } else if !yym109 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv108) - } else { - z.DecFallback(yyv108, false) - } - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ConntrackMax = 0 - } else { - x.ConntrackMax = int32(r.DecodeInt(32)) - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ConntrackTCPEstablishedTimeout = pkg1_unversioned.Duration{} - } else { - yyv111 := &x.ConntrackTCPEstablishedTimeout - yym112 := z.DecBinary() - _ = yym112 - if false { - } else if z.HasExtensions() && z.DecExt(yyv111) { - } else if !yym112 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv111) - } else { - z.DecFallback(yyv111, false) - } - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - for { - yyj91++ - if yyhl91 { - yyb91 = yyj91 > l - } else { - yyb91 = r.CheckBreak() - } - if yyb91 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj91-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x ProxyMode) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym115 := z.EncBinary() - _ = yym115 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x)) - } -} - -func (x *ProxyMode) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym116 := z.DecBinary() - _ = yym116 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - *((*string)(x)) = r.DecodeString() - } -} - -func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym117 := z.EncBinary() - _ = yym117 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep118 := !z.EncBinary() - yy2arr118 := z.EncBasicHandle().StructToArray - var yyq118 [11]bool - _, _, _ = yysep118, yyq118, yy2arr118 - const yyr118 bool = false - yyq118[9] = x.Kind != "" - yyq118[10] = x.APIVersion != "" - var yynn118 int - if yyr118 || yy2arr118 { - r.EncodeArrayStart(11) - } else { - yynn118 = 9 - for _, b := range yyq118 { - if b { - yynn118++ - } - } - r.EncodeMapStart(yynn118) - yynn118 = 0 - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym120 := z.EncBinary() - _ = yym120 - if false { - } else { - r.EncodeInt(int64(x.Port)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("port")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym121 := z.EncBinary() - _ = yym121 - if false { - } else { - r.EncodeInt(int64(x.Port)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym123 := z.EncBinary() - _ = yym123 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Address)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("address")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym124 := z.EncBinary() - _ = yym124 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Address)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym126 := z.EncBinary() - _ = yym126 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.AlgorithmProvider)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("algorithmProvider")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym127 := z.EncBinary() - _ = yym127 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.AlgorithmProvider)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym129 := z.EncBinary() - _ = yym129 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.PolicyConfigFile)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("policyConfigFile")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym130 := z.EncBinary() - _ = yym130 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.PolicyConfigFile)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.EnableProfiling == nil { - r.EncodeNil() - } else { - yy132 := *x.EnableProfiling - yym133 := z.EncBinary() - _ = yym133 - if false { - } else { - r.EncodeBool(bool(yy132)) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("enableProfiling")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.EnableProfiling == nil { - r.EncodeNil() - } else { - yy134 := *x.EnableProfiling - yym135 := z.EncBinary() - _ = yym135 - if false { - } else { - r.EncodeBool(bool(yy134)) - } - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym137 := z.EncBinary() - _ = yym137 - if false { - } else { - r.EncodeFloat32(float32(x.KubeAPIQPS)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kubeAPIQPS")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym138 := z.EncBinary() - _ = yym138 - if false { - } else { - r.EncodeFloat32(float32(x.KubeAPIQPS)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym140 := z.EncBinary() - _ = yym140 - if false { - } else { - r.EncodeInt(int64(x.KubeAPIBurst)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kubeAPIBurst")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym141 := z.EncBinary() - _ = yym141 - if false { - } else { - r.EncodeInt(int64(x.KubeAPIBurst)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym143 := z.EncBinary() - _ = yym143 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("schedulerName")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym144 := z.EncBinary() - _ = yym144 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName)) - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy146 := &x.LeaderElection - yy146.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("leaderElection")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy147 := &x.LeaderElection - yy147.CodecEncodeSelf(e) - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq118[9] { - yym149 := z.EncBinary() - _ = yym149 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq118[9] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym150 := z.EncBinary() - _ = yym150 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq118[10] { - yym152 := z.EncBinary() - _ = yym152 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq118[10] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym153 := z.EncBinary() - _ = yym153 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr118 || yy2arr118 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *KubeSchedulerConfiguration) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym154 := z.DecBinary() - _ = yym154 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct155 := r.ContainerType() - if yyct155 == codecSelferValueTypeMap1234 { - yyl155 := r.ReadMapStart() - if yyl155 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl155, d) - } - } else if yyct155 == codecSelferValueTypeArray1234 { - yyl155 := r.ReadArrayStart() - if yyl155 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl155, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *KubeSchedulerConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys156Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys156Slc - var yyhl156 bool = l >= 0 - for yyj156 := 0; ; yyj156++ { - if yyhl156 { - if yyj156 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys156Slc = r.DecodeBytes(yys156Slc, true, true) - yys156 := string(yys156Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys156 { - case "port": - if r.TryDecodeAsNil() { - x.Port = 0 - } else { - x.Port = int(r.DecodeInt(codecSelferBitsize1234)) - } - case "address": - if r.TryDecodeAsNil() { - x.Address = "" - } else { - x.Address = string(r.DecodeString()) - } - case "algorithmProvider": - if r.TryDecodeAsNil() { - x.AlgorithmProvider = "" - } else { - x.AlgorithmProvider = string(r.DecodeString()) - } - case "policyConfigFile": - if r.TryDecodeAsNil() { - x.PolicyConfigFile = "" - } else { - x.PolicyConfigFile = string(r.DecodeString()) - } - case "enableProfiling": - if r.TryDecodeAsNil() { - if x.EnableProfiling != nil { - x.EnableProfiling = nil - } - } else { - if x.EnableProfiling == nil { - x.EnableProfiling = new(bool) - } - yym162 := z.DecBinary() - _ = yym162 - if false { - } else { - *((*bool)(x.EnableProfiling)) = r.DecodeBool() - } - } - case "kubeAPIQPS": - if r.TryDecodeAsNil() { - x.KubeAPIQPS = 0 - } else { - x.KubeAPIQPS = float32(r.DecodeFloat(true)) - } - case "kubeAPIBurst": - if r.TryDecodeAsNil() { - x.KubeAPIBurst = 0 - } else { - x.KubeAPIBurst = int(r.DecodeInt(codecSelferBitsize1234)) - } - case "schedulerName": - if r.TryDecodeAsNil() { - x.SchedulerName = "" - } else { - x.SchedulerName = string(r.DecodeString()) - } - case "leaderElection": - if r.TryDecodeAsNil() { - x.LeaderElection = LeaderElectionConfiguration{} - } else { - yyv166 := &x.LeaderElection - yyv166.CodecDecodeSelf(d) - } - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys156) - } // end switch yys156 - } // end for yyj156 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj169 int - var yyb169 bool - var yyhl169 bool = l >= 0 - yyj169++ - if yyhl169 { - yyb169 = yyj169 > l - } else { - yyb169 = r.CheckBreak() - } - if yyb169 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Port = 0 - } else { - x.Port = int(r.DecodeInt(codecSelferBitsize1234)) - } - yyj169++ - if yyhl169 { - yyb169 = yyj169 > l - } else { - yyb169 = r.CheckBreak() - } - if yyb169 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Address = "" - } else { - x.Address = string(r.DecodeString()) - } - yyj169++ - if yyhl169 { - yyb169 = yyj169 > l - } else { - yyb169 = r.CheckBreak() - } - if yyb169 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.AlgorithmProvider = "" - } else { - x.AlgorithmProvider = string(r.DecodeString()) - } - yyj169++ - if yyhl169 { - yyb169 = yyj169 > l - } else { - yyb169 = r.CheckBreak() - } - if yyb169 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.PolicyConfigFile = "" - } else { - x.PolicyConfigFile = string(r.DecodeString()) - } - yyj169++ - if yyhl169 { - yyb169 = yyj169 > l - } else { - yyb169 = r.CheckBreak() - } - if yyb169 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.EnableProfiling != nil { - x.EnableProfiling = nil - } - } else { - if x.EnableProfiling == nil { - x.EnableProfiling = new(bool) - } - yym175 := z.DecBinary() - _ = yym175 - if false { - } else { - *((*bool)(x.EnableProfiling)) = r.DecodeBool() - } - } - yyj169++ - if yyhl169 { - yyb169 = yyj169 > l - } else { - yyb169 = r.CheckBreak() - } - if yyb169 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.KubeAPIQPS = 0 - } else { - x.KubeAPIQPS = float32(r.DecodeFloat(true)) - } - yyj169++ - if yyhl169 { - yyb169 = yyj169 > l - } else { - yyb169 = r.CheckBreak() - } - if yyb169 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.KubeAPIBurst = 0 - } else { - x.KubeAPIBurst = int(r.DecodeInt(codecSelferBitsize1234)) - } - yyj169++ - if yyhl169 { - yyb169 = yyj169 > l - } else { - yyb169 = r.CheckBreak() - } - if yyb169 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.SchedulerName = "" - } else { - x.SchedulerName = string(r.DecodeString()) - } - yyj169++ - if yyhl169 { - yyb169 = yyj169 > l - } else { - yyb169 = r.CheckBreak() - } - if yyb169 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.LeaderElection = LeaderElectionConfiguration{} - } else { - yyv179 := &x.LeaderElection - yyv179.CodecDecodeSelf(d) - } - yyj169++ - if yyhl169 { - yyb169 = yyj169 > l - } else { - yyb169 = r.CheckBreak() - } - if yyb169 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj169++ - if yyhl169 { - yyb169 = yyj169 > l - } else { - yyb169 = r.CheckBreak() - } - if yyb169 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - for { - yyj169++ - if yyhl169 { - yyb169 = yyj169 > l - } else { - yyb169 = r.CheckBreak() - } - if yyb169 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj169-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym182 := z.EncBinary() - _ = yym182 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep183 := !z.EncBinary() - yy2arr183 := z.EncBasicHandle().StructToArray - var yyq183 [4]bool - _, _, _ = yysep183, yyq183, yy2arr183 - const yyr183 bool = false - var yynn183 int - if yyr183 || yy2arr183 { - r.EncodeArrayStart(4) - } else { - yynn183 = 4 - for _, b := range yyq183 { - if b { - yynn183++ - } - } - r.EncodeMapStart(yynn183) - yynn183 = 0 - } - if yyr183 || yy2arr183 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.LeaderElect == nil { - r.EncodeNil() - } else { - yy185 := *x.LeaderElect - yym186 := z.EncBinary() - _ = yym186 - if false { - } else { - r.EncodeBool(bool(yy185)) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("leaderElect")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.LeaderElect == nil { - r.EncodeNil() - } else { - yy187 := *x.LeaderElect - yym188 := z.EncBinary() - _ = yym188 - if false { - } else { - r.EncodeBool(bool(yy187)) - } - } - } - if yyr183 || yy2arr183 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy190 := &x.LeaseDuration - yym191 := z.EncBinary() - _ = yym191 - if false { - } else if z.HasExtensions() && z.EncExt(yy190) { - } else if !yym191 && z.IsJSONHandle() { - z.EncJSONMarshal(yy190) - } else { - z.EncFallback(yy190) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("leaseDuration")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy192 := &x.LeaseDuration - yym193 := z.EncBinary() - _ = yym193 - if false { - } else if z.HasExtensions() && z.EncExt(yy192) { - } else if !yym193 && z.IsJSONHandle() { - z.EncJSONMarshal(yy192) - } else { - z.EncFallback(yy192) - } - } - if yyr183 || yy2arr183 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy195 := &x.RenewDeadline - yym196 := z.EncBinary() - _ = yym196 - if false { - } else if z.HasExtensions() && z.EncExt(yy195) { - } else if !yym196 && z.IsJSONHandle() { - z.EncJSONMarshal(yy195) - } else { - z.EncFallback(yy195) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("renewDeadline")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy197 := &x.RenewDeadline - yym198 := z.EncBinary() - _ = yym198 - if false { - } else if z.HasExtensions() && z.EncExt(yy197) { - } else if !yym198 && z.IsJSONHandle() { - z.EncJSONMarshal(yy197) - } else { - z.EncFallback(yy197) - } - } - if yyr183 || yy2arr183 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy200 := &x.RetryPeriod - yym201 := z.EncBinary() - _ = yym201 - if false { - } else if z.HasExtensions() && z.EncExt(yy200) { - } else if !yym201 && z.IsJSONHandle() { - z.EncJSONMarshal(yy200) - } else { - z.EncFallback(yy200) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("retryPeriod")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy202 := &x.RetryPeriod - yym203 := z.EncBinary() - _ = yym203 - if false { - } else if z.HasExtensions() && z.EncExt(yy202) { - } else if !yym203 && z.IsJSONHandle() { - z.EncJSONMarshal(yy202) - } else { - z.EncFallback(yy202) - } - } - if yyr183 || yy2arr183 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *LeaderElectionConfiguration) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym204 := z.DecBinary() - _ = yym204 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct205 := r.ContainerType() - if yyct205 == codecSelferValueTypeMap1234 { - yyl205 := r.ReadMapStart() - if yyl205 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl205, d) - } - } else if yyct205 == codecSelferValueTypeArray1234 { - yyl205 := r.ReadArrayStart() - if yyl205 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl205, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *LeaderElectionConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys206Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys206Slc - var yyhl206 bool = l >= 0 - for yyj206 := 0; ; yyj206++ { - if yyhl206 { - if yyj206 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys206Slc = r.DecodeBytes(yys206Slc, true, true) - yys206 := string(yys206Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys206 { - case "leaderElect": - if r.TryDecodeAsNil() { - if x.LeaderElect != nil { - x.LeaderElect = nil - } - } else { - if x.LeaderElect == nil { - x.LeaderElect = new(bool) - } - yym208 := z.DecBinary() - _ = yym208 - if false { - } else { - *((*bool)(x.LeaderElect)) = r.DecodeBool() - } - } - case "leaseDuration": - if r.TryDecodeAsNil() { - x.LeaseDuration = pkg1_unversioned.Duration{} - } else { - yyv209 := &x.LeaseDuration - yym210 := z.DecBinary() - _ = yym210 - if false { - } else if z.HasExtensions() && z.DecExt(yyv209) { - } else if !yym210 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv209) - } else { - z.DecFallback(yyv209, false) - } - } - case "renewDeadline": - if r.TryDecodeAsNil() { - x.RenewDeadline = pkg1_unversioned.Duration{} - } else { - yyv211 := &x.RenewDeadline - yym212 := z.DecBinary() - _ = yym212 - if false { - } else if z.HasExtensions() && z.DecExt(yyv211) { - } else if !yym212 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv211) - } else { - z.DecFallback(yyv211, false) - } - } - case "retryPeriod": - if r.TryDecodeAsNil() { - x.RetryPeriod = pkg1_unversioned.Duration{} - } else { - yyv213 := &x.RetryPeriod - yym214 := z.DecBinary() - _ = yym214 - if false { - } else if z.HasExtensions() && z.DecExt(yyv213) { - } else if !yym214 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv213) - } else { - z.DecFallback(yyv213, false) - } - } - default: - z.DecStructFieldNotFound(-1, yys206) - } // end switch yys206 - } // end for yyj206 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj215 int - var yyb215 bool - var yyhl215 bool = l >= 0 - yyj215++ - if yyhl215 { - yyb215 = yyj215 > l - } else { - yyb215 = r.CheckBreak() - } - if yyb215 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.LeaderElect != nil { - x.LeaderElect = nil - } - } else { - if x.LeaderElect == nil { - x.LeaderElect = new(bool) - } - yym217 := z.DecBinary() - _ = yym217 - if false { - } else { - *((*bool)(x.LeaderElect)) = r.DecodeBool() - } - } - yyj215++ - if yyhl215 { - yyb215 = yyj215 > l - } else { - yyb215 = r.CheckBreak() - } - if yyb215 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.LeaseDuration = pkg1_unversioned.Duration{} - } else { - yyv218 := &x.LeaseDuration - yym219 := z.DecBinary() - _ = yym219 - if false { - } else if z.HasExtensions() && z.DecExt(yyv218) { - } else if !yym219 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv218) - } else { - z.DecFallback(yyv218, false) - } - } - yyj215++ - if yyhl215 { - yyb215 = yyj215 > l - } else { - yyb215 = r.CheckBreak() - } - if yyb215 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.RenewDeadline = pkg1_unversioned.Duration{} - } else { - yyv220 := &x.RenewDeadline - yym221 := z.DecBinary() - _ = yym221 - if false { - } else if z.HasExtensions() && z.DecExt(yyv220) { - } else if !yym221 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv220) - } else { - z.DecFallback(yyv220, false) - } - } - yyj215++ - if yyhl215 { - yyb215 = yyj215 > l - } else { - yyb215 = r.CheckBreak() - } - if yyb215 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.RetryPeriod = pkg1_unversioned.Duration{} - } else { - yyv222 := &x.RetryPeriod - yym223 := z.DecBinary() - _ = yym223 - if false { - } else if z.HasExtensions() && z.DecExt(yyv222) { - } else if !yym223 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv222) - } else { - z.DecFallback(yyv222, false) - } - } - for { - yyj215++ - if yyhl215 { - yyb215 = yyj215 > l - } else { - yyb215 = r.CheckBreak() - } - if yyb215 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj215-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} diff --git a/pkg/kubelet/cm/container_manager.go b/pkg/kubelet/cm/container_manager.go index db037ac18c..9ee4ef4290 100644 --- a/pkg/kubelet/cm/container_manager.go +++ b/pkg/kubelet/cm/container_manager.go @@ -27,17 +27,17 @@ type ContainerManager interface { // - Creates the system container where all non-containerized processes run. Start() error - // Returns resources allocated to system containers in the machine. - // These containers include the system and Kubernetes services. - SystemContainersLimit() api.ResourceList + // Returns resources allocated to system cgroups in the machine. + // These cgroups include the system and Kubernetes services. + SystemCgroupsLimit() api.ResourceList // Returns a NodeConfig that is being used by the container manager. GetNodeConfig() NodeConfig } type NodeConfig struct { - RuntimeContainerName string - SystemContainerName string - KubeletContainerName string - ContainerRuntime string + RuntimeCgroupsName string + SystemCgroupsName string + KubeletCgroupsName string + ContainerRuntime string } diff --git a/pkg/kubelet/cm/container_manager_linux.go b/pkg/kubelet/cm/container_manager_linux.go index 79200a5bb4..43fa7bedb1 100644 --- a/pkg/kubelet/cm/container_manager_linux.go +++ b/pkg/kubelet/cm/container_manager_linux.go @@ -66,7 +66,7 @@ type systemContainer struct { manager *fs.Manager } -func newSystemContainer(containerName string) *systemContainer { +func newSystemCgroups(containerName string) *systemContainer { return &systemContainer{ name: containerName, manager: createManager(containerName), @@ -193,8 +193,8 @@ func (cm *containerManagerImpl) setupNode() error { systemContainers := []*systemContainer{} if cm.ContainerRuntime == "docker" { - if cm.RuntimeContainerName != "" { - cont := newSystemContainer(cm.RuntimeContainerName) + if cm.RuntimeCgroupsName != "" { + cont := newSystemCgroups(cm.RuntimeCgroupsName) info, err := cm.cadvisorInterface.MachineInfo() var capacity = api.ResourceList{} if err != nil { @@ -203,16 +203,16 @@ func (cm *containerManagerImpl) setupNode() error { } memoryLimit := (int64(capacity.Memory().Value() * DockerMemoryLimitThresholdPercent / 100)) if memoryLimit < MinDockerMemoryLimit { - glog.Warningf("Memory limit %d for container %s is too small, reset it to %d", memoryLimit, cm.RuntimeContainerName, MinDockerMemoryLimit) + glog.Warningf("Memory limit %d for container %s is too small, reset it to %d", memoryLimit, cm.RuntimeCgroupsName, MinDockerMemoryLimit) memoryLimit = MinDockerMemoryLimit } - glog.V(2).Infof("Configure resource-only container %s with memory limit: %d", cm.RuntimeContainerName, memoryLimit) + glog.V(2).Infof("Configure resource-only container %s with memory limit: %d", cm.RuntimeCgroupsName, memoryLimit) dockerContainer := &fs.Manager{ Cgroups: &configs.Cgroup{ Parent: "/", - Name: cm.RuntimeContainerName, + Name: cm.RuntimeCgroupsName, Resources: &configs.Resources{ Memory: memoryLimit, MemorySwap: -1, @@ -229,16 +229,16 @@ func (cm *containerManagerImpl) setupNode() error { if err != nil { glog.Error(err) } else { - cm.RuntimeContainerName = cont + cm.RuntimeCgroupsName = cont } } } - if cm.SystemContainerName != "" { - if cm.SystemContainerName == "/" { + if cm.SystemCgroupsName != "" { + if cm.SystemCgroupsName == "/" { return fmt.Errorf("system container cannot be root (\"/\")") } - cont := newSystemContainer(cm.SystemContainerName) + cont := newSystemCgroups(cm.SystemCgroupsName) rootContainer := &fs.Manager{ Cgroups: &configs.Cgroup{ Parent: "/", @@ -246,17 +246,17 @@ func (cm *containerManagerImpl) setupNode() error { }, } cont.ensureStateFunc = func(manager *fs.Manager) error { - return ensureSystemContainer(rootContainer, manager) + return ensureSystemCgroups(rootContainer, manager) } systemContainers = append(systemContainers, cont) } - if cm.KubeletContainerName != "" { - cont := newSystemContainer(cm.KubeletContainerName) + if cm.KubeletCgroupsName != "" { + cont := newSystemCgroups(cm.KubeletCgroupsName) manager := fs.Manager{ Cgroups: &configs.Cgroup{ Parent: "/", - Name: cm.KubeletContainerName, + Name: cm.KubeletCgroupsName, Resources: &configs.Resources{ AllowAllDevices: true, }, @@ -271,7 +271,7 @@ func (cm *containerManagerImpl) setupNode() error { if err != nil { glog.Error("failed to find cgroups of kubelet - %v", err) } else { - cm.KubeletContainerName = cont + cm.KubeletCgroupsName = cont } } @@ -328,7 +328,7 @@ func (cm *containerManagerImpl) Start() error { return nil } -func (cm *containerManagerImpl) SystemContainersLimit() api.ResourceList { +func (cm *containerManagerImpl) SystemCgroupsLimit() api.ResourceList { cpuLimit := int64(0) // Sum up resources of all external containers. @@ -435,7 +435,7 @@ func getContainer(pid int) (string, error) { // The reason of leaving kernel threads at root cgroup is that we don't want to tie the // execution of these threads with to-be defined /system quota and create priority inversions. // -func ensureSystemContainer(rootContainer *fs.Manager, manager *fs.Manager) error { +func ensureSystemCgroups(rootContainer *fs.Manager, manager *fs.Manager) error { // Move non-kernel PIDs to the system container. attemptsRemaining := 10 var errs []error diff --git a/pkg/kubelet/cm/container_manager_stub.go b/pkg/kubelet/cm/container_manager_stub.go index 9f757b830b..c79ae88508 100644 --- a/pkg/kubelet/cm/container_manager_stub.go +++ b/pkg/kubelet/cm/container_manager_stub.go @@ -30,7 +30,7 @@ func (cm *containerManagerStub) Start() error { return nil } -func (cm *containerManagerStub) SystemContainersLimit() api.ResourceList { +func (cm *containerManagerStub) SystemCgroupsLimit() api.ResourceList { return api.ResourceList{} } diff --git a/pkg/kubelet/cm/container_manager_unsupported.go b/pkg/kubelet/cm/container_manager_unsupported.go index 5043bc2d44..99114004d2 100644 --- a/pkg/kubelet/cm/container_manager_unsupported.go +++ b/pkg/kubelet/cm/container_manager_unsupported.go @@ -35,7 +35,7 @@ func (unsupportedContainerManager) Start() error { return fmt.Errorf("Container Manager is unsupported in this build") } -func (unsupportedContainerManager) SystemContainersLimit() api.ResourceList { +func (unsupportedContainerManager) SystemCgroupsLimit() api.ResourceList { return api.ResourceList{} } diff --git a/pkg/kubelet/server/stats/summary.go b/pkg/kubelet/server/stats/summary.go index d9edf74cee..c24cb768b7 100644 --- a/pkg/kubelet/server/stats/summary.go +++ b/pkg/kubelet/server/stats/summary.go @@ -119,9 +119,9 @@ func (sb *summaryBuilder) build() (*Summary, error) { } systemContainers := map[string]string{ - SystemContainerKubelet: sb.nodeConfig.KubeletContainerName, - SystemContainerRuntime: sb.nodeConfig.RuntimeContainerName, - SystemContainerMisc: sb.nodeConfig.SystemContainerName, + SystemContainerKubelet: sb.nodeConfig.KubeletCgroupsName, + SystemContainerRuntime: sb.nodeConfig.RuntimeCgroupsName, + SystemContainerMisc: sb.nodeConfig.SystemCgroupsName, } for sys, name := range systemContainers { if info, ok := sb.infos[name]; ok { diff --git a/pkg/kubelet/server/stats/summary_test.go b/pkg/kubelet/server/stats/summary_test.go index b5854586f5..984ae52d58 100644 --- a/pkg/kubelet/server/stats/summary_test.go +++ b/pkg/kubelet/server/stats/summary_test.go @@ -48,9 +48,9 @@ func TestBuildSummary(t *testing.T) { node := api.Node{} node.Name = "FooNode" nodeConfig := cm.NodeConfig{ - RuntimeContainerName: "/docker-daemon", - SystemContainerName: "/system", - KubeletContainerName: "/kubelet", + RuntimeCgroupsName: "/docker-daemon", + SystemCgroupsName: "/system", + KubeletCgroupsName: "/kubelet", } const ( namespace0 = "test0" From c3b5d5774c499c77fdf68a0709c0a2c2cdfe3df8 Mon Sep 17 00:00:00 2001 From: Vishnu kannan Date: Tue, 9 Feb 2016 17:03:04 -0800 Subject: [PATCH 4/4] Update flag values for cgroups managed by kubelet. Signed-off-by: Vishnu kannan --- cluster/gce/trusty/master.yaml | 6 +++--- cluster/gce/trusty/node.yaml | 6 +++--- cluster/saltbase/salt/kubelet/default | 6 +++--- docs/admin/kubelet.md | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cluster/gce/trusty/master.yaml b/cluster/gce/trusty/master.yaml index 0cfe0d30aa..46238e9bef 100644 --- a/cluster/gce/trusty/master.yaml +++ b/cluster/gce/trusty/master.yaml @@ -153,9 +153,9 @@ script --cluster-domain=${DNS_DOMAIN} \ --configure-cbr0=${ALLOCATE_NODE_CIDRS} \ --cgroup-root=/ \ - --system-container=/system \ - --runtime-container=/docker-daemon \ - --resource-container=/kubelet \ + --system-cgroups=/system \ + --runtime-cgroups=/docker-daemon \ + --kubelet-cgroups=/kubelet \ --nosystemd=true \ ${ARGS} end script diff --git a/cluster/gce/trusty/node.yaml b/cluster/gce/trusty/node.yaml index 2cc301b3cc..149ec561b1 100644 --- a/cluster/gce/trusty/node.yaml +++ b/cluster/gce/trusty/node.yaml @@ -138,9 +138,9 @@ script --cluster-domain=${DNS_DOMAIN} \ --configure-cbr0=true \ --cgroup-root=/ \ - --system-container=/system \ - --runtime-container=/docker-daemon \ - --resource-container=/kubelet \ + --system-cgroups=/system \ + --runtime-cgroups=/docker-daemon \ + --kubelet-cgroups=/kubelet \ --nosystemd=true \ ${ARGS} end script diff --git a/cluster/saltbase/salt/kubelet/default b/cluster/saltbase/salt/kubelet/default index 50b8802b93..e92a31a0f9 100644 --- a/cluster/saltbase/salt/kubelet/default +++ b/cluster/saltbase/salt/kubelet/default @@ -112,9 +112,9 @@ {% set cgroup_root = "--cgroup-root=docker" -%} {% else %} {% set cgroup_root = "--cgroup-root=/" -%} - {% set system_container = "--system-container=/system" -%} - {% set runtime_container = "--runtime-container=/docker-daemon" -%} - {% set kubelet_container= "--resource-container=/kubelet" -%} + {% set system_container = "--system-cgroups=/system" -%} + {% set runtime_container = "--runtime-cgroups=/docker-daemon" -%} + {% set kubelet_container= "--kubelet-cgroups=/kubelet" -%} {% endif %} {% endif -%} {% if grains['oscodename'] == 'vivid' -%} diff --git a/docs/admin/kubelet.md b/docs/admin/kubelet.md index 5dedc2dadc..9d46c25a72 100644 --- a/docs/admin/kubelet.md +++ b/docs/admin/kubelet.md @@ -104,6 +104,7 @@ kubelet --kube-api-qps=5: QPS to use while talking with kubernetes apiserver --kube-reserved=: A set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G) pairs that describe resources reserved for kubernetes system components. Currently only cpu and memory are supported. See http://releases.k8s.io/HEAD/docs/user-guide/compute-resources.html for more detail. [default=none] --kubeconfig="/var/lib/kubelet/kubeconfig": Path to a kubeconfig file, specifying how to authenticate to API server (the master location is set by the api-servers flag). + --kubelet-cgroups="": Optional absolute name of cgroups to create and run the Kubelet in. --lock-file="/var/run/lock/kubelet.lock": The path to file for kubelet to use as a lock file. --log-flush-frequency=5s: Maximum number of seconds between log flushes --low-diskspace-threshold-mb=256: The absolute free disk space, in MB, to maintain. When disk space falls below this threshold, new pods would be rejected. Default: 256 @@ -134,16 +135,15 @@ kubelet --registry-burst=10: Maximum size of a bursty pulls, temporarily allows pulls to burst to this number, while still not exceeding registry-qps. Only used if --registry-qps > 0 --registry-qps=5: If > 0, limit registry pull QPS to this value. If 0, unlimited. [default=5.0] --resolv-conf="/etc/resolv.conf": Resolver configuration file used as the basis for the container DNS resolution configuration. - --resource-container="": Optional absolute name of the resource-only container to create and run the Kubelet in. --rkt-path="": Path of rkt binary. Leave empty to use the first rkt in $PATH. Only used if --container-runtime='rkt' --rkt-stage1-image="": image to use as stage1. Local paths and http/https URLs are supported. If empty, the 'stage1.aci' in the same directory as '--rkt-path' will be used --root-dir="/var/lib/kubelet": Directory path for managing kubelet files (volume mounts,etc). --runonce[=false]: If true, exit after spawning pods from local manifests or remote urls. Exclusive with --api-servers, and --enable-server - --runtime-container="": Optional absolute name of the cgroups to create and run the runtime in. + --runtime-cgroups="": Optional absolute name of cgroups to create and run the runtime in. --serialize-image-pulls[=true]: Pull images one at a time. We recommend *not* changing the default value on nodes that run docker daemon with version < 1.9 or an Aufs storage backend. Issue #10959 has more details. [default=true] --streaming-connection-idle-timeout=4h0m0s: Maximum time a streaming connection can be idle before the connection is automatically closed. 0 indicates no timeout. Example: '5m' --sync-frequency=1m0s: Max period between synchronizing running containers and config - --system-container="": Optional resource-only container in which to place all non-kernel processes that are not already in a container. Empty for no container. Rolling back the flag requires a reboot. (Default: ""). + --system-cgroups="": Optional absolute name of cgroups in which to place all non-kernel processes that are not already inside a cgroup under `/`. Empty for no container. Rolling back the flag requires a reboot. (Default: ""). --system-reserved=: A set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G) pairs that describe resources reserved for non-kubernetes components. Currently only cpu and memory are supported. See http://releases.k8s.io/HEAD/docs/user-guide/compute-resources.html for more detail. [default=none] --tls-cert-file="": File containing x509 Certificate for HTTPS. (CA cert, if any, concatenated after server cert). If --tls-cert-file and --tls-private-key-file are not provided, a self-signed certificate and key are generated for the public address and saved to the directory passed to --cert-dir. --tls-private-key-file="": File containing x509 private key matching --tls-cert-file.