From d74010211a32df471924bd2a0d461a6a09a17bbd Mon Sep 17 00:00:00 2001 From: Ke Zhang Date: Fri, 1 Jul 2016 15:26:35 +0800 Subject: [PATCH] controller-manager support number of garbage collector workers to be configurable --- .../app/controllermanager.go | 2 +- .../app/options/options.go | 2 + hack/verify-flags/known-flags.txt | 1 + pkg/apis/componentconfig/types.generated.go | 799 +++++++++--------- pkg/apis/componentconfig/types.go | 3 + 5 files changed, 427 insertions(+), 380 deletions(-) diff --git a/cmd/kube-controller-manager/app/controllermanager.go b/cmd/kube-controller-manager/app/controllermanager.go index 58c9a069b23..754fb79bb1c 100644 --- a/cmd/kube-controller-manager/app/controllermanager.go +++ b/cmd/kube-controller-manager/app/controllermanager.go @@ -468,7 +468,7 @@ func StartControllers(s *options.CMServer, kubeClient *client.Client, kubeconfig glog.Errorf("Failed to start the generic garbage collector") } else { // TODO: make this a flag of kube-controller-manager - workers := 5 + workers := int(s.ConcurrentGCSyncs) go garbageCollector.Run(workers, wait.NeverStop) } } diff --git a/cmd/kube-controller-manager/app/options/options.go b/cmd/kube-controller-manager/app/options/options.go index 8450f87e471..153f8879546 100644 --- a/cmd/kube-controller-manager/app/options/options.go +++ b/cmd/kube-controller-manager/app/options/options.go @@ -92,6 +92,7 @@ func NewCMServer() *CMServer { LeaderElection: leaderelection.DefaultLeaderElectionConfiguration(), ControllerStartInterval: unversioned.Duration{Duration: 0 * time.Second}, EnableGarbageCollector: false, + ConcurrentGCSyncs: 5, }, } return &s @@ -163,5 +164,6 @@ func (s *CMServer) AddFlags(fs *pflag.FlagSet) { fs.Int32Var(&s.KubeAPIBurst, "kube-api-burst", s.KubeAPIBurst, "Burst to use while talking with kubernetes apiserver") fs.DurationVar(&s.ControllerStartInterval.Duration, "controller-start-interval", s.ControllerStartInterval.Duration, "Interval between starting controller managers.") fs.BoolVar(&s.EnableGarbageCollector, "enable-garbage-collector", s.EnableGarbageCollector, "Enables the generic garbage collector. MUST be synced with the corresponding flag of the kube-apiserver. WARNING: the generic garbage collector is an alpha feature.") + fs.Int32Var(&s.ConcurrentGCSyncs, "concurrent-gc-syncs", s.ConcurrentGCSyncs, "The number of garbage collector workers that are allowed to sync concurrently.") leaderelection.BindFlags(&s.LeaderElection, fs) } diff --git a/hack/verify-flags/known-flags.txt b/hack/verify-flags/known-flags.txt index 2bc21c823bf..ff0432d7268 100644 --- a/hack/verify-flags/known-flags.txt +++ b/hack/verify-flags/known-flags.txt @@ -66,6 +66,7 @@ concurrent-replicaset-syncs concurrent-service-syncs concurrent-resource-quota-syncs concurrent-serviceaccount-token-syncs +concurrent-gc-syncs config-sync-period configure-cbr0 configure-cloud-routes diff --git a/pkg/apis/componentconfig/types.generated.go b/pkg/apis/componentconfig/types.generated.go index c9fd4848f0b..0ccd264ff5b 100644 --- a/pkg/apis/componentconfig/types.generated.go +++ b/pkg/apis/componentconfig/types.generated.go @@ -6518,16 +6518,16 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [50]bool + var yyq2 [51]bool _, _, _ = yysep2, yyq2, yy2arr2 const yyr2 bool = false - yyq2[48] = x.Kind != "" - yyq2[49] = x.APIVersion != "" + yyq2[49] = x.Kind != "" + yyq2[50] = x.APIVersion != "" var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(50) + r.EncodeArrayStart(51) } else { - yynn2 = 48 + yynn2 = 49 for _, b := range yyq2 { if b { yynn2++ @@ -7538,27 +7538,21 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[48] { - yym178 := z.EncBinary() - _ = yym178 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } + yym178 := z.EncBinary() + _ = yym178 + if false { } else { - r.EncodeString(codecSelferC_UTF81234, "") + r.EncodeInt(int64(x.ConcurrentGCSyncs)) } } else { - if yyq2[48] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym179 := z.EncBinary() - _ = yym179 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("concurrentGCSyncs")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym179 := z.EncBinary() + _ = yym179 + if false { + } else { + r.EncodeInt(int64(x.ConcurrentGCSyncs)) } } if yyr2 || yy2arr2 { @@ -7568,7 +7562,7 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode _ = yym181 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } else { r.EncodeString(codecSelferC_UTF81234, "") @@ -7576,11 +7570,36 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } else { if yyq2[49] { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yym182 := z.EncBinary() _ = yym182 if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[50] { + yym184 := z.EncBinary() + _ = yym184 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[50] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym185 := z.EncBinary() + _ = yym185 + if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } @@ -8054,6 +8073,12 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromMap(l int, d *co } else { x.EnableGarbageCollector = bool(r.DecodeBool()) } + case "concurrentGCSyncs": + if r.TryDecodeAsNil() { + x.ConcurrentGCSyncs = 0 + } else { + x.ConcurrentGCSyncs = int32(r.DecodeInt(32)) + } case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -8077,16 +8102,16 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj67 int - var yyb67 bool - var yyhl67 bool = l >= 0 - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + var yyj68 int + var yyb68 bool + var yyhl68 bool = l >= 0 + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8096,13 +8121,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.Port = int32(r.DecodeInt(32)) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8112,13 +8137,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.Address = string(r.DecodeString()) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8128,13 +8153,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.CloudProvider = string(r.DecodeString()) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8144,13 +8169,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.CloudConfigFile = string(r.DecodeString()) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8160,13 +8185,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentEndpointSyncs = int32(r.DecodeInt(32)) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8176,13 +8201,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentRSSyncs = int32(r.DecodeInt(32)) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8192,13 +8217,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentRCSyncs = int32(r.DecodeInt(32)) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8208,13 +8233,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentResourceQuotaSyncs = int32(r.DecodeInt(32)) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8224,13 +8249,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentDeploymentSyncs = int32(r.DecodeInt(32)) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8240,13 +8265,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentDaemonSetSyncs = int32(r.DecodeInt(32)) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8256,13 +8281,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentJobSyncs = int32(r.DecodeInt(32)) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8272,13 +8297,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentNamespaceSyncs = int32(r.DecodeInt(32)) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8288,13 +8313,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentSATokenSyncs = int32(r.DecodeInt(32)) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8304,13 +8329,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.LookupCacheSizeForRC = int32(r.DecodeInt(32)) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8320,13 +8345,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.LookupCacheSizeForRS = int32(r.DecodeInt(32)) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8336,13 +8361,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.LookupCacheSizeForDaemonSet = int32(r.DecodeInt(32)) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8350,24 +8375,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.ServiceSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv84 := &x.ServiceSyncPeriod - yym85 := z.DecBinary() - _ = yym85 + yyv85 := &x.ServiceSyncPeriod + yym86 := z.DecBinary() + _ = yym86 if false { - } else if z.HasExtensions() && z.DecExt(yyv84) { - } else if !yym85 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv84) + } else if z.HasExtensions() && z.DecExt(yyv85) { + } else if !yym86 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv85) } else { - z.DecFallback(yyv84, false) + z.DecFallback(yyv85, false) } } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8375,24 +8400,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.NodeSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv86 := &x.NodeSyncPeriod - yym87 := z.DecBinary() - _ = yym87 + yyv87 := &x.NodeSyncPeriod + yym88 := z.DecBinary() + _ = yym88 if false { - } else if z.HasExtensions() && z.DecExt(yyv86) { - } else if !yym87 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv86) + } else if z.HasExtensions() && z.DecExt(yyv87) { + } else if !yym88 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv87) } else { - z.DecFallback(yyv86, false) + z.DecFallback(yyv87, false) } } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8400,24 +8425,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.ResourceQuotaSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv88 := &x.ResourceQuotaSyncPeriod - yym89 := z.DecBinary() - _ = yym89 + yyv89 := &x.ResourceQuotaSyncPeriod + yym90 := z.DecBinary() + _ = yym90 if false { - } else if z.HasExtensions() && z.DecExt(yyv88) { - } else if !yym89 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv88) + } else if z.HasExtensions() && z.DecExt(yyv89) { + } else if !yym90 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv89) } else { - z.DecFallback(yyv88, false) + z.DecFallback(yyv89, false) } } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8425,24 +8450,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.NamespaceSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv90 := &x.NamespaceSyncPeriod - yym91 := z.DecBinary() - _ = yym91 + yyv91 := &x.NamespaceSyncPeriod + yym92 := z.DecBinary() + _ = yym92 if false { - } else if z.HasExtensions() && z.DecExt(yyv90) { - } else if !yym91 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv90) + } else if z.HasExtensions() && z.DecExt(yyv91) { + } else if !yym92 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv91) } else { - z.DecFallback(yyv90, false) + z.DecFallback(yyv91, false) } } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8450,24 +8475,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.PVClaimBinderSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv92 := &x.PVClaimBinderSyncPeriod - yym93 := z.DecBinary() - _ = yym93 + yyv93 := &x.PVClaimBinderSyncPeriod + yym94 := z.DecBinary() + _ = yym94 if false { - } else if z.HasExtensions() && z.DecExt(yyv92) { - } else if !yym93 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv92) + } else if z.HasExtensions() && z.DecExt(yyv93) { + } else if !yym94 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv93) } else { - z.DecFallback(yyv92, false) + z.DecFallback(yyv93, false) } } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8475,24 +8500,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.MinResyncPeriod = pkg1_unversioned.Duration{} } else { - yyv94 := &x.MinResyncPeriod - yym95 := z.DecBinary() - _ = yym95 + yyv95 := &x.MinResyncPeriod + yym96 := z.DecBinary() + _ = yym96 if false { - } else if z.HasExtensions() && z.DecExt(yyv94) { - } else if !yym95 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv94) + } else if z.HasExtensions() && z.DecExt(yyv95) { + } else if !yym96 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv95) } else { - z.DecFallback(yyv94, false) + z.DecFallback(yyv95, false) } } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8502,13 +8527,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.TerminatedPodGCThreshold = int32(r.DecodeInt(32)) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8516,24 +8541,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.HorizontalPodAutoscalerSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv97 := &x.HorizontalPodAutoscalerSyncPeriod - yym98 := z.DecBinary() - _ = yym98 + yyv98 := &x.HorizontalPodAutoscalerSyncPeriod + yym99 := z.DecBinary() + _ = yym99 if false { - } else if z.HasExtensions() && z.DecExt(yyv97) { - } else if !yym98 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv97) + } else if z.HasExtensions() && z.DecExt(yyv98) { + } else if !yym99 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv98) } else { - z.DecFallback(yyv97, false) + z.DecFallback(yyv98, false) } } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8541,24 +8566,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.DeploymentControllerSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv99 := &x.DeploymentControllerSyncPeriod - yym100 := z.DecBinary() - _ = yym100 + yyv100 := &x.DeploymentControllerSyncPeriod + yym101 := z.DecBinary() + _ = yym101 if false { - } else if z.HasExtensions() && z.DecExt(yyv99) { - } else if !yym100 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv99) + } else if z.HasExtensions() && z.DecExt(yyv100) { + } else if !yym101 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv100) } else { - z.DecFallback(yyv99, false) + z.DecFallback(yyv100, false) } } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8566,24 +8591,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.PodEvictionTimeout = pkg1_unversioned.Duration{} } else { - yyv101 := &x.PodEvictionTimeout - yym102 := z.DecBinary() - _ = yym102 + yyv102 := &x.PodEvictionTimeout + yym103 := z.DecBinary() + _ = yym103 if false { - } else if z.HasExtensions() && z.DecExt(yyv101) { - } else if !yym102 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv101) + } else if z.HasExtensions() && z.DecExt(yyv102) { + } else if !yym103 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv102) } else { - z.DecFallback(yyv101, false) + z.DecFallback(yyv102, false) } } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8593,13 +8618,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.DeletingPodsQps = float32(r.DecodeFloat(true)) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8609,13 +8634,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.DeletingPodsBurst = int32(r.DecodeInt(32)) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8623,24 +8648,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.NodeMonitorGracePeriod = pkg1_unversioned.Duration{} } else { - yyv105 := &x.NodeMonitorGracePeriod - yym106 := z.DecBinary() - _ = yym106 + yyv106 := &x.NodeMonitorGracePeriod + yym107 := z.DecBinary() + _ = yym107 if false { - } else if z.HasExtensions() && z.DecExt(yyv105) { - } else if !yym106 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv105) + } else if z.HasExtensions() && z.DecExt(yyv106) { + } else if !yym107 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv106) } else { - z.DecFallback(yyv105, false) + z.DecFallback(yyv106, false) } } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8650,13 +8675,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.RegisterRetryCount = int32(r.DecodeInt(32)) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8664,24 +8689,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.NodeStartupGracePeriod = pkg1_unversioned.Duration{} } else { - yyv108 := &x.NodeStartupGracePeriod - yym109 := z.DecBinary() - _ = yym109 + yyv109 := &x.NodeStartupGracePeriod + yym110 := z.DecBinary() + _ = yym110 if false { - } else if z.HasExtensions() && z.DecExt(yyv108) { - } else if !yym109 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv108) + } else if z.HasExtensions() && z.DecExt(yyv109) { + } else if !yym110 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv109) } else { - z.DecFallback(yyv108, false) + z.DecFallback(yyv109, false) } } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8689,24 +8714,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.NodeMonitorPeriod = pkg1_unversioned.Duration{} } else { - yyv110 := &x.NodeMonitorPeriod - yym111 := z.DecBinary() - _ = yym111 + yyv111 := &x.NodeMonitorPeriod + yym112 := z.DecBinary() + _ = yym112 if false { - } else if z.HasExtensions() && z.DecExt(yyv110) { - } else if !yym111 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv110) + } else if z.HasExtensions() && z.DecExt(yyv111) { + } else if !yym112 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv111) } else { - z.DecFallback(yyv110, false) + z.DecFallback(yyv111, false) } } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8716,13 +8741,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ServiceAccountKeyFile = string(r.DecodeString()) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8732,13 +8757,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.EnableProfiling = bool(r.DecodeBool()) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8748,13 +8773,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ClusterName = string(r.DecodeString()) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8764,13 +8789,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ClusterCIDR = string(r.DecodeString()) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8780,13 +8805,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ServiceCIDR = string(r.DecodeString()) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8796,13 +8821,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.NodeCIDRMaskSize = int32(r.DecodeInt(32)) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8812,13 +8837,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.AllocateNodeCIDRs = bool(r.DecodeBool()) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8828,13 +8853,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConfigureCloudRoutes = bool(r.DecodeBool()) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8844,13 +8869,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.RootCAFile = string(r.DecodeString()) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8860,13 +8885,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ContentType = string(r.DecodeString()) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8876,13 +8901,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.KubeAPIQPS = float32(r.DecodeFloat(true)) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8892,13 +8917,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.KubeAPIBurst = int32(r.DecodeInt(32)) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8906,16 +8931,16 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.LeaderElection = LeaderElectionConfiguration{} } else { - yyv124 := &x.LeaderElection - yyv124.CodecDecodeSelf(d) + yyv125 := &x.LeaderElection + yyv125.CodecDecodeSelf(d) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8923,16 +8948,16 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.VolumeConfiguration = VolumeConfiguration{} } else { - yyv125 := &x.VolumeConfiguration - yyv125.CodecDecodeSelf(d) + yyv126 := &x.VolumeConfiguration + yyv126.CodecDecodeSelf(d) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8940,24 +8965,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.ControllerStartInterval = pkg1_unversioned.Duration{} } else { - yyv126 := &x.ControllerStartInterval - yym127 := z.DecBinary() - _ = yym127 + yyv127 := &x.ControllerStartInterval + yym128 := z.DecBinary() + _ = yym128 if false { - } else if z.HasExtensions() && z.DecExt(yyv126) { - } else if !yym127 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv126) + } else if z.HasExtensions() && z.DecExt(yyv127) { + } else if !yym128 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv127) } else { - z.DecFallback(yyv126, false) + z.DecFallback(yyv127, false) } } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8967,13 +8992,29 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.EnableGarbageCollector = bool(r.DecodeBool()) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ConcurrentGCSyncs = 0 + } else { + x.ConcurrentGCSyncs = int32(r.DecodeInt(32)) + } + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l + } else { + yyb68 = r.CheckBreak() + } + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8983,13 +9024,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.Kind = string(r.DecodeString()) } - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9000,17 +9041,17 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * x.APIVersion = string(r.DecodeString()) } for { - yyj67++ - if yyhl67 { - yyb67 = yyj67 > l + yyj68++ + if yyhl68 { + yyb68 = yyj68 > l } else { - yyb67 = r.CheckBreak() + yyb68 = r.CheckBreak() } - if yyb67 { + if yyb68 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj67-1, "") + z.DecStructFieldNotFound(yyj68-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/pkg/apis/componentconfig/types.go b/pkg/apis/componentconfig/types.go index 97e92333725..7cf8ad55cbe 100644 --- a/pkg/apis/componentconfig/types.go +++ b/pkg/apis/componentconfig/types.go @@ -570,6 +570,9 @@ type KubeControllerManagerConfiguration struct { // corresponding flag of the kube-apiserver. WARNING: the generic garbage // collector is an alpha feature. EnableGarbageCollector bool `json:"enableGarbageCollector"` + // concurrentGCSyncs is the number of garbage collector workers that are + // allowed to sync concurrently. + ConcurrentGCSyncs int32 `json:"concurrentGCSyncs"` } // VolumeConfiguration contains *all* enumerated flags meant to configure all volume