From e52718bbc696e6b5ae8538be8b774771a150c6e4 Mon Sep 17 00:00:00 2001 From: Michael Taufen Date: Tue, 28 Jun 2016 07:46:17 -0700 Subject: [PATCH] Clean up API Move SystemReserved and KubeReserved into KubeletConfiguration struct Convert int64 to int32 for some external type fields so they match internal ones tLS* to tls* for JSON field names Fix dependency on removed options.AutoDetectCloudProvider Change floats in KubeletConfiguration API to ints --- cmd/kubelet/app/options/options.go | 16 +- cmd/kubelet/app/server.go | 11 +- contrib/mesos/pkg/executor/service/service.go | 2 +- pkg/apis/componentconfig/types.generated.go | 1562 ++++++++++------- pkg/apis/componentconfig/types.go | 37 +- pkg/apis/componentconfig/v1alpha1/defaults.go | 25 +- pkg/apis/componentconfig/v1alpha1/types.go | 36 +- 7 files changed, 972 insertions(+), 717 deletions(-) diff --git a/cmd/kubelet/app/options/options.go b/cmd/kubelet/app/options/options.go index e4566dabc38..282ec81b48b 100644 --- a/cmd/kubelet/app/options/options.go +++ b/cmd/kubelet/app/options/options.go @@ -44,8 +44,6 @@ type KubeletServer struct { ChaosChance float64 // Crash immediately, rather than eating panics. ReallyCrashForTesting bool - SystemReserved utilconfig.ConfigurationMap - KubeReserved utilconfig.ConfigurationMap } // NewKubeletServer will create a new KubeletServer with default values. @@ -55,8 +53,6 @@ func NewKubeletServer() *KubeletServer { return &KubeletServer{ AuthPath: util.NewStringFlag("/var/lib/kubelet/kubernetes_auth"), // deprecated KubeConfig: util.NewStringFlag("/var/lib/kubelet/kubeconfig"), - SystemReserved: make(utilconfig.ConfigurationMap), - KubeReserved: make(utilconfig.ConfigurationMap), KubeletConfiguration: config, } } @@ -71,8 +67,8 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) { fs.StringVar(&s.ManifestURLHeader, "manifest-url-header", s.ManifestURLHeader, "HTTP header to use when accessing the manifest URL, with the key separated from the value with a ':', as in 'key:value'") fs.BoolVar(&s.EnableServer, "enable-server", s.EnableServer, "Enable the Kubelet's server") fs.Var(componentconfig.IPVar{Val: &s.Address}, "address", "The IP address for the Kubelet to serve on (set to 0.0.0.0 for all interfaces)") - fs.IntVar(&s.Port, "port", s.Port, "The port for the Kubelet to serve on.") - fs.IntVar(&s.ReadOnlyPort, "read-only-port", s.ReadOnlyPort, "The read-only port for the Kubelet to serve on with no authentication/authorization (set to 0 to disable)") + fs.Int32Var(&s.Port, "port", s.Port, "The port for the Kubelet to serve on.") + fs.Int32Var(&s.ReadOnlyPort, "read-only-port", s.ReadOnlyPort, "The read-only port for the Kubelet to serve on with no authentication/authorization (set to 0 to disable)") fs.StringVar(&s.TLSCertFile, "tls-cert-file", s.TLSCertFile, ""+ "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 "+ @@ -89,9 +85,9 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) { fs.StringSliceVar(&s.HostNetworkSources, "host-network-sources", s.HostNetworkSources, "Comma-separated list of sources from which the Kubelet allows pods to use of host network. [default=\"*\"]") fs.StringSliceVar(&s.HostPIDSources, "host-pid-sources", s.HostPIDSources, "Comma-separated list of sources from which the Kubelet allows pods to use the host pid namespace. [default=\"*\"]") fs.StringSliceVar(&s.HostIPCSources, "host-ipc-sources", s.HostIPCSources, "Comma-separated list of sources from which the Kubelet allows pods to use the host ipc namespace. [default=\"*\"]") - fs.Float64Var(&s.RegistryPullQPS, "registry-qps", s.RegistryPullQPS, "If > 0, limit registry pull QPS to this value. If 0, unlimited. [default=5.0]") + fs.Int32Var(&s.RegistryPullQPS, "registry-qps", s.RegistryPullQPS, "If > 0, limit registry pull QPS to this value. If 0, unlimited. [default=5.0]") fs.Int32Var(&s.RegistryBurst, "registry-burst", s.RegistryBurst, "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") - fs.Float32Var(&s.EventRecordQPS, "event-qps", s.EventRecordQPS, "If > 0, limit event creations per second to this value. If 0, unlimited.") + fs.Int32Var(&s.EventRecordQPS, "event-qps", s.EventRecordQPS, "If > 0, limit event creations per second to this value. If 0, unlimited.") fs.Int32Var(&s.EventBurst, "event-burst", s.EventBurst, "Maximum size of a bursty event records, temporarily allows event records to burst to this number, while still not exceeding event-qps. Only used if --event-qps > 0") fs.BoolVar(&s.RunOnce, "runonce", s.RunOnce, "If true, exit after spawning pods from local manifests or remote urls. Exclusive with --api-servers, and --enable-server") fs.BoolVar(&s.EnableDebuggingHandlers, "enable-debugging-handlers", s.EnableDebuggingHandlers, "Enables server endpoints for log collection and local running of containers and commands") @@ -104,7 +100,7 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) { fs.Var(&s.AuthPath, "auth-path", "Path to .kubernetes_auth file, specifying how to authenticate to API server.") fs.MarkDeprecated("auth-path", "will be removed in a future version") fs.Var(&s.KubeConfig, "kubeconfig", "Path to a kubeconfig file, specifying how to authenticate to API server (the master location is set by the api-servers flag).") - fs.IntVar(&s.CAdvisorPort, "cadvisor-port", s.CAdvisorPort, "The port of the localhost cAdvisor endpoint") + fs.Int32Var(&s.CAdvisorPort, "cadvisor-port", s.CAdvisorPort, "The port of the localhost cAdvisor endpoint") fs.Int32Var(&s.HealthzPort, "healthz-port", s.HealthzPort, "The port of the localhost healthz endpoint") fs.Var(componentconfig.IPVar{Val: &s.HealthzBindAddress}, "healthz-bind-address", "The IP address for the healthz server to serve on, defaulting to 127.0.0.1 (set to 0.0.0.0 for all interfaces)") fs.Int32Var(&s.OOMScoreAdj, "oom-score-adj", s.OOMScoreAdj, "The oom-score-adj value for kubelet process. Values must be within the range [-1000, 1000]") @@ -169,7 +165,7 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) { fs.Var(&s.KubeReserved, "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.md for more detail. [default=none]") fs.BoolVar(&s.RegisterSchedulable, "register-schedulable", s.RegisterSchedulable, "Register the node as schedulable. No-op if register-node is false. [default=true]") fs.StringVar(&s.ContentType, "kube-api-content-type", s.ContentType, "Content type of requests sent to apiserver.") - fs.Float32Var(&s.KubeAPIQPS, "kube-api-qps", s.KubeAPIQPS, "QPS to use while talking with kubernetes apiserver") + fs.Int32Var(&s.KubeAPIQPS, "kube-api-qps", s.KubeAPIQPS, "QPS to use while talking with kubernetes apiserver") fs.Int32Var(&s.KubeAPIBurst, "kube-api-burst", s.KubeAPIBurst, "Burst to use while talking with kubernetes apiserver") fs.BoolVar(&s.SerializeImagePulls, "serialize-image-pulls", s.SerializeImagePulls, "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]") fs.BoolVar(&s.ExperimentalFlannelOverlay, "experimental-flannel-overlay", s.ExperimentalFlannelOverlay, "Experimental support for starting the kubelet with the default overlay network (flannel). Assumes flanneld is already running in client mode. [default=false]") diff --git a/cmd/kubelet/app/server.go b/cmd/kubelet/app/server.go index 41d22881792..fd09ef02acc 100644 --- a/cmd/kubelet/app/server.go +++ b/cmd/kubelet/app/server.go @@ -39,6 +39,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/apis/componentconfig" + kubeExternal "k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1" "k8s.io/kubernetes/pkg/capabilities" "k8s.io/kubernetes/pkg/client/chaosclient" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -221,7 +222,7 @@ func UnsecuredKubeletConfig(s *options.KubeletServer) (*KubeletConfig, error) { EnableDebuggingHandlers: s.EnableDebuggingHandlers, EnableServer: s.EnableServer, EventBurst: int(s.EventBurst), - EventRecordQPS: s.EventRecordQPS, + EventRecordQPS: float32(s.EventRecordQPS), FileCheckFrequency: s.FileCheckFrequency.Duration, HostnameOverride: s.HostnameOverride, HostNetworkSources: hostNetworkSources, @@ -255,7 +256,7 @@ func UnsecuredKubeletConfig(s *options.KubeletServer) (*KubeletConfig, error) { RegisterNode: s.RegisterNode, RegisterSchedulable: s.RegisterSchedulable, RegistryBurst: int(s.RegistryBurst), - RegistryPullQPS: s.RegistryPullQPS, + RegistryPullQPS: float64(s.RegistryPullQPS), ResolverConfig: s.ResolverConfig, Reservation: *reservation, KubeletCgroups: s.KubeletCgroups, @@ -331,7 +332,7 @@ func run(s *options.KubeletServer, kcfg *KubeletConfig) (err error) { // make a separate client for events eventClientConfig := *clientConfig - eventClientConfig.QPS = s.EventRecordQPS + eventClientConfig.QPS = float32(s.EventRecordQPS) eventClientConfig.Burst = int(s.EventBurst) kcfg.EventClient, err = clientset.NewForConfig(&eventClientConfig) } @@ -339,7 +340,7 @@ func run(s *options.KubeletServer, kcfg *KubeletConfig) (err error) { glog.Warningf("No API client: %v", err) } - if s.CloudProvider == options.AutoDetectCloudProvider { + if s.CloudProvider == kubeExternal.AutoDetectCloudProvider { kcfg.AutoDetectCloudProvider = true } else { cloud, err := cloudprovider.InitCloudProvider(s.CloudProvider, s.CloudConfigFile) @@ -506,7 +507,7 @@ func CreateAPIServerClientConfig(s *options.KubeletServer) (*restclient.Config, clientConfig.ContentType = s.ContentType // Override kubeconfig qps/burst settings from flags - clientConfig.QPS = s.KubeAPIQPS + clientConfig.QPS = float32(s.KubeAPIQPS) clientConfig.Burst = int(s.KubeAPIBurst) addChaosToClientConfig(s, clientConfig) diff --git a/contrib/mesos/pkg/executor/service/service.go b/contrib/mesos/pkg/executor/service/service.go index c22d53c04f4..39fc4749a49 100644 --- a/contrib/mesos/pkg/executor/service/service.go +++ b/contrib/mesos/pkg/executor/service/service.go @@ -190,7 +190,7 @@ func (s *KubeletExecutorServer) runKubelet( } // make a separate client for events - eventClientConfig.QPS = s.EventRecordQPS + eventClientConfig.QPS = float32(s.EventRecordQPS) eventClientConfig.Burst = int(s.EventBurst) kcfg.EventClient, err = clientset.NewForConfig(eventClientConfig) if err != nil { diff --git a/pkg/apis/componentconfig/types.generated.go b/pkg/apis/componentconfig/types.generated.go index 669565c2450..512b4a8a634 100644 --- a/pkg/apis/componentconfig/types.generated.go +++ b/pkg/apis/componentconfig/types.generated.go @@ -26,6 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_unversioned "k8s.io/kubernetes/pkg/api/unversioned" + pkg2_config "k8s.io/kubernetes/pkg/util/config" "reflect" "runtime" time "time" @@ -62,8 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_unversioned.TypeMeta - var v1 time.Duration - _, _ = v0, v1 + var v1 pkg2_config.ConfigurationMap + var v2 time.Duration + _, _, _ = v0, v1, v2 } } @@ -1175,7 +1177,7 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [93]bool + var yyq2 [95]bool _, _, _ = yysep2, yyq2, yy2arr2 const yyr2 bool = false yyq2[48] = x.CloudProvider != "" @@ -1195,13 +1197,13 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { yyq2[86] = x.EvictionSoftGracePeriod != "" yyq2[87] = true yyq2[88] = x.EvictionMaxPodGracePeriod != 0 - yyq2[91] = x.Kind != "" - yyq2[92] = x.APIVersion != "" + yyq2[93] = x.Kind != "" + yyq2[94] = x.APIVersion != "" var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(93) + r.EncodeArrayStart(95) } else { - yynn2 = 74 + yynn2 = 76 for _, b := range yyq2 { if b { yynn2++ @@ -1434,7 +1436,7 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("tLSCertFile")) + r.EncodeString(codecSelferC_UTF81234, string("tlsCertFile")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yym41 := z.EncBinary() _ = yym41 @@ -1453,7 +1455,7 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("tLSPrivateKeyFile")) + r.EncodeString(codecSelferC_UTF81234, string("tlsPrivateKeyFile")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yym44 := z.EncBinary() _ = yym44 @@ -1682,7 +1684,7 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym76 if false { } else { - r.EncodeFloat64(float64(x.RegistryPullQPS)) + r.EncodeInt(int64(x.RegistryPullQPS)) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) @@ -1692,7 +1694,7 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym77 if false { } else { - r.EncodeFloat64(float64(x.RegistryPullQPS)) + r.EncodeInt(int64(x.RegistryPullQPS)) } } if yyr2 || yy2arr2 { @@ -1720,7 +1722,7 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym82 if false { } else { - r.EncodeFloat32(float32(x.EventRecordQPS)) + r.EncodeInt(int64(x.EventRecordQPS)) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) @@ -1730,7 +1732,7 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym83 if false { } else { - r.EncodeFloat32(float32(x.EventRecordQPS)) + r.EncodeInt(int64(x.EventRecordQPS)) } } if yyr2 || yy2arr2 { @@ -2797,7 +2799,7 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym247 if false { } else { - r.EncodeFloat32(float32(x.KubeAPIQPS)) + r.EncodeInt(int64(x.KubeAPIQPS)) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) @@ -2807,7 +2809,7 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym248 if false { } else { - r.EncodeFloat32(float32(x.KubeAPIQPS)) + r.EncodeInt(int64(x.KubeAPIQPS)) } } if yyr2 || yy2arr2 { @@ -3163,10 +3165,68 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[91] { + if x.SystemReserved == nil { + r.EncodeNil() + } else { yym299 := z.EncBinary() _ = yym299 if false { + } else if z.HasExtensions() && z.EncExt(x.SystemReserved) { + } else { + h.encconfig_ConfigurationMap((pkg2_config.ConfigurationMap)(x.SystemReserved), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("systemReserved")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.SystemReserved == nil { + r.EncodeNil() + } else { + yym300 := z.EncBinary() + _ = yym300 + if false { + } else if z.HasExtensions() && z.EncExt(x.SystemReserved) { + } else { + h.encconfig_ConfigurationMap((pkg2_config.ConfigurationMap)(x.SystemReserved), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.KubeReserved == nil { + r.EncodeNil() + } else { + yym302 := z.EncBinary() + _ = yym302 + if false { + } else if z.HasExtensions() && z.EncExt(x.KubeReserved) { + } else { + h.encconfig_ConfigurationMap((pkg2_config.ConfigurationMap)(x.KubeReserved), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kubeReserved")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.KubeReserved == nil { + r.EncodeNil() + } else { + yym303 := z.EncBinary() + _ = yym303 + if false { + } else if z.HasExtensions() && z.EncExt(x.KubeReserved) { + } else { + h.encconfig_ConfigurationMap((pkg2_config.ConfigurationMap)(x.KubeReserved), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[93] { + yym305 := z.EncBinary() + _ = yym305 + if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } @@ -3174,12 +3234,12 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2[91] { + if yyq2[93] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym300 := z.EncBinary() - _ = yym300 + yym306 := z.EncBinary() + _ = yym306 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -3188,9 +3248,9 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[92] { - yym302 := z.EncBinary() - _ = yym302 + if yyq2[94] { + yym308 := z.EncBinary() + _ = yym308 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -3199,12 +3259,12 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2[92] { + if yyq2[94] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym303 := z.EncBinary() - _ = yym303 + yym309 := z.EncBinary() + _ = yym309 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -3351,21 +3411,21 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Port = 0 } else { - x.Port = int(r.DecodeInt(codecSelferBitsize1234)) + x.Port = int32(r.DecodeInt(32)) } case "readOnlyPort": if r.TryDecodeAsNil() { x.ReadOnlyPort = 0 } else { - x.ReadOnlyPort = int(r.DecodeInt(codecSelferBitsize1234)) + x.ReadOnlyPort = int32(r.DecodeInt(32)) } - case "tLSCertFile": + case "tlsCertFile": if r.TryDecodeAsNil() { x.TLSCertFile = "" } else { x.TLSCertFile = string(r.DecodeString()) } - case "tLSPrivateKeyFile": + case "tlsPrivateKeyFile": if r.TryDecodeAsNil() { x.TLSPrivateKeyFile = "" } else { @@ -3453,7 +3513,7 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.RegistryPullQPS = 0 } else { - x.RegistryPullQPS = float64(r.DecodeFloat(false)) + x.RegistryPullQPS = int32(r.DecodeInt(32)) } case "registryBurst": if r.TryDecodeAsNil() { @@ -3465,7 +3525,7 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.EventRecordQPS = 0 } else { - x.EventRecordQPS = float32(r.DecodeFloat(true)) + x.EventRecordQPS = int32(r.DecodeInt(32)) } case "eventBurst": if r.TryDecodeAsNil() { @@ -3510,7 +3570,7 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.CAdvisorPort = 0 } else { - x.CAdvisorPort = int(r.DecodeInt(codecSelferBitsize1234)) + x.CAdvisorPort = int32(r.DecodeInt(32)) } case "healthzPort": if r.TryDecodeAsNil() { @@ -3825,7 +3885,7 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.KubeAPIQPS = 0 } else { - x.KubeAPIQPS = float32(r.DecodeFloat(true)) + x.KubeAPIQPS = int32(r.DecodeInt(32)) } case "kubeAPIBurst": if r.TryDecodeAsNil() { @@ -3941,6 +4001,32 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode } else { x.EnableControllerAttachDetach = bool(r.DecodeBool()) } + case "systemReserved": + if r.TryDecodeAsNil() { + x.SystemReserved = nil + } else { + yyv110 := &x.SystemReserved + yym111 := z.DecBinary() + _ = yym111 + if false { + } else if z.HasExtensions() && z.DecExt(yyv110) { + } else { + h.decconfig_ConfigurationMap((*pkg2_config.ConfigurationMap)(yyv110), d) + } + } + case "kubeReserved": + if r.TryDecodeAsNil() { + x.KubeReserved = nil + } else { + yyv112 := &x.KubeReserved + yym113 := z.DecBinary() + _ = yym113 + if false { + } else if z.HasExtensions() && z.DecExt(yyv112) { + } else { + h.decconfig_ConfigurationMap((*pkg2_config.ConfigurationMap)(yyv112), d) + } + } case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -3964,16 +4050,16 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj112 int - var yyb112 bool - var yyhl112 bool = l >= 0 - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + var yyj116 int + var yyb116 bool + var yyhl116 bool = l >= 0 + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3983,13 +4069,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.Config = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3997,57 +4083,7 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.SyncFrequency = pkg1_unversioned.Duration{} } else { - yyv114 := &x.SyncFrequency - yym115 := z.DecBinary() - _ = yym115 - if false { - } else if z.HasExtensions() && z.DecExt(yyv114) { - } else if !yym115 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv114) - } else { - z.DecFallback(yyv114, false) - } - } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l - } else { - yyb112 = r.CheckBreak() - } - if yyb112 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.FileCheckFrequency = pkg1_unversioned.Duration{} - } else { - yyv116 := &x.FileCheckFrequency - yym117 := z.DecBinary() - _ = yym117 - if false { - } else if z.HasExtensions() && z.DecExt(yyv116) { - } else if !yym117 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv116) - } else { - z.DecFallback(yyv116, false) - } - } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l - } else { - yyb112 = r.CheckBreak() - } - if yyb112 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HTTPCheckFrequency = pkg1_unversioned.Duration{} - } else { - yyv118 := &x.HTTPCheckFrequency + yyv118 := &x.SyncFrequency yym119 := z.DecBinary() _ = yym119 if false { @@ -4058,13 +4094,63 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco z.DecFallback(yyv118, false) } } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.FileCheckFrequency = pkg1_unversioned.Duration{} + } else { + yyv120 := &x.FileCheckFrequency + yym121 := z.DecBinary() + _ = yym121 + if false { + } else if z.HasExtensions() && z.DecExt(yyv120) { + } else if !yym121 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv120) + } else { + z.DecFallback(yyv120, false) + } + } + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l + } else { + yyb116 = r.CheckBreak() + } + if yyb116 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HTTPCheckFrequency = pkg1_unversioned.Duration{} + } else { + yyv122 := &x.HTTPCheckFrequency + yym123 := z.DecBinary() + _ = yym123 + if false { + } else if z.HasExtensions() && z.DecExt(yyv122) { + } else if !yym123 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv122) + } else { + z.DecFallback(yyv122, false) + } + } + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l + } else { + yyb116 = r.CheckBreak() + } + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4074,13 +4160,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ManifestURL = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4090,13 +4176,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ManifestURLHeader = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4106,13 +4192,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EnableServer = bool(r.DecodeBool()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4122,13 +4208,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.Address = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4136,15 +4222,15 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.Port = 0 } else { - x.Port = int(r.DecodeInt(codecSelferBitsize1234)) + x.Port = int32(r.DecodeInt(32)) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4152,15 +4238,15 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.ReadOnlyPort = 0 } else { - x.ReadOnlyPort = int(r.DecodeInt(codecSelferBitsize1234)) + x.ReadOnlyPort = int32(r.DecodeInt(32)) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4170,13 +4256,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.TLSCertFile = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4186,13 +4272,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.TLSPrivateKeyFile = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4202,13 +4288,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CertDirectory = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4218,13 +4304,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.HostnameOverride = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4234,13 +4320,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.PodInfraContainerImage = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4250,13 +4336,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.DockerEndpoint = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4266,13 +4352,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RootDirectory = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4282,13 +4368,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.SeccompProfileRoot = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4298,13 +4384,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.AllowPrivileged = bool(r.DecodeBool()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4312,51 +4398,7 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.HostNetworkSources = nil } else { - yyv135 := &x.HostNetworkSources - yym136 := z.DecBinary() - _ = yym136 - if false { - } else { - z.F.DecSliceStringX(yyv135, false, d) - } - } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l - } else { - yyb112 = r.CheckBreak() - } - if yyb112 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HostPIDSources = nil - } else { - yyv137 := &x.HostPIDSources - yym138 := z.DecBinary() - _ = yym138 - if false { - } else { - z.F.DecSliceStringX(yyv137, false, d) - } - } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l - } else { - yyb112 = r.CheckBreak() - } - if yyb112 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HostIPCSources = nil - } else { - yyv139 := &x.HostIPCSources + yyv139 := &x.HostNetworkSources yym140 := z.DecBinary() _ = yym140 if false { @@ -4364,13 +4406,57 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco z.F.DecSliceStringX(yyv139, false, d) } } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HostPIDSources = nil + } else { + yyv141 := &x.HostPIDSources + yym142 := z.DecBinary() + _ = yym142 + if false { + } else { + z.F.DecSliceStringX(yyv141, false, d) + } + } + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l + } else { + yyb116 = r.CheckBreak() + } + if yyb116 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HostIPCSources = nil + } else { + yyv143 := &x.HostIPCSources + yym144 := z.DecBinary() + _ = yym144 + if false { + } else { + z.F.DecSliceStringX(yyv143, false, d) + } + } + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l + } else { + yyb116 = r.CheckBreak() + } + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4378,15 +4464,15 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.RegistryPullQPS = 0 } else { - x.RegistryPullQPS = float64(r.DecodeFloat(false)) + x.RegistryPullQPS = int32(r.DecodeInt(32)) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4396,13 +4482,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RegistryBurst = int32(r.DecodeInt(32)) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4410,15 +4496,15 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.EventRecordQPS = 0 } else { - x.EventRecordQPS = float32(r.DecodeFloat(true)) + x.EventRecordQPS = int32(r.DecodeInt(32)) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4428,13 +4514,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EventBurst = int32(r.DecodeInt(32)) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4444,13 +4530,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EnableDebuggingHandlers = bool(r.DecodeBool()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4458,24 +4544,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.MinimumGCAge = pkg1_unversioned.Duration{} } else { - yyv146 := &x.MinimumGCAge - yym147 := z.DecBinary() - _ = yym147 + yyv150 := &x.MinimumGCAge + yym151 := z.DecBinary() + _ = yym151 if false { - } else if z.HasExtensions() && z.DecExt(yyv146) { - } else if !yym147 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv146) + } else if z.HasExtensions() && z.DecExt(yyv150) { + } else if !yym151 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv150) } else { - z.DecFallback(yyv146, false) + z.DecFallback(yyv150, false) } } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4485,13 +4571,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.MaxPerPodContainerCount = int32(r.DecodeInt(32)) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4501,13 +4587,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.MaxContainerCount = int32(r.DecodeInt(32)) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4515,15 +4601,15 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.CAdvisorPort = 0 } else { - x.CAdvisorPort = int(r.DecodeInt(codecSelferBitsize1234)) + x.CAdvisorPort = int32(r.DecodeInt(32)) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4533,13 +4619,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.HealthzPort = int32(r.DecodeInt(32)) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4549,13 +4635,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.HealthzBindAddress = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4565,13 +4651,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.OOMScoreAdj = int32(r.DecodeInt(32)) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4581,13 +4667,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RegisterNode = bool(r.DecodeBool()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4597,13 +4683,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ClusterDomain = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4613,13 +4699,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.MasterServiceNamespace = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4629,13 +4715,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ClusterDNS = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4643,57 +4729,7 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.StreamingConnectionIdleTimeout = pkg1_unversioned.Duration{} } else { - yyv158 := &x.StreamingConnectionIdleTimeout - yym159 := z.DecBinary() - _ = yym159 - if false { - } else if z.HasExtensions() && z.DecExt(yyv158) { - } else if !yym159 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv158) - } else { - z.DecFallback(yyv158, false) - } - } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l - } else { - yyb112 = r.CheckBreak() - } - if yyb112 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.NodeStatusUpdateFrequency = pkg1_unversioned.Duration{} - } else { - yyv160 := &x.NodeStatusUpdateFrequency - yym161 := z.DecBinary() - _ = yym161 - if false { - } else if z.HasExtensions() && z.DecExt(yyv160) { - } else if !yym161 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv160) - } else { - z.DecFallback(yyv160, false) - } - } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l - } else { - yyb112 = r.CheckBreak() - } - if yyb112 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ImageMinimumGCAge = pkg1_unversioned.Duration{} - } else { - yyv162 := &x.ImageMinimumGCAge + yyv162 := &x.StreamingConnectionIdleTimeout yym163 := z.DecBinary() _ = yym163 if false { @@ -4704,13 +4740,63 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco z.DecFallback(yyv162, false) } } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.NodeStatusUpdateFrequency = pkg1_unversioned.Duration{} + } else { + yyv164 := &x.NodeStatusUpdateFrequency + yym165 := z.DecBinary() + _ = yym165 + if false { + } else if z.HasExtensions() && z.DecExt(yyv164) { + } else if !yym165 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv164) + } else { + z.DecFallback(yyv164, false) + } + } + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l + } else { + yyb116 = r.CheckBreak() + } + if yyb116 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ImageMinimumGCAge = pkg1_unversioned.Duration{} + } else { + yyv166 := &x.ImageMinimumGCAge + yym167 := z.DecBinary() + _ = yym167 + if false { + } else if z.HasExtensions() && z.DecExt(yyv166) { + } else if !yym167 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv166) + } else { + z.DecFallback(yyv166, false) + } + } + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l + } else { + yyb116 = r.CheckBreak() + } + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4720,13 +4806,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ImageGCHighThresholdPercent = int32(r.DecodeInt(32)) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4736,13 +4822,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ImageGCLowThresholdPercent = int32(r.DecodeInt(32)) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4752,13 +4838,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.LowDiskSpaceThresholdMB = int32(r.DecodeInt(32)) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4766,24 +4852,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.VolumeStatsAggPeriod = pkg1_unversioned.Duration{} } else { - yyv167 := &x.VolumeStatsAggPeriod - yym168 := z.DecBinary() - _ = yym168 + yyv171 := &x.VolumeStatsAggPeriod + yym172 := z.DecBinary() + _ = yym172 if false { - } else if z.HasExtensions() && z.DecExt(yyv167) { - } else if !yym168 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv167) + } else if z.HasExtensions() && z.DecExt(yyv171) { + } else if !yym172 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv171) } else { - z.DecFallback(yyv167, false) + z.DecFallback(yyv171, false) } } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4793,13 +4879,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.NetworkPluginName = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4809,13 +4895,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.NetworkPluginDir = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4825,13 +4911,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.VolumePluginDir = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4841,13 +4927,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CloudProvider = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4857,13 +4943,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CloudConfigFile = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4873,13 +4959,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.KubeletCgroups = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4889,13 +4975,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RuntimeCgroups = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4905,13 +4991,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.SystemCgroups = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4921,13 +5007,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CgroupRoot = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4937,13 +5023,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ContainerRuntime = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4951,24 +5037,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.RuntimeRequestTimeout = pkg1_unversioned.Duration{} } else { - yyv179 := &x.RuntimeRequestTimeout - yym180 := z.DecBinary() - _ = yym180 + yyv183 := &x.RuntimeRequestTimeout + yym184 := z.DecBinary() + _ = yym184 if false { - } else if z.HasExtensions() && z.DecExt(yyv179) { - } else if !yym180 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv179) + } else if z.HasExtensions() && z.DecExt(yyv183) { + } else if !yym184 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv183) } else { - z.DecFallback(yyv179, false) + z.DecFallback(yyv183, false) } } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4978,13 +5064,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RktPath = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4994,13 +5080,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RktAPIEndpoint = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5010,13 +5096,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RktStage1Image = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5026,13 +5112,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.LockFilePath = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5042,13 +5128,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ExitOnLockContention = bool(r.DecodeBool()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5058,13 +5144,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ConfigureCBR0 = bool(r.DecodeBool()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5074,13 +5160,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.HairpinMode = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5090,13 +5176,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.BabysitDaemons = bool(r.DecodeBool()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5106,13 +5192,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.MaxPods = int32(r.DecodeInt(32)) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5122,13 +5208,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.NvidiaGPUs = int32(r.DecodeInt(32)) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5138,13 +5224,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.DockerExecHandlerName = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5154,13 +5240,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.PodCIDR = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5170,13 +5256,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ResolverConfig = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5186,13 +5272,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CPUCFSQuota = bool(r.DecodeBool()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5202,13 +5288,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.Containerized = bool(r.DecodeBool()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5218,13 +5304,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.MaxOpenFiles = int64(r.DecodeInt(64)) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5234,13 +5320,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ReconcileCIDR = bool(r.DecodeBool()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5250,13 +5336,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RegisterSchedulable = bool(r.DecodeBool()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5266,13 +5352,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ContentType = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5280,15 +5366,15 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.KubeAPIQPS = 0 } else { - x.KubeAPIQPS = float32(r.DecodeFloat(true)) + x.KubeAPIQPS = int32(r.DecodeInt(32)) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5298,13 +5384,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.KubeAPIBurst = int32(r.DecodeInt(32)) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5314,13 +5400,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.SerializeImagePulls = bool(r.DecodeBool()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5330,13 +5416,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ExperimentalFlannelOverlay = bool(r.DecodeBool()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5344,24 +5430,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.OutOfDiskTransitionFrequency = pkg1_unversioned.Duration{} } else { - yyv204 := &x.OutOfDiskTransitionFrequency - yym205 := z.DecBinary() - _ = yym205 + yyv208 := &x.OutOfDiskTransitionFrequency + yym209 := z.DecBinary() + _ = yym209 if false { - } else if z.HasExtensions() && z.DecExt(yyv204) { - } else if !yym205 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv204) + } else if z.HasExtensions() && z.DecExt(yyv208) { + } else if !yym209 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv208) } else { - z.DecFallback(yyv204, false) + z.DecFallback(yyv208, false) } } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5371,13 +5457,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.NodeIP = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5385,21 +5471,21 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.NodeLabels = nil } else { - yyv207 := &x.NodeLabels - yym208 := z.DecBinary() - _ = yym208 + yyv211 := &x.NodeLabels + yym212 := z.DecBinary() + _ = yym212 if false { } else { - z.F.DecMapStringStringX(yyv207, false, d) + z.F.DecMapStringStringX(yyv211, false, d) } } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5409,13 +5495,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.NonMasqueradeCIDR = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5425,13 +5511,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EnableCustomMetrics = bool(r.DecodeBool()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5441,13 +5527,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EvictionHard = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5457,13 +5543,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EvictionSoft = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5473,13 +5559,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EvictionSoftGracePeriod = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5487,24 +5573,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.EvictionPressureTransitionPeriod = pkg1_unversioned.Duration{} } else { - yyv214 := &x.EvictionPressureTransitionPeriod - yym215 := z.DecBinary() - _ = yym215 + yyv218 := &x.EvictionPressureTransitionPeriod + yym219 := z.DecBinary() + _ = yym219 if false { - } else if z.HasExtensions() && z.DecExt(yyv214) { - } else if !yym215 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv214) + } else if z.HasExtensions() && z.DecExt(yyv218) { + } else if !yym219 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv218) } else { - z.DecFallback(yyv214, false) + z.DecFallback(yyv218, false) } } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5514,13 +5600,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EvictionMaxPodGracePeriod = int32(r.DecodeInt(32)) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5530,13 +5616,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.PodsPerCore = int32(r.DecodeInt(32)) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5546,13 +5632,59 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EnableControllerAttachDetach = bool(r.DecodeBool()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.SystemReserved = nil + } else { + yyv223 := &x.SystemReserved + yym224 := z.DecBinary() + _ = yym224 + if false { + } else if z.HasExtensions() && z.DecExt(yyv223) { + } else { + h.decconfig_ConfigurationMap((*pkg2_config.ConfigurationMap)(yyv223), d) + } + } + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l + } else { + yyb116 = r.CheckBreak() + } + if yyb116 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.KubeReserved = nil + } else { + yyv225 := &x.KubeReserved + yym226 := z.DecBinary() + _ = yym226 + if false { + } else if z.HasExtensions() && z.DecExt(yyv225) { + } else { + h.decconfig_ConfigurationMap((*pkg2_config.ConfigurationMap)(yyv225), d) + } + } + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l + } else { + yyb116 = r.CheckBreak() + } + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5562,13 +5694,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.Kind = string(r.DecodeString()) } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5579,17 +5711,17 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco x.APIVersion = string(r.DecodeString()) } for { - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l } else { - yyb112 = r.CheckBreak() + yyb116 = r.CheckBreak() } - if yyb112 { + if yyb116 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj112-1, "") + z.DecStructFieldNotFound(yyj116-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -9898,3 +10030,95 @@ func (x *PersistentVolumeRecyclerConfiguration) codecDecodeSelfFromArray(l int, } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } + +func (x codecSelfer1234) encconfig_ConfigurationMap(v pkg2_config.ConfigurationMap, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeMapStart(len(v)) + for yyk1, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + yym2 := z.EncBinary() + _ = yym2 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(yyk1)) + } + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3 := z.EncBinary() + _ = yym3 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(yyv1)) + } + } + z.EncSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x codecSelfer1234) decconfig_ConfigurationMap(v *pkg2_config.ConfigurationMap, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyl1 := r.ReadMapStart() + yybh1 := z.DecBasicHandle() + if yyv1 == nil { + yyrl1, _ := z.DecInferLen(yyl1, yybh1.MaxInitLen, 32) + yyv1 = make(map[string]string, yyrl1) + *v = yyv1 + } + var yymk1 string + var yymv1 string + var yymg1 bool + if yybh1.MapValueReset { + } + if yyl1 > 0 { + for yyj1 := 0; yyj1 < yyl1; yyj1++ { + z.DecSendContainerState(codecSelfer_containerMapKey1234) + if r.TryDecodeAsNil() { + yymk1 = "" + } else { + yymk1 = string(r.DecodeString()) + } + + if yymg1 { + yymv1 = yyv1[yymk1] + } + z.DecSendContainerState(codecSelfer_containerMapValue1234) + if r.TryDecodeAsNil() { + yymv1 = "" + } else { + yymv1 = string(r.DecodeString()) + } + + if yyv1 != nil { + yyv1[yymk1] = yymv1 + } + } + } else if yyl1 < 0 { + for yyj1 := 0; !r.CheckBreak(); yyj1++ { + z.DecSendContainerState(codecSelfer_containerMapKey1234) + if r.TryDecodeAsNil() { + yymk1 = "" + } else { + yymk1 = string(r.DecodeString()) + } + + if yymg1 { + yymv1 = yyv1[yymk1] + } + z.DecSendContainerState(codecSelfer_containerMapValue1234) + if r.TryDecodeAsNil() { + yymv1 = "" + } else { + yymv1 = string(r.DecodeString()) + } + + if yyv1 != nil { + yyv1[yymk1] = yymv1 + } + } + } // else len==0: TODO: Should we clear map entries? + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} diff --git a/pkg/apis/componentconfig/types.go b/pkg/apis/componentconfig/types.go index 14e569fa2c9..a6c73a14558 100644 --- a/pkg/apis/componentconfig/types.go +++ b/pkg/apis/componentconfig/types.go @@ -16,7 +16,10 @@ limitations under the License. package componentconfig -import "k8s.io/kubernetes/pkg/api/unversioned" +import ( + "k8s.io/kubernetes/pkg/api/unversioned" + utilconfig "k8s.io/kubernetes/pkg/util/config" +) type KubeProxyConfiguration struct { unversioned.TypeMeta @@ -125,19 +128,19 @@ type KubeletConfiguration struct { // for all interfaces) Address string `json:"address"` // port is the port for the Kubelet to serve on. - Port int `json:"port"` + Port int32 `json:"port"` // readOnlyPort is the read-only port for the Kubelet to serve on with // no authentication/authorization (set to 0 to disable) - ReadOnlyPort int `json:"readOnlyPort"` - // tLSCertFile is the file containing x509 Certificate for HTTPS. (CA cert, + ReadOnlyPort int32 `json:"readOnlyPort"` + // tlsCertFile is the file containing x509 Certificate for HTTPS. (CA cert, // if any, concatenated after server cert). If tlsCertFile and // tlsPrivateKeyFile are not provided, a self-signed certificate // and key are generated for the public address and saved to the directory // passed to certDir. - TLSCertFile string `json:"tLSCertFile"` - // tLSPrivateKeyFile is the ile containing x509 private key matching + TLSCertFile string `json:"tlsCertFile"` + // tlsPrivateKeyFile is the ile containing x509 private key matching // tlsCertFile. - TLSPrivateKeyFile string `json:"tLSPrivateKeyFile"` + TLSPrivateKeyFile string `json:"tlsPrivateKeyFile"` // certDirectory is the directory where the TLS certs are located (by // default /var/run/kubernetes). If tlsCertFile and tlsPrivateKeyFile // are provided, this flag will be ignored. @@ -170,14 +173,14 @@ type KubeletConfiguration struct { HostIPCSources []string `json:"hostIPCSources"` // registryPullQPS is the limit of registry pulls per second. If 0, // unlimited. Set to 0 for no limit. Defaults to 5.0. - RegistryPullQPS float64 `json:"registryPullQPS"` + RegistryPullQPS int32 `json:"registryPullQPS"` // registryBurst is the maximum size of a bursty pulls, temporarily allows // pulls to burst to this number, while still not exceeding registryQps. - // Only used if registryQps > 0. + // Only used if registryQPS > 0. RegistryBurst int32 `json:"registryBurst"` // eventRecordQPS is the maximum event creations per second. If 0, there // is no limit enforced. - EventRecordQPS float32 `json:"eventRecordQPS"` + EventRecordQPS int32 `json:"eventRecordQPS"` // eventBurst is the maximum size of a bursty event records, temporarily // allows event records to burst to this number, while still not exceeding // event-qps. Only used if eventQps > 0 @@ -195,7 +198,7 @@ type KubeletConfiguration struct { // to retain globally. Each container takes up some disk space. MaxContainerCount int32 `json:"maxContainerCount"` // cAdvisorPort is the port of the localhost cAdvisor endpoint - CAdvisorPort int `json:"cAdvisorPort"` + CAdvisorPort int32 `json:"cAdvisorPort"` // healthzPort is the port of the localhost healthz endpoint HealthzPort int32 `json:"healthzPort"` // healthzBindAddress is the IP address for the healthz server to serve @@ -331,7 +334,7 @@ type KubeletConfiguration struct { // contentType is contentType of requests sent to apiserver. ContentType string `json:"contentType"` // kubeAPIQPS is the QPS to use while talking with kubernetes apiserver - KubeAPIQPS float32 `json:"kubeAPIQPS"` + KubeAPIQPS int32 `json:"kubeAPIQPS"` // kubeAPIBurst is the burst to allow while talking with kubernetes // apiserver KubeAPIBurst int32 `json:"kubeAPIBurst"` @@ -372,6 +375,16 @@ type KubeletConfiguration struct { // manage attachment/detachment of volumes scheduled to this node, and // disables kubelet from executing any attach/detach operations EnableControllerAttachDetach bool `json:"enableControllerAttachDetach"` + // 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. [default=none] + // See http://releases.k8s.io/HEAD/docs/user-guide/compute-resources.md for more detail. + SystemReserved utilconfig.ConfigurationMap `json:"systemReserved"` + // 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. [default=none] + // See http://releases.k8s.io/HEAD/docs/user-guide/compute-resources.md for more detail. + KubeReserved utilconfig.ConfigurationMap `json:"kubeReserved"` } type KubeSchedulerConfiguration struct { diff --git a/pkg/apis/componentconfig/v1alpha1/defaults.go b/pkg/apis/componentconfig/v1alpha1/defaults.go index 3fe815d1aad..8e040919a8e 100644 --- a/pkg/apis/componentconfig/v1alpha1/defaults.go +++ b/pkg/apis/componentconfig/v1alpha1/defaults.go @@ -41,6 +41,8 @@ const ( // From pkg/kubelet/rkt/rkt.go to avoid circular import defaultRktAPIServiceEndpoint = "localhost:15441" + + AutoDetectCloudProvider = "auto-detect" ) var zeroDuration = unversioned.Duration{} @@ -138,7 +140,7 @@ func SetDefaults_KubeletConfiguration(obj *KubeletConfiguration) { obj.Address = "0.0.0.0" } if obj.CloudProvider == "" { - obj.CloudProvider = "auto-detect" + obj.CloudProvider = AutoDetectCloudProvider } if obj.CAdvisorPort == 0 { obj.CAdvisorPort = 4194 @@ -170,8 +172,9 @@ func SetDefaults_KubeletConfiguration(obj *KubeletConfiguration) { if obj.EventBurst == 0 { obj.EventBurst = 10 } - if obj.EventRecordQPS == 0 { - obj.EventRecordQPS = 5.0 + if obj.EventRecordQPS == nil { + temp := int32(5) + obj.EventRecordQPS = &temp } if obj.EnableControllerAttachDetach == nil { obj.EnableControllerAttachDetach = boolVar(true) @@ -271,7 +274,7 @@ func SetDefaults_KubeletConfiguration(obj *KubeletConfiguration) { obj.RegistryBurst = 10 } if obj.RegistryPullQPS == nil { - temp := float64(5) + temp := int32(5) obj.RegistryPullQPS = &temp } if obj.ResolverConfig == "" { @@ -301,8 +304,9 @@ func SetDefaults_KubeletConfiguration(obj *KubeletConfiguration) { if obj.ContentType == "" { obj.ContentType = "application/vnd.kubernetes.protobuf" } - if obj.KubeAPIQPS == 0 { - obj.KubeAPIQPS = 5 + if obj.KubeAPIQPS == nil { + temp := int32(5) + obj.KubeAPIQPS = &temp } if obj.KubeAPIBurst == 0 { obj.KubeAPIBurst = 10 @@ -314,11 +318,18 @@ func SetDefaults_KubeletConfiguration(obj *KubeletConfiguration) { obj.HairpinMode = PromiscuousBridge } if obj.EvictionHard == nil { - obj.EvictionHard = &"memory.available<100Mi" + temp := "memory.available<100Mi" + obj.EvictionHard = &temp } if obj.EvictionPressureTransitionPeriod == zeroDuration { obj.EvictionPressureTransitionPeriod = unversioned.Duration{Duration: 5 * time.Minute} } + if obj.SystemReserved == nil { + obj.SystemReserved = make(map[string]string) + } + if obj.KubeReserved == nil { + obj.KubeReserved = make(map[string]string) + } } func boolVar(b bool) *bool { diff --git a/pkg/apis/componentconfig/v1alpha1/types.go b/pkg/apis/componentconfig/v1alpha1/types.go index 1c6ef0f6371..cacde95702d 100644 --- a/pkg/apis/componentconfig/v1alpha1/types.go +++ b/pkg/apis/componentconfig/v1alpha1/types.go @@ -186,15 +186,15 @@ type KubeletConfiguration struct { // readOnlyPort is the read-only port for the Kubelet to serve on with // no authentication/authorization (set to 0 to disable) ReadOnlyPort int32 `json:"readOnlyPort"` - // tLSCertFile is the file containing x509 Certificate for HTTPS. (CA cert, + // tlsCertFile is the file containing x509 Certificate for HTTPS. (CA cert, // if any, concatenated after server cert). If tlsCertFile and // tlsPrivateKeyFile are not provided, a self-signed certificate // and key are generated for the public address and saved to the directory // passed to certDir. - TLSCertFile string `json:"tLSCertFile"` - // tLSPrivateKeyFile is the ile containing x509 private key matching + TLSCertFile string `json:"tlsCertFile"` + // tlsPrivateKeyFile is the ile containing x509 private key matching // tlsCertFile. - TLSPrivateKeyFile string `json:"tLSPrivateKeyFile"` + TLSPrivateKeyFile string `json:"tlsPrivateKeyFile"` // certDirectory is the directory where the TLS certs are located (by // default /var/run/kubernetes). If tlsCertFile and tlsPrivateKeyFile // are provided, this flag will be ignored. @@ -227,18 +227,18 @@ type KubeletConfiguration struct { HostIPCSources []string `json:"hostIPCSources"` // registryPullQPS is the limit of registry pulls per second. If 0, // unlimited. Set to 0 for no limit. Defaults to 5.0. - RegistryPullQPS *float64 `json:"registryPullQPS"` + RegistryPullQPS *int32 `json:"registryPullQPS"` // registryBurst is the maximum size of a bursty pulls, temporarily allows // pulls to burst to this number, while still not exceeding registryQps. - // Only used if registryQps > 0. - RegistryBurst int64 `json:"registryBurst"` + // Only used if registryQPS > 0. + RegistryBurst int32 `json:"registryBurst"` // eventRecordQPS is the maximum event creations per second. If 0, there // is no limit enforced. - EventRecordQPS float32 `json:"eventRecordQPS"` + EventRecordQPS *int32 `json:"eventRecordQPS"` // eventBurst is the maximum size of a bursty event records, temporarily // allows event records to burst to this number, while still not exceeding // event-qps. Only used if eventQps > 0 - EventBurst int64 `json:"eventBurst"` + EventBurst int32 `json:"eventBurst"` // enableDebuggingHandlers enables server endpoints for log collection // and local running of containers and commands EnableDebuggingHandlers *bool `json:"enableDebuggingHandlers"` @@ -247,7 +247,7 @@ type KubeletConfiguration struct { MinimumGCAge unversioned.Duration `json:"minimumGCAge"` // maxPerPodContainerCount is the maximum number of old instances to // retain per container. Each container takes up some disk space. - MaxPerPodContainerCount int64 `json:"maxPerPodContainerCount"` + MaxPerPodContainerCount int32 `json:"maxPerPodContainerCount"` // maxContainerCount is the maximum number of old instances of containers // to retain globally. Each container takes up some disk space. MaxContainerCount *int32 `json:"maxContainerCount"` @@ -295,7 +295,7 @@ type KubeletConfiguration struct { // lowDiskSpaceThresholdMB is the absolute free disk space, in MB, to // maintain. When disk space falls below this threshold, new pods would // be rejected. - LowDiskSpaceThresholdMB int64 `json:"lowDiskSpaceThresholdMB"` + LowDiskSpaceThresholdMB int32 `json:"lowDiskSpaceThresholdMB"` // How frequently to calculate and cache volume disk usage for all pods VolumeStatsAggPeriod unversioned.Duration `json:"volumeStatsAggPeriod"` // networkPluginName is the name of the network plugin to be invoked for @@ -389,7 +389,7 @@ type KubeletConfiguration struct { // contentType is contentType of requests sent to apiserver. ContentType string `json:"contentType"` // kubeAPIQPS is the QPS to use while talking with kubernetes apiserver - KubeAPIQPS float32 `json:"kubeAPIQPS"` + KubeAPIQPS *int32 `json:"kubeAPIQPS"` // kubeAPIBurst is the burst to allow while talking with kubernetes // apiserver KubeAPIBurst int32 `json:"kubeAPIBurst"` @@ -415,7 +415,7 @@ type KubeletConfiguration struct { // enable gathering custom metrics. EnableCustomMetrics bool `json:"enableCustomMetrics"` // Comma-delimited list of hard eviction expressions. For example, 'memory.available<300Mi'. - EvictionHard string `json:"evictionHard"` + EvictionHard *string `json:"evictionHard"` // Comma-delimited list of soft eviction expressions. For example, 'memory.available<300Mi'. EvictionSoft string `json:"evictionSoft"` // Comma-delimeted list of grace periods for each soft eviction signal. For example, 'memory.available=30s'. @@ -430,4 +430,14 @@ type KubeletConfiguration struct { // manage attachment/detachment of volumes scheduled to this node, and // disables kubelet from executing any attach/detach operations EnableControllerAttachDetach *bool `json:"enableControllerAttachDetach"` + // 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. [default=none] + // See http://releases.k8s.io/HEAD/docs/user-guide/compute-resources.md for more detail. + SystemReserved map[string]string `json:"systemReserved"` + // 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. [default=none] + // See http://releases.k8s.io/HEAD/docs/user-guide/compute-resources.md for more detail. + KubeReserved map[string]string `json:"kubeReserved"` }