From 3de94cd23cd9ccfc49305cf37d4c22879ffea0eb Mon Sep 17 00:00:00 2001 From: Phillip Wittrock Date: Thu, 14 Jan 2016 11:19:26 -0800 Subject: [PATCH] Supply volume fs metrics to server/stats/handler.go * Metrics will not be expose until they are hooked up to a handler * Metrics are not cached and expose a dos vector, this must be fixed before release or the stats should not be exposed through an api endpoint --- cmd/kubelet/app/options/options.go | 2 + cmd/kubelet/app/server.go | 4 + docs/admin/kubelet.md | 3 +- hack/verify-flags/known-flags.txt | 1 + pkg/apis/componentconfig/types.generated.go | 2079 +++++++++-------- pkg/apis/componentconfig/types.go | 2 + pkg/kubelet/kubelet.go | 15 +- pkg/kubelet/metrics/metrics.go | 9 + pkg/kubelet/server/server.go | 28 +- pkg/kubelet/server/server_test.go | 12 +- .../server/stats/fs_resource_analyzer.go | 153 ++ .../server/stats/fs_resource_analyzer_test.go | 178 ++ pkg/kubelet/server/stats/handler.go | 7 +- .../server/stats/mock_stats_provider.go | 244 ++ pkg/kubelet/server/stats/resource_analyzer.go | 43 + pkg/kubelet/server/stats/summary.go | 39 +- pkg/kubelet/server/stats/summary_test.go | 3 +- pkg/kubelet/volumes.go | 13 + pkg/volume/metrics_cached.go | 69 + pkg/volume/mock_volume.go | 62 + pkg/volume/secret/secret.go | 12 +- pkg/volume/secret/secret_test.go | 6 + test/e2e_node/kubelet_test.go | 128 +- test/e2e_node/util.go | 48 - 24 files changed, 2030 insertions(+), 1130 deletions(-) create mode 100644 pkg/kubelet/server/stats/fs_resource_analyzer.go create mode 100644 pkg/kubelet/server/stats/fs_resource_analyzer_test.go create mode 100644 pkg/kubelet/server/stats/mock_stats_provider.go create mode 100644 pkg/kubelet/server/stats/resource_analyzer.go create mode 100644 pkg/volume/metrics_cached.go create mode 100644 pkg/volume/mock_volume.go delete mode 100644 test/e2e_node/util.go diff --git a/cmd/kubelet/app/options/options.go b/cmd/kubelet/app/options/options.go index 3f34ee763a..885533065a 100644 --- a/cmd/kubelet/app/options/options.go +++ b/cmd/kubelet/app/options/options.go @@ -69,6 +69,7 @@ func NewKubeletServer() *KubeletServer { KubeletConfiguration: componentconfig.KubeletConfiguration{ Address: "0.0.0.0", CAdvisorPort: 4194, + VolumeStatsAggPeriod: unversioned.Duration{time.Minute}, CertDirectory: "/var/run/kubernetes", CgroupRoot: "", ConfigureCBR0: false, @@ -182,6 +183,7 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) { fs.IntVar(&s.ImageGCHighThresholdPercent, "image-gc-high-threshold", s.ImageGCHighThresholdPercent, "The percent of disk usage after which image garbage collection is always run. Default: 90%") fs.IntVar(&s.ImageGCLowThresholdPercent, "image-gc-low-threshold", s.ImageGCLowThresholdPercent, "The percent of disk usage before which image garbage collection is never run. Lowest disk usage to garbage collect to. Default: 80%") fs.IntVar(&s.LowDiskSpaceThresholdMB, "low-diskspace-threshold-mb", s.LowDiskSpaceThresholdMB, "The absolute free disk space, in MB, to maintain. When disk space falls below this threshold, new pods would be rejected. Default: 256") + fs.DurationVar(&s.VolumeStatsAggPeriod.Duration, "volume-stats-agg-period", s.VolumeStatsAggPeriod.Duration, "Specifies interval for kubelet to calculate and cache the volume disk usage for all pods and volumes. To disable volume calculations, set to 0. Default: '1m'") fs.StringVar(&s.NetworkPluginName, "network-plugin", s.NetworkPluginName, " The name of the network plugin to be invoked for various events in kubelet/pod lifecycle") fs.StringVar(&s.NetworkPluginDir, "network-plugin-dir", s.NetworkPluginDir, " The full path of the directory in which to search for network plugins") 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") diff --git a/cmd/kubelet/app/server.go b/cmd/kubelet/app/server.go index 943426f89e..93e0b09bdb 100644 --- a/cmd/kubelet/app/server.go +++ b/cmd/kubelet/app/server.go @@ -180,6 +180,7 @@ func UnsecuredKubeletConfig(s *options.KubeletServer) (*KubeletConfig, error) { AllowPrivileged: s.AllowPrivileged, Auth: nil, // default does not enforce auth[nz] CAdvisorInterface: nil, // launches background processes, not set here + VolumeStatsAggPeriod: s.VolumeStatsAggPeriod.Duration, CgroupRoot: s.CgroupRoot, Cloud: nil, // cloud provider might start background processes ClusterDNS: net.ParseIP(s.ClusterDNS), @@ -481,6 +482,7 @@ func SimpleKubelet(client *clientset.Clientset, kcfg := KubeletConfig{ Address: net.ParseIP(address), CAdvisorInterface: cadvisorInterface, + VolumeStatsAggPeriod: time.Minute, CgroupRoot: "", Cloud: cloud, ClusterDNS: clusterDNS, @@ -654,6 +656,7 @@ type KubeletConfig struct { Auth server.AuthInterface Builder KubeletBuilder CAdvisorInterface cadvisor.Interface + VolumeStatsAggPeriod time.Duration CgroupRoot string Cloud cloudprovider.Interface ClusterDNS net.IP @@ -815,6 +818,7 @@ func CreateAndInitKubelet(kc *KubeletConfig) (k KubeletBootstrap, pc *config.Pod kc.NodeIP, kc.Reservation, kc.EnableCustomMetrics, + kc.VolumeStatsAggPeriod, ) if err != nil { diff --git a/docs/admin/kubelet.md b/docs/admin/kubelet.md index 7e85a092f6..a170ae4bd9 100644 --- a/docs/admin/kubelet.md +++ b/docs/admin/kubelet.md @@ -145,9 +145,10 @@ kubelet --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. --volume-plugin-dir="/usr/libexec/kubernetes/kubelet-plugins/volume/exec/": The full path of the directory in which to search for additional third party volume plugins + --volume-stats-agg-period=1m0s: Specifies interval for kubelet to calculate and cache the volume disk usage for all pods and volumes. To disable volume calculations, set to 0. Default: '1m' ``` -###### Auto generated by spf13/cobra on 3-Feb-2016 +###### Auto generated by spf13/cobra on 5-Feb-2016 diff --git a/hack/verify-flags/known-flags.txt b/hack/verify-flags/known-flags.txt index f4bb128f66..8512afcdbb 100644 --- a/hack/verify-flags/known-flags.txt +++ b/hack/verify-flags/known-flags.txt @@ -365,6 +365,7 @@ use-kubernetes-cluster-service user-whitelist verify-only volume-plugin-dir +volume-stats-agg-period watch-cache watch-only whitelist-override-label diff --git a/pkg/apis/componentconfig/types.generated.go b/pkg/apis/componentconfig/types.generated.go index 5d2dd821f0..0016e5e83b 100644 --- a/pkg/apis/componentconfig/types.generated.go +++ b/pkg/apis/componentconfig/types.generated.go @@ -1037,22 +1037,22 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep109 := !z.EncBinary() yy2arr109 := z.EncBasicHandle().StructToArray - var yyq109 [72]bool + var yyq109 [73]bool _, _, _ = yysep109, yyq109, yy2arr109 const yyr109 bool = false - yyq109[45] = x.CloudProvider != "" - yyq109[46] = x.CloudConfigFile != "" - yyq109[47] = x.ResourceContainer != "" - yyq109[48] = x.CgroupRoot != "" - yyq109[50] = x.RktPath != "" - yyq109[51] = x.RktStage1Image != "" - yyq109[67] = true - yyq109[68] = x.NodeIP != "" + yyq109[46] = x.CloudProvider != "" + yyq109[47] = x.CloudConfigFile != "" + yyq109[48] = x.ResourceContainer != "" + yyq109[49] = x.CgroupRoot != "" + yyq109[51] = x.RktPath != "" + yyq109[52] = x.RktStage1Image != "" + yyq109[68] = true + yyq109[69] = x.NodeIP != "" var yynn109 int if yyr109 || yy2arr109 { - r.EncodeArrayStart(72) + r.EncodeArrayStart(73) } else { - yynn109 = 64 + yynn109 = 65 for _, b := range yyq109 { if b { yynn109++ @@ -1909,8 +1909,35 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr109 || yy2arr109 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym249 := z.EncBinary() - _ = yym249 + yy249 := &x.VolumeStatsAggPeriod + yym250 := z.EncBinary() + _ = yym250 + if false { + } else if z.HasExtensions() && z.EncExt(yy249) { + } else if !yym250 && z.IsJSONHandle() { + z.EncJSONMarshal(yy249) + } else { + z.EncFallback(yy249) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("VolumeStatsAggPeriod")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy251 := &x.VolumeStatsAggPeriod + yym252 := z.EncBinary() + _ = yym252 + if false { + } else if z.HasExtensions() && z.EncExt(yy251) { + } else if !yym252 && z.IsJSONHandle() { + z.EncJSONMarshal(yy251) + } else { + z.EncFallback(yy251) + } + } + if yyr109 || yy2arr109 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym254 := z.EncBinary() + _ = yym254 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.NetworkPluginName)) @@ -1919,8 +1946,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("networkPluginName")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym250 := z.EncBinary() - _ = yym250 + yym255 := z.EncBinary() + _ = yym255 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.NetworkPluginName)) @@ -1928,8 +1955,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr109 || yy2arr109 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym252 := z.EncBinary() - _ = yym252 + yym257 := z.EncBinary() + _ = yym257 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.NetworkPluginDir)) @@ -1938,8 +1965,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("networkPluginDir")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym253 := z.EncBinary() - _ = yym253 + yym258 := z.EncBinary() + _ = yym258 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.NetworkPluginDir)) @@ -1947,8 +1974,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr109 || yy2arr109 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym255 := z.EncBinary() - _ = yym255 + yym260 := z.EncBinary() + _ = yym260 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.VolumePluginDir)) @@ -1957,8 +1984,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("volumePluginDir")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym256 := z.EncBinary() - _ = yym256 + yym261 := z.EncBinary() + _ = yym261 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.VolumePluginDir)) @@ -1966,9 +1993,9 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr109 || yy2arr109 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq109[45] { - yym258 := z.EncBinary() - _ = yym258 + if yyq109[46] { + yym263 := z.EncBinary() + _ = yym263 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.CloudProvider)) @@ -1977,62 +2004,62 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq109[45] { + if yyq109[46] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("cloudProvider")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym259 := z.EncBinary() - _ = yym259 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.CloudProvider)) - } - } - } - if yyr109 || yy2arr109 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq109[46] { - yym261 := z.EncBinary() - _ = yym261 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.CloudConfigFile)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq109[46] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("cloudConfigFile")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym262 := z.EncBinary() - _ = yym262 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.CloudConfigFile)) - } - } - } - if yyr109 || yy2arr109 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq109[47] { yym264 := z.EncBinary() _ = yym264 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ResourceContainer)) + r.EncodeString(codecSelferC_UTF81234, string(x.CloudProvider)) + } + } + } + if yyr109 || yy2arr109 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq109[47] { + yym266 := z.EncBinary() + _ = yym266 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.CloudConfigFile)) } } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { if yyq109[47] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("cloudConfigFile")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym267 := z.EncBinary() + _ = yym267 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.CloudConfigFile)) + } + } + } + if yyr109 || yy2arr109 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq109[48] { + yym269 := z.EncBinary() + _ = yym269 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ResourceContainer)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq109[48] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("resourceContainer")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym265 := z.EncBinary() - _ = yym265 + yym270 := z.EncBinary() + _ = yym270 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ResourceContainer)) @@ -2041,9 +2068,9 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr109 || yy2arr109 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq109[48] { - yym267 := z.EncBinary() - _ = yym267 + if yyq109[49] { + yym272 := z.EncBinary() + _ = yym272 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.CgroupRoot)) @@ -2052,12 +2079,12 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq109[48] { + if yyq109[49] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("cgroupRoot")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym268 := z.EncBinary() - _ = yym268 + yym273 := z.EncBinary() + _ = yym273 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.CgroupRoot)) @@ -2066,8 +2093,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr109 || yy2arr109 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym270 := z.EncBinary() - _ = yym270 + yym275 := z.EncBinary() + _ = yym275 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ContainerRuntime)) @@ -2076,8 +2103,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("containerRuntime")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym271 := z.EncBinary() - _ = yym271 + yym276 := z.EncBinary() + _ = yym276 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ContainerRuntime)) @@ -2085,9 +2112,9 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr109 || yy2arr109 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq109[50] { - yym273 := z.EncBinary() - _ = yym273 + if yyq109[51] { + yym278 := z.EncBinary() + _ = yym278 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.RktPath)) @@ -2096,12 +2123,12 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq109[50] { + if yyq109[51] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("rktPath")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym274 := z.EncBinary() - _ = yym274 + yym279 := z.EncBinary() + _ = yym279 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.RktPath)) @@ -2110,9 +2137,9 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr109 || yy2arr109 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq109[51] { - yym276 := z.EncBinary() - _ = yym276 + if yyq109[52] { + yym281 := z.EncBinary() + _ = yym281 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.RktStage1Image)) @@ -2121,12 +2148,12 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq109[51] { + if yyq109[52] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("rktStage1Image")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym277 := z.EncBinary() - _ = yym277 + yym282 := z.EncBinary() + _ = yym282 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.RktStage1Image)) @@ -2135,8 +2162,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr109 || yy2arr109 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym279 := z.EncBinary() - _ = yym279 + yym284 := z.EncBinary() + _ = yym284 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.SystemContainer)) @@ -2145,8 +2172,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("systemContainer")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym280 := z.EncBinary() - _ = yym280 + yym285 := z.EncBinary() + _ = yym285 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.SystemContainer)) @@ -2154,8 +2181,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr109 || yy2arr109 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym282 := z.EncBinary() - _ = yym282 + yym287 := z.EncBinary() + _ = yym287 if false { } else { r.EncodeBool(bool(x.ConfigureCBR0)) @@ -2164,8 +2191,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("configureCbr0")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym283 := z.EncBinary() - _ = yym283 + yym288 := z.EncBinary() + _ = yym288 if false { } else { r.EncodeBool(bool(x.ConfigureCBR0)) @@ -2173,8 +2200,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr109 || yy2arr109 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym285 := z.EncBinary() - _ = yym285 + yym290 := z.EncBinary() + _ = yym290 if false { } else { r.EncodeInt(int64(x.MaxPods)) @@ -2183,8 +2210,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("maxPods")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym286 := z.EncBinary() - _ = yym286 + yym291 := z.EncBinary() + _ = yym291 if false { } else { r.EncodeInt(int64(x.MaxPods)) @@ -2192,8 +2219,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr109 || yy2arr109 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym288 := z.EncBinary() - _ = yym288 + yym293 := z.EncBinary() + _ = yym293 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.DockerExecHandlerName)) @@ -2202,8 +2229,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("dockerExecHandlerName")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym289 := z.EncBinary() - _ = yym289 + yym294 := z.EncBinary() + _ = yym294 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.DockerExecHandlerName)) @@ -2211,8 +2238,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr109 || yy2arr109 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym291 := z.EncBinary() - _ = yym291 + yym296 := z.EncBinary() + _ = yym296 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PodCIDR)) @@ -2221,8 +2248,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("podCIDR")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym292 := z.EncBinary() - _ = yym292 + yym297 := z.EncBinary() + _ = yym297 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PodCIDR)) @@ -2230,8 +2257,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr109 || yy2arr109 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym294 := z.EncBinary() - _ = yym294 + yym299 := z.EncBinary() + _ = yym299 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ResolverConfig)) @@ -2240,8 +2267,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("resolvConf")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym295 := z.EncBinary() - _ = yym295 + yym300 := z.EncBinary() + _ = yym300 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ResolverConfig)) @@ -2249,8 +2276,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr109 || yy2arr109 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym297 := z.EncBinary() - _ = yym297 + yym302 := z.EncBinary() + _ = yym302 if false { } else { r.EncodeBool(bool(x.CPUCFSQuota)) @@ -2259,8 +2286,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("cpuCFSQuota")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym298 := z.EncBinary() - _ = yym298 + yym303 := z.EncBinary() + _ = yym303 if false { } else { r.EncodeBool(bool(x.CPUCFSQuota)) @@ -2268,8 +2295,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr109 || yy2arr109 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym300 := z.EncBinary() - _ = yym300 + yym305 := z.EncBinary() + _ = yym305 if false { } else { r.EncodeBool(bool(x.Containerized)) @@ -2278,8 +2305,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("containerized")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym301 := z.EncBinary() - _ = yym301 + yym306 := z.EncBinary() + _ = yym306 if false { } else { r.EncodeBool(bool(x.Containerized)) @@ -2287,8 +2314,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr109 || yy2arr109 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym303 := z.EncBinary() - _ = yym303 + yym308 := z.EncBinary() + _ = yym308 if false { } else { r.EncodeUint(uint64(x.MaxOpenFiles)) @@ -2297,8 +2324,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("maxOpenFiles")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym304 := z.EncBinary() - _ = yym304 + yym309 := z.EncBinary() + _ = yym309 if false { } else { r.EncodeUint(uint64(x.MaxOpenFiles)) @@ -2306,8 +2333,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr109 || yy2arr109 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym306 := z.EncBinary() - _ = yym306 + yym311 := z.EncBinary() + _ = yym311 if false { } else { r.EncodeBool(bool(x.ReconcileCIDR)) @@ -2316,8 +2343,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("reconcileCIDR")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym307 := z.EncBinary() - _ = yym307 + yym312 := z.EncBinary() + _ = yym312 if false { } else { r.EncodeBool(bool(x.ReconcileCIDR)) @@ -2325,8 +2352,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr109 || yy2arr109 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym309 := z.EncBinary() - _ = yym309 + yym314 := z.EncBinary() + _ = yym314 if false { } else { r.EncodeBool(bool(x.RegisterSchedulable)) @@ -2335,8 +2362,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("registerSchedulable")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym310 := z.EncBinary() - _ = yym310 + yym315 := z.EncBinary() + _ = yym315 if false { } else { r.EncodeBool(bool(x.RegisterSchedulable)) @@ -2344,8 +2371,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr109 || yy2arr109 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym312 := z.EncBinary() - _ = yym312 + yym317 := z.EncBinary() + _ = yym317 if false { } else { r.EncodeFloat32(float32(x.KubeAPIQPS)) @@ -2354,8 +2381,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeAPIQPS")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym313 := z.EncBinary() - _ = yym313 + yym318 := z.EncBinary() + _ = yym318 if false { } else { r.EncodeFloat32(float32(x.KubeAPIQPS)) @@ -2363,8 +2390,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr109 || yy2arr109 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym315 := z.EncBinary() - _ = yym315 + yym320 := z.EncBinary() + _ = yym320 if false { } else { r.EncodeInt(int64(x.KubeAPIBurst)) @@ -2373,8 +2400,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeAPIBurst")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym316 := z.EncBinary() - _ = yym316 + yym321 := z.EncBinary() + _ = yym321 if false { } else { r.EncodeInt(int64(x.KubeAPIBurst)) @@ -2382,8 +2409,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr109 || yy2arr109 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym318 := z.EncBinary() - _ = yym318 + yym323 := z.EncBinary() + _ = yym323 if false { } else { r.EncodeBool(bool(x.SerializeImagePulls)) @@ -2392,8 +2419,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("serializeImagePulls")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym319 := z.EncBinary() - _ = yym319 + yym324 := z.EncBinary() + _ = yym324 if false { } else { r.EncodeBool(bool(x.SerializeImagePulls)) @@ -2401,8 +2428,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr109 || yy2arr109 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym321 := z.EncBinary() - _ = yym321 + yym326 := z.EncBinary() + _ = yym326 if false { } else { r.EncodeBool(bool(x.ExperimentalFlannelOverlay)) @@ -2411,8 +2438,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("experimentalFlannelOverlay")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym322 := z.EncBinary() - _ = yym322 + yym327 := z.EncBinary() + _ = yym327 if false { } else { r.EncodeBool(bool(x.ExperimentalFlannelOverlay)) @@ -2420,42 +2447,42 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr109 || yy2arr109 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq109[67] { - yy324 := &x.OutOfDiskTransitionFrequency - yym325 := z.EncBinary() - _ = yym325 + if yyq109[68] { + yy329 := &x.OutOfDiskTransitionFrequency + yym330 := z.EncBinary() + _ = yym330 if false { - } else if z.HasExtensions() && z.EncExt(yy324) { - } else if !yym325 && z.IsJSONHandle() { - z.EncJSONMarshal(yy324) + } else if z.HasExtensions() && z.EncExt(yy329) { + } else if !yym330 && z.IsJSONHandle() { + z.EncJSONMarshal(yy329) } else { - z.EncFallback(yy324) + z.EncFallback(yy329) } } else { r.EncodeNil() } } else { - if yyq109[67] { + if yyq109[68] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("outOfDiskTransitionFrequency")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy326 := &x.OutOfDiskTransitionFrequency - yym327 := z.EncBinary() - _ = yym327 + yy331 := &x.OutOfDiskTransitionFrequency + yym332 := z.EncBinary() + _ = yym332 if false { - } else if z.HasExtensions() && z.EncExt(yy326) { - } else if !yym327 && z.IsJSONHandle() { - z.EncJSONMarshal(yy326) + } else if z.HasExtensions() && z.EncExt(yy331) { + } else if !yym332 && z.IsJSONHandle() { + z.EncJSONMarshal(yy331) } else { - z.EncFallback(yy326) + z.EncFallback(yy331) } } } if yyr109 || yy2arr109 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq109[68] { - yym329 := z.EncBinary() - _ = yym329 + if yyq109[69] { + yym334 := z.EncBinary() + _ = yym334 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.NodeIP)) @@ -2464,12 +2491,12 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq109[68] { + if yyq109[69] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nodeIP")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym330 := z.EncBinary() - _ = yym330 + yym335 := z.EncBinary() + _ = yym335 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.NodeIP)) @@ -2481,8 +2508,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { if x.NodeLabels == nil { r.EncodeNil() } else { - yym332 := z.EncBinary() - _ = yym332 + yym337 := z.EncBinary() + _ = yym337 if false { } else { z.F.EncMapStringStringV(x.NodeLabels, false, e) @@ -2495,8 +2522,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { if x.NodeLabels == nil { r.EncodeNil() } else { - yym333 := z.EncBinary() - _ = yym333 + yym338 := z.EncBinary() + _ = yym338 if false { } else { z.F.EncMapStringStringV(x.NodeLabels, false, e) @@ -2505,8 +2532,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr109 || yy2arr109 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym335 := z.EncBinary() - _ = yym335 + yym340 := z.EncBinary() + _ = yym340 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.NonMasqueradeCIDR)) @@ -2515,8 +2542,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nonMasqueradeCIDR")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym336 := z.EncBinary() - _ = yym336 + yym341 := z.EncBinary() + _ = yym341 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.NonMasqueradeCIDR)) @@ -2524,8 +2551,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr109 || yy2arr109 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym338 := z.EncBinary() - _ = yym338 + yym343 := z.EncBinary() + _ = yym343 if false { } else { r.EncodeBool(bool(x.EnableCustomMetrics)) @@ -2534,8 +2561,8 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("enableCustomMetrics")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym339 := z.EncBinary() - _ = yym339 + yym344 := z.EncBinary() + _ = yym344 if false { } else { r.EncodeBool(bool(x.EnableCustomMetrics)) @@ -2554,25 +2581,25 @@ func (x *KubeletConfiguration) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym340 := z.DecBinary() - _ = yym340 + yym345 := z.DecBinary() + _ = yym345 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct341 := r.ContainerType() - if yyct341 == codecSelferValueTypeMap1234 { - yyl341 := r.ReadMapStart() - if yyl341 == 0 { + yyct346 := r.ContainerType() + if yyct346 == codecSelferValueTypeMap1234 { + yyl346 := r.ReadMapStart() + if yyl346 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl341, d) + x.codecDecodeSelfFromMap(yyl346, d) } - } else if yyct341 == codecSelferValueTypeArray1234 { - yyl341 := r.ReadArrayStart() - if yyl341 == 0 { + } else if yyct346 == codecSelferValueTypeArray1234 { + yyl346 := r.ReadArrayStart() + if yyl346 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl341, d) + x.codecDecodeSelfFromArray(yyl346, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -2584,12 +2611,12 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys342Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys342Slc - var yyhl342 bool = l >= 0 - for yyj342 := 0; ; yyj342++ { - if yyhl342 { - if yyj342 >= l { + var yys347Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys347Slc + var yyhl347 bool = l >= 0 + for yyj347 := 0; ; yyj347++ { + if yyhl347 { + if yyj347 >= l { break } } else { @@ -2598,10 +2625,10 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys342Slc = r.DecodeBytes(yys342Slc, true, true) - yys342 := string(yys342Slc) + yys347Slc = r.DecodeBytes(yys347Slc, true, true) + yys347 := string(yys347Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys342 { + switch yys347 { case "config": if r.TryDecodeAsNil() { x.Config = "" @@ -2612,45 +2639,45 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.SyncFrequency = pkg1_unversioned.Duration{} } else { - yyv344 := &x.SyncFrequency - yym345 := z.DecBinary() - _ = yym345 + yyv349 := &x.SyncFrequency + yym350 := z.DecBinary() + _ = yym350 if false { - } else if z.HasExtensions() && z.DecExt(yyv344) { - } else if !yym345 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv344) + } else if z.HasExtensions() && z.DecExt(yyv349) { + } else if !yym350 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv349) } else { - z.DecFallback(yyv344, false) + z.DecFallback(yyv349, false) } } case "fileCheckFrequency": if r.TryDecodeAsNil() { x.FileCheckFrequency = pkg1_unversioned.Duration{} } else { - yyv346 := &x.FileCheckFrequency - yym347 := z.DecBinary() - _ = yym347 + yyv351 := &x.FileCheckFrequency + yym352 := z.DecBinary() + _ = yym352 if false { - } else if z.HasExtensions() && z.DecExt(yyv346) { - } else if !yym347 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv346) + } else if z.HasExtensions() && z.DecExt(yyv351) { + } else if !yym352 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv351) } else { - z.DecFallback(yyv346, false) + z.DecFallback(yyv351, false) } } case "httpCheckFrequency": if r.TryDecodeAsNil() { x.HTTPCheckFrequency = pkg1_unversioned.Duration{} } else { - yyv348 := &x.HTTPCheckFrequency - yym349 := z.DecBinary() - _ = yym349 + yyv353 := &x.HTTPCheckFrequency + yym354 := z.DecBinary() + _ = yym354 if false { - } else if z.HasExtensions() && z.DecExt(yyv348) { - } else if !yym349 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv348) + } else if z.HasExtensions() && z.DecExt(yyv353) { + } else if !yym354 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv353) } else { - z.DecFallback(yyv348, false) + z.DecFallback(yyv353, false) } } case "manifestURL": @@ -2789,15 +2816,15 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.MinimumGCAge = pkg1_unversioned.Duration{} } else { - yyv372 := &x.MinimumGCAge - yym373 := z.DecBinary() - _ = yym373 + yyv377 := &x.MinimumGCAge + yym378 := z.DecBinary() + _ = yym378 if false { - } else if z.HasExtensions() && z.DecExt(yyv372) { - } else if !yym373 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv372) + } else if z.HasExtensions() && z.DecExt(yyv377) { + } else if !yym378 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv377) } else { - z.DecFallback(yyv372, false) + z.DecFallback(yyv377, false) } } case "maxPerPodContainerCount": @@ -2864,30 +2891,30 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.StreamingConnectionIdleTimeout = pkg1_unversioned.Duration{} } else { - yyv384 := &x.StreamingConnectionIdleTimeout - yym385 := z.DecBinary() - _ = yym385 + yyv389 := &x.StreamingConnectionIdleTimeout + yym390 := z.DecBinary() + _ = yym390 if false { - } else if z.HasExtensions() && z.DecExt(yyv384) { - } else if !yym385 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv384) + } else if z.HasExtensions() && z.DecExt(yyv389) { + } else if !yym390 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv389) } else { - z.DecFallback(yyv384, false) + z.DecFallback(yyv389, false) } } case "nodeStatusUpdateFrequency": if r.TryDecodeAsNil() { x.NodeStatusUpdateFrequency = pkg1_unversioned.Duration{} } else { - yyv386 := &x.NodeStatusUpdateFrequency - yym387 := z.DecBinary() - _ = yym387 + yyv391 := &x.NodeStatusUpdateFrequency + yym392 := z.DecBinary() + _ = yym392 if false { - } else if z.HasExtensions() && z.DecExt(yyv386) { - } else if !yym387 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv386) + } else if z.HasExtensions() && z.DecExt(yyv391) { + } else if !yym392 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv391) } else { - z.DecFallback(yyv386, false) + z.DecFallback(yyv391, false) } } case "imageGCHighThresholdPercent": @@ -2908,6 +2935,21 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode } else { x.LowDiskSpaceThresholdMB = int(r.DecodeInt(codecSelferBitsize1234)) } + case "VolumeStatsAggPeriod": + if r.TryDecodeAsNil() { + x.VolumeStatsAggPeriod = pkg1_unversioned.Duration{} + } else { + yyv396 := &x.VolumeStatsAggPeriod + yym397 := z.DecBinary() + _ = yym397 + if false { + } else if z.HasExtensions() && z.DecExt(yyv396) { + } else if !yym397 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv396) + } else { + z.DecFallback(yyv396, false) + } + } case "networkPluginName": if r.TryDecodeAsNil() { x.NetworkPluginName = "" @@ -3062,15 +3104,15 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.OutOfDiskTransitionFrequency = pkg1_unversioned.Duration{} } else { - yyv416 := &x.OutOfDiskTransitionFrequency - yym417 := z.DecBinary() - _ = yym417 + yyv423 := &x.OutOfDiskTransitionFrequency + yym424 := z.DecBinary() + _ = yym424 if false { - } else if z.HasExtensions() && z.DecExt(yyv416) { - } else if !yym417 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv416) + } else if z.HasExtensions() && z.DecExt(yyv423) { + } else if !yym424 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv423) } else { - z.DecFallback(yyv416, false) + z.DecFallback(yyv423, false) } } case "nodeIP": @@ -3083,12 +3125,12 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.NodeLabels = nil } else { - yyv419 := &x.NodeLabels - yym420 := z.DecBinary() - _ = yym420 + yyv426 := &x.NodeLabels + yym427 := z.DecBinary() + _ = yym427 if false { } else { - z.F.DecMapStringStringX(yyv419, false, d) + z.F.DecMapStringStringX(yyv426, false, d) } } case "nonMasqueradeCIDR": @@ -3104,9 +3146,9 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode x.EnableCustomMetrics = bool(r.DecodeBool()) } default: - z.DecStructFieldNotFound(-1, yys342) - } // end switch yys342 - } // end for yyj342 + z.DecStructFieldNotFound(-1, yys347) + } // end switch yys347 + } // end for yyj347 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -3114,16 +3156,16 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj423 int - var yyb423 bool - var yyhl423 bool = l >= 0 - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + var yyj430 int + var yyb430 bool + var yyhl430 bool = l >= 0 + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3133,13 +3175,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.Config = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3147,24 +3189,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.SyncFrequency = pkg1_unversioned.Duration{} } else { - yyv425 := &x.SyncFrequency - yym426 := z.DecBinary() - _ = yym426 + yyv432 := &x.SyncFrequency + yym433 := z.DecBinary() + _ = yym433 if false { - } else if z.HasExtensions() && z.DecExt(yyv425) { - } else if !yym426 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv425) + } else if z.HasExtensions() && z.DecExt(yyv432) { + } else if !yym433 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv432) } else { - z.DecFallback(yyv425, false) + z.DecFallback(yyv432, false) } } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3172,24 +3214,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.FileCheckFrequency = pkg1_unversioned.Duration{} } else { - yyv427 := &x.FileCheckFrequency - yym428 := z.DecBinary() - _ = yym428 + yyv434 := &x.FileCheckFrequency + yym435 := z.DecBinary() + _ = yym435 if false { - } else if z.HasExtensions() && z.DecExt(yyv427) { - } else if !yym428 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv427) + } else if z.HasExtensions() && z.DecExt(yyv434) { + } else if !yym435 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv434) } else { - z.DecFallback(yyv427, false) + z.DecFallback(yyv434, false) } } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3197,24 +3239,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.HTTPCheckFrequency = pkg1_unversioned.Duration{} } else { - yyv429 := &x.HTTPCheckFrequency - yym430 := z.DecBinary() - _ = yym430 + yyv436 := &x.HTTPCheckFrequency + yym437 := z.DecBinary() + _ = yym437 if false { - } else if z.HasExtensions() && z.DecExt(yyv429) { - } else if !yym430 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv429) + } else if z.HasExtensions() && z.DecExt(yyv436) { + } else if !yym437 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv436) } else { - z.DecFallback(yyv429, false) + z.DecFallback(yyv436, false) } } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3224,13 +3266,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ManifestURL = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3240,13 +3282,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ManifestURLHeader = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3256,13 +3298,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EnableServer = bool(r.DecodeBool()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3272,13 +3314,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.Address = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3288,13 +3330,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.Port = uint(r.DecodeUint(codecSelferBitsize1234)) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3304,13 +3346,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ReadOnlyPort = uint(r.DecodeUint(codecSelferBitsize1234)) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3320,13 +3362,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.TLSCertFile = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3336,13 +3378,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.TLSPrivateKeyFile = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3352,13 +3394,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CertDirectory = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3368,13 +3410,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.HostnameOverride = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3384,13 +3426,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.PodInfraContainerImage = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3400,13 +3442,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.DockerEndpoint = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3416,13 +3458,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RootDirectory = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3432,13 +3474,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.AllowPrivileged = bool(r.DecodeBool()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3448,13 +3490,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.HostNetworkSources = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3464,13 +3506,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.HostPIDSources = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3480,13 +3522,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.HostIPCSources = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3496,13 +3538,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RegistryPullQPS = float64(r.DecodeFloat(false)) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3512,13 +3554,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RegistryBurst = int(r.DecodeInt(codecSelferBitsize1234)) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3528,13 +3570,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EventRecordQPS = float32(r.DecodeFloat(true)) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3544,13 +3586,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EventBurst = int(r.DecodeInt(codecSelferBitsize1234)) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3560,13 +3602,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EnableDebuggingHandlers = bool(r.DecodeBool()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3574,24 +3616,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.MinimumGCAge = pkg1_unversioned.Duration{} } else { - yyv453 := &x.MinimumGCAge - yym454 := z.DecBinary() - _ = yym454 + yyv460 := &x.MinimumGCAge + yym461 := z.DecBinary() + _ = yym461 if false { - } else if z.HasExtensions() && z.DecExt(yyv453) { - } else if !yym454 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv453) + } else if z.HasExtensions() && z.DecExt(yyv460) { + } else if !yym461 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv460) } else { - z.DecFallback(yyv453, false) + z.DecFallback(yyv460, false) } } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3601,13 +3643,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.MaxPerPodContainerCount = int(r.DecodeInt(codecSelferBitsize1234)) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3617,13 +3659,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.MaxContainerCount = int(r.DecodeInt(codecSelferBitsize1234)) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3633,13 +3675,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CAdvisorPort = uint(r.DecodeUint(codecSelferBitsize1234)) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3649,13 +3691,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.HealthzPort = int(r.DecodeInt(codecSelferBitsize1234)) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3665,13 +3707,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.HealthzBindAddress = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3681,13 +3723,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.OOMScoreAdj = int(r.DecodeInt(codecSelferBitsize1234)) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3697,13 +3739,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RegisterNode = bool(r.DecodeBool()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3713,13 +3755,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ClusterDomain = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3729,13 +3771,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.MasterServiceNamespace = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3745,13 +3787,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ClusterDNS = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3759,24 +3801,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.StreamingConnectionIdleTimeout = pkg1_unversioned.Duration{} } else { - yyv465 := &x.StreamingConnectionIdleTimeout - yym466 := z.DecBinary() - _ = yym466 + yyv472 := &x.StreamingConnectionIdleTimeout + yym473 := z.DecBinary() + _ = yym473 if false { - } else if z.HasExtensions() && z.DecExt(yyv465) { - } else if !yym466 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv465) + } else if z.HasExtensions() && z.DecExt(yyv472) { + } else if !yym473 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv472) } else { - z.DecFallback(yyv465, false) + z.DecFallback(yyv472, false) } } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3784,24 +3826,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.NodeStatusUpdateFrequency = pkg1_unversioned.Duration{} } else { - yyv467 := &x.NodeStatusUpdateFrequency - yym468 := z.DecBinary() - _ = yym468 + yyv474 := &x.NodeStatusUpdateFrequency + yym475 := z.DecBinary() + _ = yym475 if false { - } else if z.HasExtensions() && z.DecExt(yyv467) { - } else if !yym468 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv467) + } else if z.HasExtensions() && z.DecExt(yyv474) { + } else if !yym475 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv474) } else { - z.DecFallback(yyv467, false) + z.DecFallback(yyv474, false) } } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3811,13 +3853,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ImageGCHighThresholdPercent = int(r.DecodeInt(codecSelferBitsize1234)) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3827,13 +3869,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ImageGCLowThresholdPercent = int(r.DecodeInt(codecSelferBitsize1234)) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3843,13 +3885,38 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.LowDiskSpaceThresholdMB = int(r.DecodeInt(codecSelferBitsize1234)) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.VolumeStatsAggPeriod = pkg1_unversioned.Duration{} + } else { + yyv479 := &x.VolumeStatsAggPeriod + yym480 := z.DecBinary() + _ = yym480 + if false { + } else if z.HasExtensions() && z.DecExt(yyv479) { + } else if !yym480 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv479) + } else { + z.DecFallback(yyv479, false) + } + } + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l + } else { + yyb430 = r.CheckBreak() + } + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3859,13 +3926,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.NetworkPluginName = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3875,13 +3942,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.NetworkPluginDir = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3891,13 +3958,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.VolumePluginDir = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3907,13 +3974,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CloudProvider = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3923,13 +3990,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CloudConfigFile = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3939,13 +4006,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ResourceContainer = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3955,13 +4022,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CgroupRoot = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3971,13 +4038,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ContainerRuntime = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3987,13 +4054,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RktPath = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4003,13 +4070,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RktStage1Image = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4019,13 +4086,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.SystemContainer = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4035,13 +4102,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ConfigureCBR0 = bool(r.DecodeBool()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4051,13 +4118,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.MaxPods = int(r.DecodeInt(codecSelferBitsize1234)) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4067,13 +4134,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.DockerExecHandlerName = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4083,13 +4150,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.PodCIDR = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4099,13 +4166,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ResolverConfig = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4115,13 +4182,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CPUCFSQuota = bool(r.DecodeBool()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4131,13 +4198,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.Containerized = bool(r.DecodeBool()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4147,13 +4214,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.MaxOpenFiles = uint64(r.DecodeUint(64)) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4163,13 +4230,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ReconcileCIDR = bool(r.DecodeBool()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4179,13 +4246,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RegisterSchedulable = bool(r.DecodeBool()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4195,13 +4262,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.KubeAPIQPS = float32(r.DecodeFloat(true)) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4211,13 +4278,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.KubeAPIBurst = int(r.DecodeInt(codecSelferBitsize1234)) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4227,13 +4294,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.SerializeImagePulls = bool(r.DecodeBool()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4243,13 +4310,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ExperimentalFlannelOverlay = bool(r.DecodeBool()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4257,24 +4324,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.OutOfDiskTransitionFrequency = pkg1_unversioned.Duration{} } else { - yyv497 := &x.OutOfDiskTransitionFrequency - yym498 := z.DecBinary() - _ = yym498 + yyv506 := &x.OutOfDiskTransitionFrequency + yym507 := z.DecBinary() + _ = yym507 if false { - } else if z.HasExtensions() && z.DecExt(yyv497) { - } else if !yym498 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv497) + } else if z.HasExtensions() && z.DecExt(yyv506) { + } else if !yym507 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv506) } else { - z.DecFallback(yyv497, false) + z.DecFallback(yyv506, false) } } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4284,13 +4351,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.NodeIP = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4298,21 +4365,21 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.NodeLabels = nil } else { - yyv500 := &x.NodeLabels - yym501 := z.DecBinary() - _ = yym501 + yyv509 := &x.NodeLabels + yym510 := z.DecBinary() + _ = yym510 if false { } else { - z.F.DecMapStringStringX(yyv500, false, d) + z.F.DecMapStringStringX(yyv509, false, d) } } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4322,13 +4389,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.NonMasqueradeCIDR = string(r.DecodeString()) } - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4339,17 +4406,17 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco x.EnableCustomMetrics = bool(r.DecodeBool()) } for { - yyj423++ - if yyhl423 { - yyb423 = yyj423 > l + yyj430++ + if yyhl430 { + yyb430 = yyj430 > l } else { - yyb423 = r.CheckBreak() + yyb430 = r.CheckBreak() } - if yyb423 { + if yyb430 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj423-1, "") + z.DecStructFieldNotFound(yyj430-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -4361,36 +4428,36 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym504 := z.EncBinary() - _ = yym504 + yym513 := z.EncBinary() + _ = yym513 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep505 := !z.EncBinary() - yy2arr505 := z.EncBasicHandle().StructToArray - var yyq505 [11]bool - _, _, _ = yysep505, yyq505, yy2arr505 - const yyr505 bool = false - yyq505[0] = x.Kind != "" - yyq505[1] = x.APIVersion != "" - var yynn505 int - if yyr505 || yy2arr505 { + yysep514 := !z.EncBinary() + yy2arr514 := z.EncBasicHandle().StructToArray + var yyq514 [11]bool + _, _, _ = yysep514, yyq514, yy2arr514 + const yyr514 bool = false + yyq514[0] = x.Kind != "" + yyq514[1] = x.APIVersion != "" + var yynn514 int + if yyr514 || yy2arr514 { r.EncodeArrayStart(11) } else { - yynn505 = 9 - for _, b := range yyq505 { + yynn514 = 9 + for _, b := range yyq514 { if b { - yynn505++ + yynn514++ } } - r.EncodeMapStart(yynn505) - yynn505 = 0 + r.EncodeMapStart(yynn514) + yynn514 = 0 } - if yyr505 || yy2arr505 { + if yyr514 || yy2arr514 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq505[0] { - yym507 := z.EncBinary() - _ = yym507 + if yyq514[0] { + yym516 := z.EncBinary() + _ = yym516 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -4399,23 +4466,23 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq505[0] { + if yyq514[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym508 := z.EncBinary() - _ = yym508 + yym517 := z.EncBinary() + _ = yym517 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr505 || yy2arr505 { + if yyr514 || yy2arr514 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq505[1] { - yym510 := z.EncBinary() - _ = yym510 + if yyq514[1] { + yym519 := z.EncBinary() + _ = yym519 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -4424,22 +4491,22 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq505[1] { + if yyq514[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym511 := z.EncBinary() - _ = yym511 + yym520 := z.EncBinary() + _ = yym520 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr505 || yy2arr505 { + if yyr514 || yy2arr514 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym513 := z.EncBinary() - _ = yym513 + yym522 := z.EncBinary() + _ = yym522 if false { } else { r.EncodeInt(int64(x.Port)) @@ -4448,17 +4515,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("port")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym514 := z.EncBinary() - _ = yym514 + yym523 := z.EncBinary() + _ = yym523 if false { } else { r.EncodeInt(int64(x.Port)) } } - if yyr505 || yy2arr505 { + if yyr514 || yy2arr514 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym516 := z.EncBinary() - _ = yym516 + yym525 := z.EncBinary() + _ = yym525 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Address)) @@ -4467,17 +4534,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("address")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym517 := z.EncBinary() - _ = yym517 + yym526 := z.EncBinary() + _ = yym526 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Address)) } } - if yyr505 || yy2arr505 { + if yyr514 || yy2arr514 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym519 := z.EncBinary() - _ = yym519 + yym528 := z.EncBinary() + _ = yym528 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.AlgorithmProvider)) @@ -4486,17 +4553,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("algorithmProvider")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym520 := z.EncBinary() - _ = yym520 + yym529 := z.EncBinary() + _ = yym529 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.AlgorithmProvider)) } } - if yyr505 || yy2arr505 { + if yyr514 || yy2arr514 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym522 := z.EncBinary() - _ = yym522 + yym531 := z.EncBinary() + _ = yym531 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PolicyConfigFile)) @@ -4505,17 +4572,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("policyConfigFile")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym523 := z.EncBinary() - _ = yym523 + yym532 := z.EncBinary() + _ = yym532 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PolicyConfigFile)) } } - if yyr505 || yy2arr505 { + if yyr514 || yy2arr514 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym525 := z.EncBinary() - _ = yym525 + yym534 := z.EncBinary() + _ = yym534 if false { } else { r.EncodeBool(bool(x.EnableProfiling)) @@ -4524,17 +4591,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("enableProfiling")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym526 := z.EncBinary() - _ = yym526 + yym535 := z.EncBinary() + _ = yym535 if false { } else { r.EncodeBool(bool(x.EnableProfiling)) } } - if yyr505 || yy2arr505 { + if yyr514 || yy2arr514 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym528 := z.EncBinary() - _ = yym528 + yym537 := z.EncBinary() + _ = yym537 if false { } else { r.EncodeFloat32(float32(x.KubeAPIQPS)) @@ -4543,17 +4610,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeAPIQPS")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym529 := z.EncBinary() - _ = yym529 + yym538 := z.EncBinary() + _ = yym538 if false { } else { r.EncodeFloat32(float32(x.KubeAPIQPS)) } } - if yyr505 || yy2arr505 { + if yyr514 || yy2arr514 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym531 := z.EncBinary() - _ = yym531 + yym540 := z.EncBinary() + _ = yym540 if false { } else { r.EncodeInt(int64(x.KubeAPIBurst)) @@ -4562,17 +4629,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeAPIBurst")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym532 := z.EncBinary() - _ = yym532 + yym541 := z.EncBinary() + _ = yym541 if false { } else { r.EncodeInt(int64(x.KubeAPIBurst)) } } - if yyr505 || yy2arr505 { + if yyr514 || yy2arr514 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym534 := z.EncBinary() - _ = yym534 + yym543 := z.EncBinary() + _ = yym543 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName)) @@ -4581,25 +4648,25 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("schedulerName")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym535 := z.EncBinary() - _ = yym535 + yym544 := z.EncBinary() + _ = yym544 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName)) } } - if yyr505 || yy2arr505 { + if yyr514 || yy2arr514 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy537 := &x.LeaderElection - yy537.CodecEncodeSelf(e) + yy546 := &x.LeaderElection + yy546.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("leaderElection")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy538 := &x.LeaderElection - yy538.CodecEncodeSelf(e) + yy547 := &x.LeaderElection + yy547.CodecEncodeSelf(e) } - if yyr505 || yy2arr505 { + if yyr514 || yy2arr514 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -4612,25 +4679,25 @@ func (x *KubeSchedulerConfiguration) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym539 := z.DecBinary() - _ = yym539 + yym548 := z.DecBinary() + _ = yym548 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct540 := r.ContainerType() - if yyct540 == codecSelferValueTypeMap1234 { - yyl540 := r.ReadMapStart() - if yyl540 == 0 { + yyct549 := r.ContainerType() + if yyct549 == codecSelferValueTypeMap1234 { + yyl549 := r.ReadMapStart() + if yyl549 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl540, d) + x.codecDecodeSelfFromMap(yyl549, d) } - } else if yyct540 == codecSelferValueTypeArray1234 { - yyl540 := r.ReadArrayStart() - if yyl540 == 0 { + } else if yyct549 == codecSelferValueTypeArray1234 { + yyl549 := r.ReadArrayStart() + if yyl549 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl540, d) + x.codecDecodeSelfFromArray(yyl549, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -4642,12 +4709,12 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromMap(l int, d *codec1978. var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys541Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys541Slc - var yyhl541 bool = l >= 0 - for yyj541 := 0; ; yyj541++ { - if yyhl541 { - if yyj541 >= l { + var yys550Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys550Slc + var yyhl550 bool = l >= 0 + for yyj550 := 0; ; yyj550++ { + if yyhl550 { + if yyj550 >= l { break } } else { @@ -4656,10 +4723,10 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromMap(l int, d *codec1978. } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys541Slc = r.DecodeBytes(yys541Slc, true, true) - yys541 := string(yys541Slc) + yys550Slc = r.DecodeBytes(yys550Slc, true, true) + yys550 := string(yys550Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys541 { + switch yys550 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -4724,13 +4791,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromMap(l int, d *codec1978. if r.TryDecodeAsNil() { x.LeaderElection = LeaderElectionConfiguration{} } else { - yyv552 := &x.LeaderElection - yyv552.CodecDecodeSelf(d) + yyv561 := &x.LeaderElection + yyv561.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys541) - } // end switch yys541 - } // end for yyj541 + z.DecStructFieldNotFound(-1, yys550) + } // end switch yys550 + } // end for yyj550 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -4738,16 +4805,16 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj553 int - var yyb553 bool - var yyhl553 bool = l >= 0 - yyj553++ - if yyhl553 { - yyb553 = yyj553 > l + var yyj562 int + var yyb562 bool + var yyhl562 bool = l >= 0 + yyj562++ + if yyhl562 { + yyb562 = yyj562 > l } else { - yyb553 = r.CheckBreak() + yyb562 = r.CheckBreak() } - if yyb553 { + if yyb562 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4757,13 +4824,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.Kind = string(r.DecodeString()) } - yyj553++ - if yyhl553 { - yyb553 = yyj553 > l + yyj562++ + if yyhl562 { + yyb562 = yyj562 > l } else { - yyb553 = r.CheckBreak() + yyb562 = r.CheckBreak() } - if yyb553 { + if yyb562 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4773,13 +4840,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.APIVersion = string(r.DecodeString()) } - yyj553++ - if yyhl553 { - yyb553 = yyj553 > l + yyj562++ + if yyhl562 { + yyb562 = yyj562 > l } else { - yyb553 = r.CheckBreak() + yyb562 = r.CheckBreak() } - if yyb553 { + if yyb562 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4789,13 +4856,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.Port = int(r.DecodeInt(codecSelferBitsize1234)) } - yyj553++ - if yyhl553 { - yyb553 = yyj553 > l + yyj562++ + if yyhl562 { + yyb562 = yyj562 > l } else { - yyb553 = r.CheckBreak() + yyb562 = r.CheckBreak() } - if yyb553 { + if yyb562 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4805,13 +4872,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.Address = string(r.DecodeString()) } - yyj553++ - if yyhl553 { - yyb553 = yyj553 > l + yyj562++ + if yyhl562 { + yyb562 = yyj562 > l } else { - yyb553 = r.CheckBreak() + yyb562 = r.CheckBreak() } - if yyb553 { + if yyb562 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4821,13 +4888,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.AlgorithmProvider = string(r.DecodeString()) } - yyj553++ - if yyhl553 { - yyb553 = yyj553 > l + yyj562++ + if yyhl562 { + yyb562 = yyj562 > l } else { - yyb553 = r.CheckBreak() + yyb562 = r.CheckBreak() } - if yyb553 { + if yyb562 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4837,13 +4904,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.PolicyConfigFile = string(r.DecodeString()) } - yyj553++ - if yyhl553 { - yyb553 = yyj553 > l + yyj562++ + if yyhl562 { + yyb562 = yyj562 > l } else { - yyb553 = r.CheckBreak() + yyb562 = r.CheckBreak() } - if yyb553 { + if yyb562 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4853,13 +4920,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.EnableProfiling = bool(r.DecodeBool()) } - yyj553++ - if yyhl553 { - yyb553 = yyj553 > l + yyj562++ + if yyhl562 { + yyb562 = yyj562 > l } else { - yyb553 = r.CheckBreak() + yyb562 = r.CheckBreak() } - if yyb553 { + if yyb562 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4869,13 +4936,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.KubeAPIQPS = float32(r.DecodeFloat(true)) } - yyj553++ - if yyhl553 { - yyb553 = yyj553 > l + yyj562++ + if yyhl562 { + yyb562 = yyj562 > l } else { - yyb553 = r.CheckBreak() + yyb562 = r.CheckBreak() } - if yyb553 { + if yyb562 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4885,13 +4952,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.KubeAPIBurst = int(r.DecodeInt(codecSelferBitsize1234)) } - yyj553++ - if yyhl553 { - yyb553 = yyj553 > l + yyj562++ + if yyhl562 { + yyb562 = yyj562 > l } else { - yyb553 = r.CheckBreak() + yyb562 = r.CheckBreak() } - if yyb553 { + if yyb562 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4901,13 +4968,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.SchedulerName = string(r.DecodeString()) } - yyj553++ - if yyhl553 { - yyb553 = yyj553 > l + yyj562++ + if yyhl562 { + yyb562 = yyj562 > l } else { - yyb553 = r.CheckBreak() + yyb562 = r.CheckBreak() } - if yyb553 { + if yyb562 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4915,21 +4982,21 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 if r.TryDecodeAsNil() { x.LeaderElection = LeaderElectionConfiguration{} } else { - yyv564 := &x.LeaderElection - yyv564.CodecDecodeSelf(d) + yyv573 := &x.LeaderElection + yyv573.CodecDecodeSelf(d) } for { - yyj553++ - if yyhl553 { - yyb553 = yyj553 > l + yyj562++ + if yyhl562 { + yyb562 = yyj562 > l } else { - yyb553 = r.CheckBreak() + yyb562 = r.CheckBreak() } - if yyb553 { + if yyb562 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj553-1, "") + z.DecStructFieldNotFound(yyj562-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -4941,33 +5008,33 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym565 := z.EncBinary() - _ = yym565 + yym574 := z.EncBinary() + _ = yym574 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep566 := !z.EncBinary() - yy2arr566 := z.EncBasicHandle().StructToArray - var yyq566 [4]bool - _, _, _ = yysep566, yyq566, yy2arr566 - const yyr566 bool = false - var yynn566 int - if yyr566 || yy2arr566 { + yysep575 := !z.EncBinary() + yy2arr575 := z.EncBasicHandle().StructToArray + var yyq575 [4]bool + _, _, _ = yysep575, yyq575, yy2arr575 + const yyr575 bool = false + var yynn575 int + if yyr575 || yy2arr575 { r.EncodeArrayStart(4) } else { - yynn566 = 4 - for _, b := range yyq566 { + yynn575 = 4 + for _, b := range yyq575 { if b { - yynn566++ + yynn575++ } } - r.EncodeMapStart(yynn566) - yynn566 = 0 + r.EncodeMapStart(yynn575) + yynn575 = 0 } - if yyr566 || yy2arr566 { + if yyr575 || yy2arr575 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym568 := z.EncBinary() - _ = yym568 + yym577 := z.EncBinary() + _ = yym577 if false { } else { r.EncodeBool(bool(x.LeaderElect)) @@ -4976,95 +5043,95 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("leaderElect")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym569 := z.EncBinary() - _ = yym569 + yym578 := z.EncBinary() + _ = yym578 if false { } else { r.EncodeBool(bool(x.LeaderElect)) } } - if yyr566 || yy2arr566 { + if yyr575 || yy2arr575 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy571 := &x.LeaseDuration - yym572 := z.EncBinary() - _ = yym572 + yy580 := &x.LeaseDuration + yym581 := z.EncBinary() + _ = yym581 if false { - } else if z.HasExtensions() && z.EncExt(yy571) { - } else if !yym572 && z.IsJSONHandle() { - z.EncJSONMarshal(yy571) + } else if z.HasExtensions() && z.EncExt(yy580) { + } else if !yym581 && z.IsJSONHandle() { + z.EncJSONMarshal(yy580) } else { - z.EncFallback(yy571) + z.EncFallback(yy580) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("leaseDuration")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy573 := &x.LeaseDuration - yym574 := z.EncBinary() - _ = yym574 + yy582 := &x.LeaseDuration + yym583 := z.EncBinary() + _ = yym583 if false { - } else if z.HasExtensions() && z.EncExt(yy573) { - } else if !yym574 && z.IsJSONHandle() { - z.EncJSONMarshal(yy573) + } else if z.HasExtensions() && z.EncExt(yy582) { + } else if !yym583 && z.IsJSONHandle() { + z.EncJSONMarshal(yy582) } else { - z.EncFallback(yy573) + z.EncFallback(yy582) } } - if yyr566 || yy2arr566 { + if yyr575 || yy2arr575 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy576 := &x.RenewDeadline - yym577 := z.EncBinary() - _ = yym577 + yy585 := &x.RenewDeadline + yym586 := z.EncBinary() + _ = yym586 if false { - } else if z.HasExtensions() && z.EncExt(yy576) { - } else if !yym577 && z.IsJSONHandle() { - z.EncJSONMarshal(yy576) + } else if z.HasExtensions() && z.EncExt(yy585) { + } else if !yym586 && z.IsJSONHandle() { + z.EncJSONMarshal(yy585) } else { - z.EncFallback(yy576) + z.EncFallback(yy585) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("renewDeadline")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy578 := &x.RenewDeadline - yym579 := z.EncBinary() - _ = yym579 + yy587 := &x.RenewDeadline + yym588 := z.EncBinary() + _ = yym588 if false { - } else if z.HasExtensions() && z.EncExt(yy578) { - } else if !yym579 && z.IsJSONHandle() { - z.EncJSONMarshal(yy578) + } else if z.HasExtensions() && z.EncExt(yy587) { + } else if !yym588 && z.IsJSONHandle() { + z.EncJSONMarshal(yy587) } else { - z.EncFallback(yy578) + z.EncFallback(yy587) } } - if yyr566 || yy2arr566 { + if yyr575 || yy2arr575 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy581 := &x.RetryPeriod - yym582 := z.EncBinary() - _ = yym582 + yy590 := &x.RetryPeriod + yym591 := z.EncBinary() + _ = yym591 if false { - } else if z.HasExtensions() && z.EncExt(yy581) { - } else if !yym582 && z.IsJSONHandle() { - z.EncJSONMarshal(yy581) + } else if z.HasExtensions() && z.EncExt(yy590) { + } else if !yym591 && z.IsJSONHandle() { + z.EncJSONMarshal(yy590) } else { - z.EncFallback(yy581) + z.EncFallback(yy590) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("retryPeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy583 := &x.RetryPeriod - yym584 := z.EncBinary() - _ = yym584 + yy592 := &x.RetryPeriod + yym593 := z.EncBinary() + _ = yym593 if false { - } else if z.HasExtensions() && z.EncExt(yy583) { - } else if !yym584 && z.IsJSONHandle() { - z.EncJSONMarshal(yy583) + } else if z.HasExtensions() && z.EncExt(yy592) { + } else if !yym593 && z.IsJSONHandle() { + z.EncJSONMarshal(yy592) } else { - z.EncFallback(yy583) + z.EncFallback(yy592) } } - if yyr566 || yy2arr566 { + if yyr575 || yy2arr575 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -5077,25 +5144,25 @@ func (x *LeaderElectionConfiguration) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym585 := z.DecBinary() - _ = yym585 + yym594 := z.DecBinary() + _ = yym594 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct586 := r.ContainerType() - if yyct586 == codecSelferValueTypeMap1234 { - yyl586 := r.ReadMapStart() - if yyl586 == 0 { + yyct595 := r.ContainerType() + if yyct595 == codecSelferValueTypeMap1234 { + yyl595 := r.ReadMapStart() + if yyl595 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl586, d) + x.codecDecodeSelfFromMap(yyl595, d) } - } else if yyct586 == codecSelferValueTypeArray1234 { - yyl586 := r.ReadArrayStart() - if yyl586 == 0 { + } else if yyct595 == codecSelferValueTypeArray1234 { + yyl595 := r.ReadArrayStart() + if yyl595 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl586, d) + x.codecDecodeSelfFromArray(yyl595, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -5107,12 +5174,12 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromMap(l int, d *codec1978 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys587Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys587Slc - var yyhl587 bool = l >= 0 - for yyj587 := 0; ; yyj587++ { - if yyhl587 { - if yyj587 >= l { + var yys596Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys596Slc + var yyhl596 bool = l >= 0 + for yyj596 := 0; ; yyj596++ { + if yyhl596 { + if yyj596 >= l { break } } else { @@ -5121,10 +5188,10 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromMap(l int, d *codec1978 } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys587Slc = r.DecodeBytes(yys587Slc, true, true) - yys587 := string(yys587Slc) + yys596Slc = r.DecodeBytes(yys596Slc, true, true) + yys596 := string(yys596Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys587 { + switch yys596 { case "leaderElect": if r.TryDecodeAsNil() { x.LeaderElect = false @@ -5135,51 +5202,51 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromMap(l int, d *codec1978 if r.TryDecodeAsNil() { x.LeaseDuration = pkg1_unversioned.Duration{} } else { - yyv589 := &x.LeaseDuration - yym590 := z.DecBinary() - _ = yym590 + yyv598 := &x.LeaseDuration + yym599 := z.DecBinary() + _ = yym599 if false { - } else if z.HasExtensions() && z.DecExt(yyv589) { - } else if !yym590 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv589) + } else if z.HasExtensions() && z.DecExt(yyv598) { + } else if !yym599 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv598) } else { - z.DecFallback(yyv589, false) + z.DecFallback(yyv598, false) } } case "renewDeadline": if r.TryDecodeAsNil() { x.RenewDeadline = pkg1_unversioned.Duration{} } else { - yyv591 := &x.RenewDeadline - yym592 := z.DecBinary() - _ = yym592 + yyv600 := &x.RenewDeadline + yym601 := z.DecBinary() + _ = yym601 if false { - } else if z.HasExtensions() && z.DecExt(yyv591) { - } else if !yym592 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv591) + } else if z.HasExtensions() && z.DecExt(yyv600) { + } else if !yym601 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv600) } else { - z.DecFallback(yyv591, false) + z.DecFallback(yyv600, false) } } case "retryPeriod": if r.TryDecodeAsNil() { x.RetryPeriod = pkg1_unversioned.Duration{} } else { - yyv593 := &x.RetryPeriod - yym594 := z.DecBinary() - _ = yym594 + yyv602 := &x.RetryPeriod + yym603 := z.DecBinary() + _ = yym603 if false { - } else if z.HasExtensions() && z.DecExt(yyv593) { - } else if !yym594 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv593) + } else if z.HasExtensions() && z.DecExt(yyv602) { + } else if !yym603 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv602) } else { - z.DecFallback(yyv593, false) + z.DecFallback(yyv602, false) } } default: - z.DecStructFieldNotFound(-1, yys587) - } // end switch yys587 - } // end for yyj587 + z.DecStructFieldNotFound(-1, yys596) + } // end switch yys596 + } // end for yyj596 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -5187,16 +5254,16 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj595 int - var yyb595 bool - var yyhl595 bool = l >= 0 - yyj595++ - if yyhl595 { - yyb595 = yyj595 > l + var yyj604 int + var yyb604 bool + var yyhl604 bool = l >= 0 + yyj604++ + if yyhl604 { + yyb604 = yyj604 > l } else { - yyb595 = r.CheckBreak() + yyb604 = r.CheckBreak() } - if yyb595 { + if yyb604 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5206,13 +5273,13 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19 } else { x.LeaderElect = bool(r.DecodeBool()) } - yyj595++ - if yyhl595 { - yyb595 = yyj595 > l + yyj604++ + if yyhl604 { + yyb604 = yyj604 > l } else { - yyb595 = r.CheckBreak() + yyb604 = r.CheckBreak() } - if yyb595 { + if yyb604 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5220,24 +5287,24 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19 if r.TryDecodeAsNil() { x.LeaseDuration = pkg1_unversioned.Duration{} } else { - yyv597 := &x.LeaseDuration - yym598 := z.DecBinary() - _ = yym598 + yyv606 := &x.LeaseDuration + yym607 := z.DecBinary() + _ = yym607 if false { - } else if z.HasExtensions() && z.DecExt(yyv597) { - } else if !yym598 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv597) + } else if z.HasExtensions() && z.DecExt(yyv606) { + } else if !yym607 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv606) } else { - z.DecFallback(yyv597, false) + z.DecFallback(yyv606, false) } } - yyj595++ - if yyhl595 { - yyb595 = yyj595 > l + yyj604++ + if yyhl604 { + yyb604 = yyj604 > l } else { - yyb595 = r.CheckBreak() + yyb604 = r.CheckBreak() } - if yyb595 { + if yyb604 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5245,24 +5312,24 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19 if r.TryDecodeAsNil() { x.RenewDeadline = pkg1_unversioned.Duration{} } else { - yyv599 := &x.RenewDeadline - yym600 := z.DecBinary() - _ = yym600 + yyv608 := &x.RenewDeadline + yym609 := z.DecBinary() + _ = yym609 if false { - } else if z.HasExtensions() && z.DecExt(yyv599) { - } else if !yym600 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv599) + } else if z.HasExtensions() && z.DecExt(yyv608) { + } else if !yym609 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv608) } else { - z.DecFallback(yyv599, false) + z.DecFallback(yyv608, false) } } - yyj595++ - if yyhl595 { - yyb595 = yyj595 > l + yyj604++ + if yyhl604 { + yyb604 = yyj604 > l } else { - yyb595 = r.CheckBreak() + yyb604 = r.CheckBreak() } - if yyb595 { + if yyb604 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5270,29 +5337,29 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19 if r.TryDecodeAsNil() { x.RetryPeriod = pkg1_unversioned.Duration{} } else { - yyv601 := &x.RetryPeriod - yym602 := z.DecBinary() - _ = yym602 + yyv610 := &x.RetryPeriod + yym611 := z.DecBinary() + _ = yym611 if false { - } else if z.HasExtensions() && z.DecExt(yyv601) { - } else if !yym602 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv601) + } else if z.HasExtensions() && z.DecExt(yyv610) { + } else if !yym611 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv610) } else { - z.DecFallback(yyv601, false) + z.DecFallback(yyv610, false) } } for { - yyj595++ - if yyhl595 { - yyb595 = yyj595 > l + yyj604++ + if yyhl604 { + yyb604 = yyj604 > l } else { - yyb595 = r.CheckBreak() + yyb604 = r.CheckBreak() } - if yyb595 { + if yyb604 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj595-1, "") + z.DecStructFieldNotFound(yyj604-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/pkg/apis/componentconfig/types.go b/pkg/apis/componentconfig/types.go index d927d4eef1..d19e0cfe43 100644 --- a/pkg/apis/componentconfig/types.go +++ b/pkg/apis/componentconfig/types.go @@ -209,6 +209,8 @@ type KubeletConfiguration struct { // maintain. When disk space falls below this threshold, new pods would // be rejected. LowDiskSpaceThresholdMB int `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 // various events in kubelet/pod lifecycle NetworkPluginName string `json:"networkPluginName"` diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index 1401a9b50c..671900b444 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -60,6 +60,7 @@ import ( proberesults "k8s.io/kubernetes/pkg/kubelet/prober/results" "k8s.io/kubernetes/pkg/kubelet/rkt" "k8s.io/kubernetes/pkg/kubelet/server" + "k8s.io/kubernetes/pkg/kubelet/server/stats" "k8s.io/kubernetes/pkg/kubelet/status" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/kubelet/util/format" @@ -203,6 +204,7 @@ func NewMainKubelet( nodeIP net.IP, reservation kubetypes.Reservation, enableCustomMetrics bool, + volumeStatsAggPeriod time.Duration, ) (*Kubelet, error) { if rootDirectory == "" { return nil, fmt.Errorf("invalid root directory %q", rootDirectory) @@ -329,6 +331,9 @@ func NewMainKubelet( reservation: reservation, enableCustomMetrics: enableCustomMetrics, } + // TODO: Factor out "StatsProvider" from Kubelet so we don't have a cyclic dependency + klet.resourceAnalyzer = stats.NewResourceAnalyzer(klet, volumeStatsAggPeriod) + if klet.flannelExperimentalOverlay { glog.Infof("Flannel is in charge of podCIDR and overlay networking.") } @@ -610,6 +615,9 @@ type Kubelet struct { // Watcher of out of memory events. oomWatcher OOMWatcher + // Monitor resource usage + resourceAnalyzer stats.ResourceAnalyzer + // If non-empty, pass this to the container runtime as the root cgroup. cgroupRoot string @@ -937,6 +945,9 @@ func (kl *Kubelet) initializeModules() error { if err := kl.oomWatcher.Start(kl.nodeRef); err != nil { return fmt.Errorf("Failed to start OOM watcher %v", err) } + + // Step 7: Start resource analyzer + kl.resourceAnalyzer.Start() return nil } @@ -3459,11 +3470,11 @@ func (kl *Kubelet) GetCachedMachineInfo() (*cadvisorapi.MachineInfo, error) { } func (kl *Kubelet) ListenAndServe(address net.IP, port uint, tlsOptions *server.TLSOptions, auth server.AuthInterface, enableDebuggingHandlers bool) { - server.ListenAndServeKubeletServer(kl, address, port, tlsOptions, auth, enableDebuggingHandlers) + server.ListenAndServeKubeletServer(kl, kl.resourceAnalyzer, address, port, tlsOptions, auth, enableDebuggingHandlers) } func (kl *Kubelet) ListenAndServeReadOnly(address net.IP, port uint) { - server.ListenAndServeKubeletReadOnlyServer(kl, address, port) + server.ListenAndServeKubeletReadOnlyServer(kl, kl.resourceAnalyzer, address, port) } // GetRuntime returns the current Runtime implementation in use by the kubelet. This func diff --git a/pkg/kubelet/metrics/metrics.go b/pkg/kubelet/metrics/metrics.go index 4c8a521594..1463826aa9 100644 --- a/pkg/kubelet/metrics/metrics.go +++ b/pkg/kubelet/metrics/metrics.go @@ -37,6 +37,7 @@ const ( PodWorkerStartLatencyKey = "pod_worker_start_latency_microseconds" PLEGRelistLatencyKey = "pleg_relist_latency_microseconds" PLEGRelistIntervalKey = "pleg_relist_interval_microseconds" + MetricsVolumeCalcLatencyKey = "metrics_volume_calc_microseconds" ) var ( @@ -121,6 +122,13 @@ var ( Help: "Interval in microseconds between relisting in PLEG.", }, ) + MetricsVolumeCalcLatency = prometheus.NewSummary( + prometheus.SummaryOpts{ + Subsystem: KubeletSubsystem, + Name: MetricsVolumeCalcLatencyKey, + Help: "Latency in microseconds for calculating volume metrics.", + }, + ) ) var registerMetrics sync.Once @@ -141,6 +149,7 @@ func Register(containerCache kubecontainer.RuntimeCache) { prometheus.MustRegister(newPodAndContainerCollector(containerCache)) prometheus.MustRegister(PLEGRelistLatency) prometheus.MustRegister(PLEGRelistInterval) + prometheus.MustRegister(MetricsVolumeCalcLatency) }) } diff --git a/pkg/kubelet/server/server.go b/pkg/kubelet/server/server.go index da964e7840..a5f6cfda0d 100644 --- a/pkg/kubelet/server/server.go +++ b/pkg/kubelet/server/server.go @@ -58,13 +58,15 @@ import ( "k8s.io/kubernetes/pkg/util/limitwriter" utilruntime "k8s.io/kubernetes/pkg/util/runtime" "k8s.io/kubernetes/pkg/util/wsstream" + "k8s.io/kubernetes/pkg/volume" ) // Server is a http.Handler which exposes kubelet functionality over HTTP. type Server struct { - auth AuthInterface - host HostInterface - restfulCont containerInterface + auth AuthInterface + host HostInterface + restfulCont containerInterface + resourceAnalyzer stats.ResourceAnalyzer } type TLSOptions struct { @@ -102,9 +104,9 @@ func (a *filteringContainer) RegisteredHandlePaths() []string { } // ListenAndServeKubeletServer initializes a server to respond to HTTP network requests on the Kubelet. -func ListenAndServeKubeletServer(host HostInterface, address net.IP, port uint, tlsOptions *TLSOptions, auth AuthInterface, enableDebuggingHandlers bool) { +func ListenAndServeKubeletServer(host HostInterface, resourceAnalyzer stats.ResourceAnalyzer, address net.IP, port uint, tlsOptions *TLSOptions, auth AuthInterface, enableDebuggingHandlers bool) { glog.Infof("Starting to listen on %s:%d", address, port) - handler := NewServer(host, auth, enableDebuggingHandlers) + handler := NewServer(host, resourceAnalyzer, auth, enableDebuggingHandlers) s := &http.Server{ Addr: net.JoinHostPort(address.String(), strconv.FormatUint(uint64(port), 10)), Handler: &handler, @@ -119,9 +121,9 @@ func ListenAndServeKubeletServer(host HostInterface, address net.IP, port uint, } // ListenAndServeKubeletReadOnlyServer initializes a server to respond to HTTP network requests on the Kubelet. -func ListenAndServeKubeletReadOnlyServer(host HostInterface, address net.IP, port uint) { +func ListenAndServeKubeletReadOnlyServer(host HostInterface, resourceAnalyzer stats.ResourceAnalyzer, address net.IP, port uint) { glog.V(1).Infof("Starting to listen read-only on %s:%d", address, port) - s := NewServer(host, nil, false) + s := NewServer(host, resourceAnalyzer, nil, false) server := &http.Server{ Addr: net.JoinHostPort(address.String(), strconv.FormatUint(uint64(port), 10)), @@ -162,14 +164,16 @@ type HostInterface interface { LatestLoopEntryTime() time.Time DockerImagesFsInfo() (cadvisorapiv2.FsInfo, error) RootFsInfo() (cadvisorapiv2.FsInfo, error) + ListVolumesForPod(podUID types.UID) (map[string]volume.Volume, bool) } // NewServer initializes and configures a kubelet.Server object to handle HTTP requests. -func NewServer(host HostInterface, auth AuthInterface, enableDebuggingHandlers bool) Server { +func NewServer(host HostInterface, resourceAnalyzer stats.ResourceAnalyzer, auth AuthInterface, enableDebuggingHandlers bool) Server { server := Server{ - host: host, - auth: auth, - restfulCont: &filteringContainer{Container: restful.NewContainer()}, + host: host, + resourceAnalyzer: resourceAnalyzer, + auth: auth, + restfulCont: &filteringContainer{Container: restful.NewContainer()}, } if auth != nil { server.InstallAuthFilter() @@ -229,7 +233,7 @@ func (s *Server) InstallDefaultHandlers() { Operation("getPods")) s.restfulCont.Add(ws) - s.restfulCont.Add(stats.CreateHandlers(s.host)) + s.restfulCont.Add(stats.CreateHandlers(s.host, s.resourceAnalyzer)) s.restfulCont.Handle("/metrics", prometheus.Handler()) ws = new(restful.WebService) diff --git a/pkg/kubelet/server/server_test.go b/pkg/kubelet/server/server_test.go index 15ec5512e2..5854c4ed52 100644 --- a/pkg/kubelet/server/server_test.go +++ b/pkg/kubelet/server/server_test.go @@ -41,11 +41,13 @@ import ( "k8s.io/kubernetes/pkg/auth/user" "k8s.io/kubernetes/pkg/kubelet/cm" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/pkg/kubelet/server/stats" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/types" "k8s.io/kubernetes/pkg/util/httpstream" "k8s.io/kubernetes/pkg/util/httpstream/spdy" "k8s.io/kubernetes/pkg/util/sets" + "k8s.io/kubernetes/pkg/volume" ) type fakeKubelet struct { @@ -147,6 +149,10 @@ func (_ *fakeKubelet) RootFsInfo() (cadvisorapiv2.FsInfo, error) { func (_ *fakeKubelet) GetNode() (*api.Node, error) { return nil, nil } func (_ *fakeKubelet) GetNodeConfig() cm.NodeConfig { return cm.NodeConfig{} } +func (fk *fakeKubelet) ListVolumesForPod(podUID types.UID) (map[string]volume.Volume, bool) { + return map[string]volume.Volume{}, true +} + type fakeAuth struct { authenticateFunc func(*http.Request) (user.Info, bool, error) attributesFunc func(user.Info, *http.Request) authorizer.Attributes @@ -196,7 +202,11 @@ func newServerTest() *serverTestFramework { return nil }, } - server := NewServer(fw.fakeKubelet, fw.fakeAuth, true) + server := NewServer( + fw.fakeKubelet, + stats.NewResourceAnalyzer(fw.fakeKubelet, time.Minute), + fw.fakeAuth, + true) fw.serverUnderTest = &server // TODO: Close() this when fix #19254 fw.testHTTPServer = httptest.NewServer(fw.serverUnderTest) diff --git a/pkg/kubelet/server/stats/fs_resource_analyzer.go b/pkg/kubelet/server/stats/fs_resource_analyzer.go new file mode 100644 index 0000000000..f988e7a20b --- /dev/null +++ b/pkg/kubelet/server/stats/fs_resource_analyzer.go @@ -0,0 +1,153 @@ +/* +Copyright 2016 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. +*/ + +package stats + +import ( + "sync/atomic" + "time" + + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/kubelet/metrics" + "k8s.io/kubernetes/pkg/kubelet/util/format" + "k8s.io/kubernetes/pkg/types" + "k8s.io/kubernetes/pkg/util" + "k8s.io/kubernetes/pkg/volume" + + "github.com/golang/glog" +) + +// Map to PodVolumeStats pointers since the addresses for map values are not constant and can cause pain +// if we need ever to get a pointer to one of the values (e.g. you can't) +type Cache map[types.UID]*PodVolumeStats + +// PodVolumeStats encapsulates all VolumeStats for a pod +type PodVolumeStats struct { + Volumes []VolumeStats +} + +// fsResourceAnalyzerInterface is for embedding fs functions into ResourceAnalyzer +type fsResourceAnalyzerInterface interface { + GetPodVolumeStats(uid types.UID) (PodVolumeStats, bool) +} + +// diskResourceAnalyzer provider stats about fs resource usage +type fsResourceAnalyzer struct { + statsProvider StatsProvider + calcVolumePeriod time.Duration + cachedVolumeStats atomic.Value +} + +var _ fsResourceAnalyzerInterface = &fsResourceAnalyzer{} + +// newFsResourceAnalyzer returns a new fsResourceAnalyzer implementation +func newFsResourceAnalyzer(statsProvider StatsProvider, calcVolumePeriod time.Duration) *fsResourceAnalyzer { + return &fsResourceAnalyzer{ + statsProvider: statsProvider, + calcVolumePeriod: calcVolumePeriod, + } +} + +// Start eager background caching of volume stats. +func (s *fsResourceAnalyzer) Start() { + if s.calcVolumePeriod <= 0 { + glog.Info("Volume stats collection disabled.") + return + } + glog.Info("Starting FS ResourceAnalyzer") + go util.Forever(func() { + startTime := time.Now() + s.updateCachedPodVolumeStats() + glog.V(3).Infof("Finished calculating volume stats in %v.", time.Now().Sub(startTime)) + metrics.MetricsVolumeCalcLatency.Observe(metrics.SinceInMicroseconds(startTime)) + }, s.calcVolumePeriod) +} + +// updateCachedPodVolumeStats calculates and caches the PodVolumeStats for every Pod known to the kubelet. +func (s *fsResourceAnalyzer) updateCachedPodVolumeStats() { + // Calculate the new volume stats map + pods := s.statsProvider.GetPods() + newCache := make(Cache) + // TODO: Prevent 1 pod metrics hanging from blocking other pods. Schedule pods independently and spaced + // evenly across the period to prevent cpu spikes. Ideally resource collection consumes the resources + // allocated to the pod itself to isolate bad actors. + // See issue #20675 + for _, pod := range pods { + podUid := pod.GetUID() + stats, found := s.getPodVolumeStats(pod) + if !found { + glog.Warningf("Could not locate volumes for pod %s", format.Pod(pod)) + continue + } + newCache[podUid] = &stats + } + // Update the cache reference + s.cachedVolumeStats.Store(newCache) +} + +// getPodVolumeStats calculates PodVolumeStats for a given pod and returns the result. +func (s *fsResourceAnalyzer) getPodVolumeStats(pod *api.Pod) (PodVolumeStats, bool) { + // Find all Volumes for the Pod + volumes, found := s.statsProvider.ListVolumesForPod(pod.UID) + if !found { + return PodVolumeStats{}, found + } + + // Call GetMetrics on each Volume and copy the result to a new VolumeStats.FsStats + stats := make([]VolumeStats, 0, len(volumes)) + for name, v := range volumes { + metric, err := v.GetMetrics() + if err != nil { + // Expected for Volumes that don't support Metrics + // TODO: Disambiguate unsupported from errors + // See issue #20676 + glog.V(4).Infof("Failed to calculate volume metrics for pod %s volume %s: %+v", + format.Pod(pod), name, err) + continue + } + stats = append(stats, s.parsePodVolumeStats(name, metric)) + } + return PodVolumeStats{Volumes: stats}, true +} + +func (s *fsResourceAnalyzer) parsePodVolumeStats(podName string, metric *volume.Metrics) VolumeStats { + available := uint64(metric.Available.Value()) + capacity := uint64(metric.Capacity.Value()) + used := uint64((metric.Used.Value())) + return VolumeStats{ + Name: podName, + FsStats: FsStats{ + AvailableBytes: &available, + CapacityBytes: &capacity, + UsedBytes: &used}} +} + +// GetPodVolumeStats returns the PodVolumeStats for a given pod. Results are looked up from a cache that +// is eagerly populated in the background, and never calculated on the fly. +func (s *fsResourceAnalyzer) GetPodVolumeStats(uid types.UID) (PodVolumeStats, bool) { + // Cache hasn't been initialized yet + if s.cachedVolumeStats.Load() == nil { + return PodVolumeStats{}, false + } + cache := s.cachedVolumeStats.Load().(Cache) + stats, f := cache[uid] + if !f { + // TODO: Differentiate between stats being empty + // See issue #20679 + return PodVolumeStats{}, false + } + return *stats, true +} diff --git a/pkg/kubelet/server/stats/fs_resource_analyzer_test.go b/pkg/kubelet/server/stats/fs_resource_analyzer_test.go new file mode 100644 index 0000000000..3c0d28c92e --- /dev/null +++ b/pkg/kubelet/server/stats/fs_resource_analyzer_test.go @@ -0,0 +1,178 @@ +/* +Copyright 2016 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. +*/ + +package stats + +import ( + "fmt" + "testing" + "time" + + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/resource" + "k8s.io/kubernetes/pkg/types" + "k8s.io/kubernetes/pkg/volume" + + "github.com/stretchr/testify/assert" +) + +// TestGetPodVolumeStats tests that GetPodVolumeStats reads from the cache and returns the value +func TestGetPodVolumeStats(t *testing.T) { + instance := newFsResourceAnalyzer(&MockStatsProvider{}, time.Minute*5) + stats, found := instance.GetPodVolumeStats("testpod1") + assert.False(t, found) + assert.Equal(t, PodVolumeStats{}, stats) + + instance.cachedVolumeStats.Store(make(Cache)) + stats, found = instance.GetPodVolumeStats("testpod1") + assert.False(t, found) + assert.Equal(t, PodVolumeStats{}, stats) + + available := uint64(100) + used := uint64(200) + capacity := uint64(400) + vs1 := VolumeStats{ + Name: "vol1", + FsStats: FsStats{ + AvailableBytes: &available, + UsedBytes: &used, + CapacityBytes: &capacity, + }, + } + pvs := &PodVolumeStats{ + Volumes: []VolumeStats{vs1}, + } + + instance.cachedVolumeStats.Load().(Cache)["testpod1"] = pvs + stats, found = instance.GetPodVolumeStats("testpod1") + assert.True(t, found) + assert.Equal(t, *pvs, stats) +} + +// TestUpdateCachedPodVolumeStats tests that the cache is updated from the stats provider +func TestUpdateCachedPodVolumeStats(t *testing.T) { + statsPr := &MockStatsProvider{} + instance := newFsResourceAnalyzer(statsPr, time.Minute*5) + + // Mock retrieving pods + pods := []*api.Pod{ + {ObjectMeta: api.ObjectMeta{UID: "testpod1"}}, + {ObjectMeta: api.ObjectMeta{UID: "testpod2"}}, + } + statsPr.On("GetPods").Return(pods) + + // Mock volumes for pod1 + m1 := &volume.Metrics{ + Available: resource.NewQuantity(100, resource.DecimalSI), + Used: resource.NewQuantity(200, resource.DecimalSI), + Capacity: resource.NewQuantity(400, resource.DecimalSI), + } + v1 := &volume.MockVolume{} + v1.On("GetMetrics").Return(m1, nil) + + m2 := &volume.Metrics{ + Available: resource.NewQuantity(600, resource.DecimalSI), + Used: resource.NewQuantity(700, resource.DecimalSI), + Capacity: resource.NewQuantity(1400, resource.DecimalSI), + } + v2 := &volume.MockVolume{} + v2.On("GetMetrics").Return(m2, nil) + tp1Volumes := map[string]volume.Volume{ + "v1": v1, + "v2": v2, + } + statsPr.On("ListVolumesForPod", types.UID("testpod1")).Return(tp1Volumes, true) + + // Mock volumes for pod2 + m3 := &volume.Metrics{ + Available: resource.NewQuantity(800, resource.DecimalSI), + Used: resource.NewQuantity(900, resource.DecimalSI), + Capacity: resource.NewQuantity(1800, resource.DecimalSI), + } + v3 := &volume.MockVolume{} + v3.On("GetMetrics").Return(m3, nil) + v4 := &volume.MockVolume{} + v4.On("GetMetrics").Return(nil, fmt.Errorf("Error calculating stats")) + tp2Volumes := map[string]volume.Volume{ + "v3": v3, + "v4": v4, + } + statsPr.On("ListVolumesForPod", types.UID("testpod2")).Return(tp2Volumes, true) + + instance.updateCachedPodVolumeStats() + + actual1, found := instance.GetPodVolumeStats("testpod1") + assert.True(t, found) + assert.Len(t, actual1.Volumes, 2) + v1available := uint64(100) + v1used := uint64(200) + v1capacity := uint64(400) + assert.Contains(t, actual1.Volumes, VolumeStats{ + Name: "v1", + FsStats: FsStats{ + AvailableBytes: &v1available, + UsedBytes: &v1used, + CapacityBytes: &v1capacity, + }, + }) + + v2available := uint64(600) + v2used := uint64(700) + v2capacity := uint64(1400) + assert.Contains(t, actual1.Volumes, VolumeStats{ + Name: "v2", + FsStats: FsStats{ + AvailableBytes: &v2available, + UsedBytes: &v2used, + CapacityBytes: &v2capacity, + }, + }) + + v3available := uint64(800) + v3used := uint64(900) + v3capacity := uint64(1800) + actual2, found := instance.GetPodVolumeStats("testpod2") + assert.True(t, found) + assert.Len(t, actual2.Volumes, 1) + assert.Contains(t, actual2.Volumes, VolumeStats{ + Name: "v3", + FsStats: FsStats{ + AvailableBytes: &v3available, + UsedBytes: &v3used, + CapacityBytes: &v3capacity, + }, + }) + + // Make sure the cache gets updated. The mocking libraries have trouble + pods = []*api.Pod{ + {ObjectMeta: api.ObjectMeta{UID: "testpod3"}}, + } + statsPr.On("GetPods").Return(pods) + + // pod3 volumes + m1 = &volume.Metrics{ + Available: resource.NewQuantity(150, resource.DecimalSI), + Used: resource.NewQuantity(200, resource.DecimalSI), + Capacity: resource.NewQuantity(600, resource.DecimalSI), + } + v1 = &volume.MockVolume{} + v1.On("GetMetrics").Return(m1, nil) + + tp1Volumes = map[string]volume.Volume{ + "v1": v1, + } + statsPr.On("ListVolumesForPod", types.UID("testpod3")).Return(tp1Volumes, true) +} diff --git a/pkg/kubelet/server/stats/handler.go b/pkg/kubelet/server/stats/handler.go index 9edaca80b5..2175f3eca3 100644 --- a/pkg/kubelet/server/stats/handler.go +++ b/pkg/kubelet/server/stats/handler.go @@ -33,6 +33,7 @@ import ( "k8s.io/kubernetes/pkg/kubelet/cm" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/types" + "k8s.io/kubernetes/pkg/volume" ) // Host methods required by stats handlers. @@ -45,6 +46,8 @@ type StatsProvider interface { GetNodeConfig() cm.NodeConfig DockerImagesFsInfo() (cadvisorapiv2.FsInfo, error) RootFsInfo() (cadvisorapiv2.FsInfo, error) + ListVolumesForPod(podUID types.UID) (map[string]volume.Volume, bool) + GetPods() []*api.Pod } type handler struct { @@ -52,8 +55,8 @@ type handler struct { summaryProvider SummaryProvider } -func CreateHandlers(provider StatsProvider) *restful.WebService { - h := &handler{provider, NewSummaryProvider(provider)} +func CreateHandlers(provider StatsProvider, resourceAnalyzer ResourceAnalyzer) *restful.WebService { + h := &handler{provider, NewSummaryProvider(provider, resourceAnalyzer)} ws := &restful.WebService{} ws.Path("/stats/"). diff --git a/pkg/kubelet/server/stats/mock_stats_provider.go b/pkg/kubelet/server/stats/mock_stats_provider.go new file mode 100644 index 0000000000..b95a823d25 --- /dev/null +++ b/pkg/kubelet/server/stats/mock_stats_provider.go @@ -0,0 +1,244 @@ +/* +Copyright 2016 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. +*/ + +package stats + +import "github.com/stretchr/testify/mock" + +import cadvisorapi "github.com/google/cadvisor/info/v1" +import cadvisorapiv2 "github.com/google/cadvisor/info/v2" +import "k8s.io/kubernetes/pkg/api" +import "k8s.io/kubernetes/pkg/kubelet/cm" + +import "k8s.io/kubernetes/pkg/types" +import "k8s.io/kubernetes/pkg/volume" + +// DO NOT EDIT +// GENERATED BY mockery + +type MockStatsProvider struct { + mock.Mock +} + +// GetContainerInfo provides a mock function with given fields: podFullName, uid, containerName, req +func (_m *MockStatsProvider) GetContainerInfo(podFullName string, uid types.UID, containerName string, req *cadvisorapi.ContainerInfoRequest) (*cadvisorapi.ContainerInfo, error) { + ret := _m.Called(podFullName, uid, containerName, req) + + var r0 *cadvisorapi.ContainerInfo + if rf, ok := ret.Get(0).(func(string, types.UID, string, *cadvisorapi.ContainerInfoRequest) *cadvisorapi.ContainerInfo); ok { + r0 = rf(podFullName, uid, containerName, req) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cadvisorapi.ContainerInfo) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(string, types.UID, string, *cadvisorapi.ContainerInfoRequest) error); ok { + r1 = rf(podFullName, uid, containerName, req) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetContainerInfoV2 provides a mock function with given fields: name, options +func (_m *MockStatsProvider) GetContainerInfoV2(name string, options cadvisorapiv2.RequestOptions) (map[string]cadvisorapiv2.ContainerInfo, error) { + ret := _m.Called(name, options) + + var r0 map[string]cadvisorapiv2.ContainerInfo + if rf, ok := ret.Get(0).(func(string, cadvisorapiv2.RequestOptions) map[string]cadvisorapiv2.ContainerInfo); ok { + r0 = rf(name, options) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(map[string]cadvisorapiv2.ContainerInfo) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(string, cadvisorapiv2.RequestOptions) error); ok { + r1 = rf(name, options) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetRawContainerInfo provides a mock function with given fields: containerName, req, subcontainers +func (_m *MockStatsProvider) GetRawContainerInfo(containerName string, req *cadvisorapi.ContainerInfoRequest, subcontainers bool) (map[string]*cadvisorapi.ContainerInfo, error) { + ret := _m.Called(containerName, req, subcontainers) + + var r0 map[string]*cadvisorapi.ContainerInfo + if rf, ok := ret.Get(0).(func(string, *cadvisorapi.ContainerInfoRequest, bool) map[string]*cadvisorapi.ContainerInfo); ok { + r0 = rf(containerName, req, subcontainers) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(map[string]*cadvisorapi.ContainerInfo) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(string, *cadvisorapi.ContainerInfoRequest, bool) error); ok { + r1 = rf(containerName, req, subcontainers) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetPodByName provides a mock function with given fields: namespace, name +func (_m *MockStatsProvider) GetPodByName(namespace string, name string) (*api.Pod, bool) { + ret := _m.Called(namespace, name) + + var r0 *api.Pod + if rf, ok := ret.Get(0).(func(string, string) *api.Pod); ok { + r0 = rf(namespace, name) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*api.Pod) + } + } + + var r1 bool + if rf, ok := ret.Get(1).(func(string, string) bool); ok { + r1 = rf(namespace, name) + } else { + r1 = ret.Get(1).(bool) + } + + return r0, r1 +} + +// GetNode provides a mock function with given fields: +func (_m *MockStatsProvider) GetNode() (*api.Node, error) { + ret := _m.Called() + + var r0 *api.Node + if rf, ok := ret.Get(0).(func() *api.Node); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*api.Node) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetNodeConfig provides a mock function with given fields: +func (_m *MockStatsProvider) GetNodeConfig() cm.NodeConfig { + ret := _m.Called() + + var r0 cm.NodeConfig + if rf, ok := ret.Get(0).(func() cm.NodeConfig); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(cm.NodeConfig) + } + + return r0 +} + +// DockerImagesFsInfo provides a mock function with given fields: +func (_m *MockStatsProvider) DockerImagesFsInfo() (cadvisorapiv2.FsInfo, error) { + ret := _m.Called() + + var r0 cadvisorapiv2.FsInfo + if rf, ok := ret.Get(0).(func() cadvisorapiv2.FsInfo); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(cadvisorapiv2.FsInfo) + } + + var r1 error + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RootFsInfo provides a mock function with given fields: +func (_m *MockStatsProvider) RootFsInfo() (cadvisorapiv2.FsInfo, error) { + ret := _m.Called() + + var r0 cadvisorapiv2.FsInfo + if rf, ok := ret.Get(0).(func() cadvisorapiv2.FsInfo); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(cadvisorapiv2.FsInfo) + } + + var r1 error + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ListVolumesForPod provides a mock function with given fields: podUID +func (_m *MockStatsProvider) ListVolumesForPod(podUID types.UID) (map[string]volume.Volume, bool) { + ret := _m.Called(podUID) + + var r0 map[string]volume.Volume + if rf, ok := ret.Get(0).(func(types.UID) map[string]volume.Volume); ok { + r0 = rf(podUID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(map[string]volume.Volume) + } + } + + var r1 bool + if rf, ok := ret.Get(1).(func(types.UID) bool); ok { + r1 = rf(podUID) + } else { + r1 = ret.Get(1).(bool) + } + + return r0, r1 +} + +// GetPods provides a mock function with given fields: +func (_m *MockStatsProvider) GetPods() []*api.Pod { + ret := _m.Called() + + var r0 []*api.Pod + if rf, ok := ret.Get(0).(func() []*api.Pod); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*api.Pod) + } + } + + return r0 +} diff --git a/pkg/kubelet/server/stats/resource_analyzer.go b/pkg/kubelet/server/stats/resource_analyzer.go new file mode 100644 index 0000000000..34f05d75af --- /dev/null +++ b/pkg/kubelet/server/stats/resource_analyzer.go @@ -0,0 +1,43 @@ +/* +Copyright 2016 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. +*/ + +package stats + +import "time" + +// ResourceAnalyzer provides statistics on node resource consumption +type ResourceAnalyzer interface { + Start() + + fsResourceAnalyzerInterface +} + +// resourceAnalyzer implements ResourceAnalyzer +type resourceAnalyzer struct { + *fsResourceAnalyzer +} + +var _ ResourceAnalyzer = &resourceAnalyzer{} + +// NewResourceAnalyzer returns a new ResourceAnalyzer +func NewResourceAnalyzer(statsProvider StatsProvider, calVolumeFrequency time.Duration) ResourceAnalyzer { + return &resourceAnalyzer{newFsResourceAnalyzer(statsProvider, calVolumeFrequency)} +} + +// Start starts background functions necessary for the ResourceAnalyzer to function +func (ra *resourceAnalyzer) Start() { + ra.fsResourceAnalyzer.Start() +} diff --git a/pkg/kubelet/server/stats/summary.go b/pkg/kubelet/server/stats/summary.go index 0e03c7fa6b..4f5fba9a17 100644 --- a/pkg/kubelet/server/stats/summary.go +++ b/pkg/kubelet/server/stats/summary.go @@ -18,16 +18,19 @@ package stats import ( "fmt" + "runtime" "time" - "github.com/golang/glog" - cadvisorapiv1 "github.com/google/cadvisor/info/v1" - cadvisorapiv2 "github.com/google/cadvisor/info/v2" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/kubelet/cm" "k8s.io/kubernetes/pkg/kubelet/dockertools" "k8s.io/kubernetes/pkg/kubelet/leaky" + "k8s.io/kubernetes/pkg/types" + + "github.com/golang/glog" + cadvisorapiv1 "github.com/google/cadvisor/info/v1" + cadvisorapiv2 "github.com/google/cadvisor/info/v2" ) type SummaryProvider interface { @@ -36,14 +39,17 @@ type SummaryProvider interface { } type summaryProviderImpl struct { - provider StatsProvider + provider StatsProvider + resourceAnalyzer ResourceAnalyzer } var _ SummaryProvider = &summaryProviderImpl{} // NewSummaryProvider returns a new SummaryProvider -func NewSummaryProvider(statsProvider StatsProvider) SummaryProvider { - return &summaryProviderImpl{statsProvider} +func NewSummaryProvider(statsProvider StatsProvider, resourceAnalyzer ResourceAnalyzer) SummaryProvider { + stackBuff := []byte{} + runtime.Stack(stackBuff, false) + return &summaryProviderImpl{statsProvider, resourceAnalyzer} } // Get implements the SummaryProvider interface @@ -74,17 +80,18 @@ func (sp *summaryProviderImpl) Get() (*Summary, error) { return nil, err } - sb := &summaryBuilder{node, nodeConfig, rootFsInfo, imageFsInfo, infos} + sb := &summaryBuilder{sp.resourceAnalyzer, node, nodeConfig, rootFsInfo, imageFsInfo, infos} return sb.build() } // summaryBuilder aggregates the datastructures provided by cadvisor into a Summary result type summaryBuilder struct { - node *api.Node - nodeConfig cm.NodeConfig - rootFsInfo cadvisorapiv2.FsInfo - imageFsInfo cadvisorapiv2.FsInfo - infos map[string]cadvisorapiv2.ContainerInfo + resourceAnalyzer ResourceAnalyzer + node *api.Node + nodeConfig cm.NodeConfig + rootFsInfo cadvisorapiv2.FsInfo + imageFsInfo cadvisorapiv2.FsInfo + infos map[string]cadvisorapiv2.ContainerInfo } // build returns a Summary from aggregating the input data @@ -153,7 +160,8 @@ func (sb *summaryBuilder) containerInfoV2FsStats( } cfs := lcs.Filesystem if cfs != nil && cfs.BaseUsageBytes != nil { - cs.Rootfs.UsedBytes = cfs.BaseUsageBytes + rootfsUsage := *cfs.BaseUsageBytes + cs.Rootfs.UsedBytes = &rootfsUsage if cfs.TotalUsageBytes != nil { logsUsage := *cfs.TotalUsageBytes - *cfs.BaseUsageBytes cs.Logs.UsedBytes = &logsUsage @@ -207,6 +215,11 @@ func (sb *summaryBuilder) buildSummaryPods() []PodStats { // Add each PodStats to the result result := make([]PodStats, 0, len(podToStats)) for _, stats := range podToStats { + // Lookup the volume stats for each pod + podUID := types.UID(stats.PodRef.UID) + if vstats, found := sb.resourceAnalyzer.GetPodVolumeStats(podUID); found { + stats.VolumeStats = vstats.Volumes + } result = append(result, *stats) } return result diff --git a/pkg/kubelet/server/stats/summary_test.go b/pkg/kubelet/server/stats/summary_test.go index 57b7ff1697..1a8c4955bd 100644 --- a/pkg/kubelet/server/stats/summary_test.go +++ b/pkg/kubelet/server/stats/summary_test.go @@ -104,7 +104,8 @@ func TestBuildSummary(t *testing.T) { rootfs := v2.FsInfo{} imagefs := v2.FsInfo{} - sb := &summaryBuilder{&node, nodeConfig, rootfs, imagefs, infos} + sb := &summaryBuilder{ + newFsResourceAnalyzer(&MockStatsProvider{}, time.Minute*5), &node, nodeConfig, rootfs, imagefs, infos} summary, err := sb.build() assert.NoError(t, err) diff --git a/pkg/kubelet/volumes.go b/pkg/kubelet/volumes.go index 09a0d942f1..7be8937a66 100644 --- a/pkg/kubelet/volumes.go +++ b/pkg/kubelet/volumes.go @@ -166,6 +166,19 @@ type volumeTuple struct { Name string } +// ListVolumesForPod returns a map of the volumes associated with the given pod +func (kl *Kubelet) ListVolumesForPod(podUID types.UID) (map[string]volume.Volume, bool) { + result := map[string]volume.Volume{} + vm, ok := kl.volumeManager.GetVolumes(podUID) + if !ok { + return result, false + } + for name, info := range vm { + result[name] = info.Builder + } + return result, true +} + func (kl *Kubelet) getPodVolumes(podUID types.UID) ([]*volumeTuple, error) { var volumes []*volumeTuple podVolDir := kl.getPodVolumesDir(podUID) diff --git a/pkg/volume/metrics_cached.go b/pkg/volume/metrics_cached.go new file mode 100644 index 0000000000..35923de5f3 --- /dev/null +++ b/pkg/volume/metrics_cached.go @@ -0,0 +1,69 @@ +/* +Copyright 2014 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. +*/ + +package volume + +import ( + "sync" + "sync/atomic" +) + +var _ MetricsProvider = &cachedMetrics{} + +// cachedMetrics represents a MetricsProvider that wraps another provider and caches the result. +type cachedMetrics struct { + wrapped MetricsProvider + resultError error + resultMetrics *Metrics + once cacheOnce +} + +// NewCachedMetrics creates a new cachedMetrics wrapping another MetricsProvider and caching the results. +func NewCachedMetrics(provider MetricsProvider) MetricsProvider { + return &cachedMetrics{wrapped: provider} +} + +// See MetricsProvider.GetMetrics +// Runs GetMetrics Once and caches the result. Will not cache result if there is an error. +func (md *cachedMetrics) GetMetrics() (*Metrics, error) { + md.once.cache(func() error { + md.resultMetrics, md.resultError = md.wrapped.GetMetrics() + return md.resultError + }) + return md.resultMetrics, md.resultError +} + +// Copied from sync.Once but we don't want to cache the results if there is an error +type cacheOnce struct { + m sync.Mutex + done uint32 +} + +// Copied from sync.Once but we don't want to cache the results if there is an error +func (o *cacheOnce) cache(f func() error) { + if atomic.LoadUint32(&o.done) == 1 { + return + } + // Slow-path. + o.m.Lock() + defer o.m.Unlock() + if o.done == 0 { + err := f() + if err == nil { + atomic.StoreUint32(&o.done, 1) + } + } +} diff --git a/pkg/volume/mock_volume.go b/pkg/volume/mock_volume.go new file mode 100644 index 0000000000..f631355386 --- /dev/null +++ b/pkg/volume/mock_volume.go @@ -0,0 +1,62 @@ +/* +Copyright 2016 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. +*/ + +package volume + +import "github.com/stretchr/testify/mock" + +// ORIGINALLY GENERATED BY mockery with hand edits + +type MockVolume struct { + mock.Mock +} + +// GetPath provides a mock function with given fields: +func (_m *MockVolume) GetPath() string { + ret := _m.Called() + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + +// GetMetrics provides a mock function with given fields: +func (_m *MockVolume) GetMetrics() (*Metrics, error) { + ret := _m.Called() + + var r0 *Metrics + if rf, ok := ret.Get(0).(func() *Metrics); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*Metrics) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} diff --git a/pkg/volume/secret/secret.go b/pkg/volume/secret/secret.go index 138f9ff276..0f17d66eef 100644 --- a/pkg/volume/secret/secret.go +++ b/pkg/volume/secret/secret.go @@ -72,7 +72,7 @@ func (plugin *secretPlugin) NewBuilder(spec *volume.Spec, pod *api.Pod, opts vol plugin, plugin.host.GetMounter(), plugin.host.GetWriter(), - volume.MetricsNil{}, + volume.NewCachedMetrics(volume.NewMetricsDu(getPathFromHost(plugin.host, pod.UID, spec.Name()))), }, secretName: spec.Volume.Secret.SecretName, pod: *pod, @@ -88,7 +88,7 @@ func (plugin *secretPlugin) NewCleaner(volName string, podUID types.UID) (volume plugin, plugin.host.GetMounter(), plugin.host.GetWriter(), - volume.MetricsNil{}, + volume.NewCachedMetrics(volume.NewMetricsDu(getPathFromHost(plugin.host, podUID, volName))), }, }, nil } @@ -99,13 +99,17 @@ type secretVolume struct { plugin *secretPlugin mounter mount.Interface writer ioutil.Writer - volume.MetricsNil + volume.MetricsProvider } var _ volume.Volume = &secretVolume{} func (sv *secretVolume) GetPath() string { - return sv.plugin.host.GetPodVolumeDir(sv.podUID, strings.EscapeQualifiedNameForDisk(secretPluginName), sv.volName) + return getPathFromHost(sv.plugin.host, sv.podUID, sv.volName) +} + +func getPathFromHost(host volume.VolumeHost, podUID types.UID, volName string) string { + return host.GetPodVolumeDir(podUID, strings.EscapeQualifiedNameForDisk(secretPluginName), volName) } // secretVolumeBuilder handles retrieving secrets from the API server diff --git a/pkg/volume/secret/secret_test.go b/pkg/volume/secret/secret_test.go index e028fe9046..5f04d57dce 100644 --- a/pkg/volume/secret/secret_test.go +++ b/pkg/volume/secret/secret_test.go @@ -24,6 +24,7 @@ import ( "strings" "testing" + "github.com/stretchr/testify/assert" "k8s.io/kubernetes/pkg/api" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/client/testing/fake" @@ -121,6 +122,11 @@ func TestPlugin(t *testing.T) { } } doTestSecretDataInVolume(volumePath, secret, t) + + metrics, err := builder.GetMetrics() + assert.NotEmpty(t, metrics) + assert.NoError(t, err) + doTestCleanAndTeardown(plugin, testPodUID, testVolumeName, volumePath, t) } diff --git a/test/e2e_node/kubelet_test.go b/test/e2e_node/kubelet_test.go index c7c10e2521..4bebbfd460 100644 --- a/test/e2e_node/kubelet_test.go +++ b/test/e2e_node/kubelet_test.go @@ -20,16 +20,18 @@ import ( "bytes" "encoding/json" "fmt" + "io/ioutil" "net/http" "strings" "time" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "io/ioutil" "k8s.io/kubernetes/pkg/api" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/kubelet/server/stats" + + "github.com/davecgh/go-spew/spew" + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" ) var _ = Describe("Kubelet", func() { @@ -66,20 +68,16 @@ var _ = Describe("Kubelet", func() { }) It("it should print the output to logs", func() { - errs := Retry(time.Minute, time.Second*4, func() error { + Eventually(func() string { rc, err := cl.Pods(api.NamespaceDefault).GetLogs("busybox", &api.PodLogOptions{}).Stream() if err != nil { - return err + return "" } defer rc.Close() buf := new(bytes.Buffer) buf.ReadFrom(rc) - if buf.String() != "'Hello World'\n" { - return fmt.Errorf("Expected %s to match 'Hello World'", buf.String()) - } - return nil - }) - Expect(errs).To(BeEmpty(), fmt.Sprintf("Failed to get Logs")) + return buf.String() + }, time.Second*30, time.Second*4).Should(Equal("'Hello World'\n")) }) It("it should be possible to delete", func() { @@ -101,9 +99,16 @@ var _ = Describe("Kubelet", func() { createPod(cl, podName, []api.Container{ { Image: "gcr.io/google_containers/busybox", - Command: []string{"sh", "-c", "echo 'Hello World' | tee ~/file | tee -a ~/file | tee /test-empty-dir | sleep 60"}, + Command: []string{"sh", "-c", "echo 'Hello World' | tee ~/file | tee /test-empty-dir-mnt | sleep 60"}, Name: podName + containerSuffix, + VolumeMounts: []api.VolumeMount{ + {MountPath: "/test-empty-dir-mnt", Name: "test-empty-dir"}, + }, }, + }, []api.Volume{ + // TODO: Test secret volumes + // TODO: Test hostpath volumes + {Name: "test-empty-dir", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}, }) } @@ -113,6 +118,7 @@ var _ = Describe("Kubelet", func() { Context("when querying /stats/summary", func() { It("it should report resource usage through the stats api", func() { + By("Returning stats summary") resp, err := http.Get(*kubeletAddress + "/stats/summary") now := time.Now() Expect(err).To(BeNil(), fmt.Sprintf("Failed to get /stats/summary")) @@ -124,57 +130,84 @@ var _ = Describe("Kubelet", func() { err = decoder.Decode(&summary) Expect(err).To(BeNil(), fmt.Sprintf("Failed to parse /stats/summary to go struct: %+v", resp)) - // Verify Misc Stats + By("Having the correct time") Expect(summary.Time.Time).To(BeTemporally("~", now, 20*time.Second)) - // Verify Node Stats are present + By("Having resources for node") Expect(summary.Node.NodeName).To(Equal(*nodeName)) - Expect(summary.Node.CPU.UsageCoreNanoSeconds).NotTo(BeZero()) - Expect(summary.Node.Memory.UsageBytes).NotTo(BeZero()) - Expect(summary.Node.Memory.WorkingSetBytes).NotTo(BeZero()) - Expect(summary.Node.Fs.UsedBytes).NotTo(BeZero()) - Expect(summary.Node.Fs.CapacityBytes).NotTo(BeZero()) - Expect(summary.Node.Fs.AvailableBytes).NotTo(BeZero()) + Expect(summary.Node.CPU.UsageCoreNanoSeconds).NotTo(BeNil()) + Expect(*summary.Node.CPU.UsageCoreNanoSeconds).NotTo(BeZero()) + Expect(summary.Node.Memory.UsageBytes).NotTo(BeNil()) + Expect(*summary.Node.Memory.UsageBytes).NotTo(BeZero()) + + Expect(summary.Node.Memory.WorkingSetBytes).NotTo(BeNil()) + Expect(*summary.Node.Memory.WorkingSetBytes).NotTo(BeZero()) + + Expect(summary.Node.Fs.AvailableBytes).NotTo(BeNil()) + Expect(*summary.Node.Fs.AvailableBytes).NotTo(BeZero()) + Expect(summary.Node.Fs.CapacityBytes).NotTo(BeNil()) + Expect(*summary.Node.Fs.CapacityBytes).NotTo(BeZero()) + Expect(summary.Node.Fs.UsedBytes).NotTo(BeNil()) + Expect(*summary.Node.Fs.UsedBytes).NotTo(BeZero()) + + By("Having resources for kubelet and runtime system containers") sysContainers := map[string]stats.ContainerStats{} sysContainersList := []string{} for _, container := range summary.Node.SystemContainers { sysContainers[container.Name] = container sysContainersList = append(sysContainersList, container.Name) - Expect(container.CPU.UsageCoreNanoSeconds).NotTo(BeZero()) - // TODO: Test Network - Expect(container.Memory.UsageBytes).NotTo(BeZero()) - Expect(container.Memory.WorkingSetBytes).NotTo(BeZero()) - Expect(container.Rootfs.CapacityBytes).NotTo(BeZero()) - Expect(container.Rootfs.AvailableBytes).NotTo(BeZero()) - Expect(container.Logs.CapacityBytes).NotTo(BeZero()) - Expect(container.Logs.AvailableBytes).NotTo(BeZero()) + ExpectContainerStatsNotEmpty(&container) } Expect(sysContainersList).To(ConsistOf("kubelet", "runtime")) // Verify Pods Stats are present podsList := []string{} + By("Having resources for pods") for _, pod := range summary.Pods { if !strings.HasPrefix(pod.PodRef.Name, statsPrefix) { // Ignore pods created outside this test continue - } - // TODO: Test network podsList = append(podsList, pod.PodRef.Name) + Expect(pod.Containers).To(HaveLen(1)) container := pod.Containers[0] Expect(container.Name).To(Equal(pod.PodRef.Name + containerSuffix)) - Expect(container.CPU.UsageCoreNanoSeconds).NotTo(BeZero()) - Expect(container.Memory.UsageBytes).NotTo(BeZero()) - Expect(container.Memory.WorkingSetBytes).NotTo(BeZero()) - Expect(container.Rootfs.CapacityBytes).NotTo(BeZero()) - Expect(container.Rootfs.AvailableBytes).NotTo(BeZero()) - Expect(*container.Rootfs.UsedBytes).NotTo(BeZero(), contents) - Expect(container.Logs.CapacityBytes).NotTo(BeZero()) - Expect(container.Logs.AvailableBytes).NotTo(BeZero()) - Expect(*container.Logs.UsedBytes).NotTo(BeZero(), contents) + + ExpectContainerStatsNotEmpty(&container) + + // emptydir volume + volumeNames := []string{} + for _, vs := range pod.VolumeStats { + Expect(vs.CapacityBytes).NotTo(BeZero()) + Expect(vs.AvailableBytes).NotTo(BeZero()) + Expect(vs.UsedBytes).NotTo(BeZero()) + if strings.HasPrefix(vs.Name, "default-token-") { + volumeNames = append(volumeNames, "default-token-") + } else { + volumeNames = append(volumeNames, vs.Name) + } + } + Expect(volumeNames).To(ConsistOf("default-token-", "test-empty-dir")) + + // fs usage (not for system containers) + Expect(container.Rootfs).NotTo(BeNil(), spew.Sdump(container)) + Expect(container.Rootfs.AvailableBytes).NotTo(BeNil(), spew.Sdump(container)) + Expect(*container.Rootfs.AvailableBytes).NotTo(BeZero(), spew.Sdump(container)) + Expect(container.Rootfs.CapacityBytes).NotTo(BeNil(), spew.Sdump(container)) + Expect(*container.Rootfs.CapacityBytes).NotTo(BeZero(), spew.Sdump(container)) + Expect(container.Rootfs.UsedBytes).NotTo(BeNil(), spew.Sdump(container)) + Expect(*container.Rootfs.UsedBytes).NotTo(BeZero(), spew.Sdump(container)) + Expect(container.Logs).NotTo(BeNil(), spew.Sdump(container)) + Expect(container.Logs.AvailableBytes).NotTo(BeNil(), spew.Sdump(container)) + Expect(*container.Logs.AvailableBytes).NotTo(BeZero(), spew.Sdump(container)) + Expect(container.Logs.CapacityBytes).NotTo(BeNil(), spew.Sdump(container)) + Expect(*container.Logs.CapacityBytes).NotTo(BeZero(), spew.Sdump(container)) + Expect(container.Logs.UsedBytes).NotTo(BeNil(), spew.Sdump(container)) + Expect(*container.Logs.UsedBytes).NotTo(BeZero(), spew.Sdump(container)) + } Expect(podsList).To(ConsistOf(podNames)) }) @@ -189,11 +222,25 @@ var _ = Describe("Kubelet", func() { }) }) +func ExpectContainerStatsNotEmpty(container *stats.ContainerStats) { + // TODO: Test Network + + Expect(container.CPU).NotTo(BeNil(), spew.Sdump(container)) + Expect(container.CPU.UsageCoreNanoSeconds).NotTo(BeNil(), spew.Sdump(container)) + Expect(*container.CPU.UsageCoreNanoSeconds).NotTo(BeZero(), spew.Sdump(container)) + + Expect(container.Memory).NotTo(BeNil(), spew.Sdump(container)) + Expect(container.Memory.UsageBytes).NotTo(BeNil(), spew.Sdump(container)) + Expect(*container.Memory.UsageBytes).NotTo(BeZero(), spew.Sdump(container)) + Expect(container.Memory.WorkingSetBytes).NotTo(BeNil(), spew.Sdump(container)) + Expect(*container.Memory.WorkingSetBytes).NotTo(BeZero(), spew.Sdump(container)) +} + const ( containerSuffix = "-c" ) -func createPod(cl *client.Client, podName string, containers []api.Container) { +func createPod(cl *client.Client, podName string, containers []api.Container, volumes []api.Volume) { pod := &api.Pod{ ObjectMeta: api.ObjectMeta{ Name: podName, @@ -205,6 +252,7 @@ func createPod(cl *client.Client, podName string, containers []api.Container) { // Don't restart the Pod since it is expected to exit RestartPolicy: api.RestartPolicyNever, Containers: containers, + Volumes: volumes, }, } _, err := cl.Pods(api.NamespaceDefault).Create(pod) diff --git a/test/e2e_node/util.go b/test/e2e_node/util.go deleted file mode 100644 index abea474aef..0000000000 --- a/test/e2e_node/util.go +++ /dev/null @@ -1,48 +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. -*/ - -package e2e_node - -import ( - "time" -) - -// RetryFn represents a retryable test condition. It returns an error if the condition is not met -// otherwise returns nil for success. -type RetryFn func() error - -// Retry retries the RetryFn for a maximum of maxWait time. The wait duration is waited between -// retries. If the success condition is not met in maxWait time, the list of encountered errors -// is returned. If successful returns an empty list. -// Example: -// Expect(Retry(time.Minute*1, time.Second*2, func() error { -// if success { -// return nil -// } else { -// return errors.New("Failed") -// } -// }).To(BeNil(), fmt.Sprintf("Failed")) -func Retry(maxWait time.Duration, wait time.Duration, retry RetryFn) []error { - errs := []error{} - for start := time.Now(); time.Now().Before(start.Add(maxWait)); { - if err := retry(); err != nil { - errs = append(errs, err) - } else { - return []error{} - } - } - return errs -}