Commit 825cd920 authored by k8s-merge-robot's avatar k8s-merge-robot

Merge pull request #26341 from caesarxuchao/gc-controller-manager

Automatic merge from submit-queue Add garbage collector into kube-controller-manager It's disabled by default. Design doc is at https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/garbage-collection.md
parents 1c7aa9c8 b3df6294
......@@ -51,6 +51,7 @@ import (
endpointcontroller "k8s.io/kubernetes/pkg/controller/endpoint"
"k8s.io/kubernetes/pkg/controller/framework"
"k8s.io/kubernetes/pkg/controller/framework/informers"
"k8s.io/kubernetes/pkg/controller/garbagecollector"
"k8s.io/kubernetes/pkg/controller/gc"
"k8s.io/kubernetes/pkg/controller/job"
namespacecontroller "k8s.io/kubernetes/pkg/controller/namespace"
......@@ -454,6 +455,23 @@ func StartControllers(s *options.CMServer, kubeClient *client.Client, kubeconfig
).Run()
time.Sleep(wait.Jitter(s.ControllerStartInterval.Duration, ControllerStartJitter))
if s.EnableGarbageCollector {
gcClientset := clientset.NewForConfigOrDie(restclient.AddUserAgent(kubeconfig, "generic-garbage-collector"))
groupVersionResources, err := gcClientset.Discovery().ServerPreferredResources()
if err != nil {
glog.Fatalf("Failed to get supported resources from server: %v", err)
}
clientPool := dynamic.NewClientPool(restclient.AddUserAgent(kubeconfig, "generic-garbage-collector"), dynamic.LegacyAPIPathResolverFunc)
garbageCollector, err := garbagecollector.NewGarbageCollector(clientPool, groupVersionResources)
if err != nil {
glog.Errorf("Failed to start the generic garbage collector")
} else {
// TODO: make this a flag of kube-controller-manager
workers := 5
go garbageCollector.Run(workers, wait.NeverStop)
}
}
// run the shared informers
for _, informer := range informers {
go informer.Run(wait.NeverStop)
......
......@@ -89,6 +89,7 @@ func NewCMServer() *CMServer {
KubeAPIBurst: 30,
LeaderElection: leaderelection.DefaultLeaderElectionConfiguration(),
ControllerStartInterval: unversioned.Duration{Duration: 0 * time.Second},
EnableGarbageCollector: false,
},
}
return &s
......@@ -157,5 +158,6 @@ func (s *CMServer) AddFlags(fs *pflag.FlagSet) {
fs.Float32Var(&s.KubeAPIQPS, "kube-api-qps", s.KubeAPIQPS, "QPS to use while talking with kubernetes apiserver")
fs.Int32Var(&s.KubeAPIBurst, "kube-api-burst", s.KubeAPIBurst, "Burst to use while talking with kubernetes apiserver")
fs.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.")
leaderelection.BindFlags(&s.LeaderElection, fs)
}
......@@ -73,6 +73,7 @@ kube-controller-manager
--deleting-pods-burst=10: Number of nodes on which pods are bursty deleted in case of node failure. For more details look into RateLimiter.
--deleting-pods-qps=0.1: Number of nodes per second on which pods are deleted in case of node failure.
--deployment-controller-sync-period=30s: Period for syncing the deployments.
--enable-garbage-collector[=false]: 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.
--enable-hostpath-provisioner[=false]: Enable HostPath PV provisioning when running without a cloud provider. This allows testing and development of provisioning features. HostPath provisioning is not supported in any way, won't work in a multi-node cluster, and should not be used for anything other than testing or development.
--flex-volume-plugin-dir="/usr/libexec/kubernetes/kubelet-plugins/volume/exec/": Full path of the directory in which the flex volume plugin should search for additional third party volume plugins.
--google-json-key="": The Google Cloud Platform Service Account JSON Key to use for authentication.
......@@ -114,7 +115,7 @@ kube-controller-manager
--terminated-pod-gc-threshold=12500: Number of terminated pods that can exist before the terminated pod garbage collector starts deleting terminated pods. If <= 0, the terminated pod garbage collector is disabled.
```
###### Auto generated by spf13/cobra on 21-May-2016
###### Auto generated by spf13/cobra on 26-May-2016
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
......
......@@ -110,6 +110,7 @@ e2e-output-dir
e2e-verify-service-account
enable-custom-metrics
enable-debugging-handlers
enable-garbage-collector
enable-hostpath-provisioner
enable-server
enable-swagger-ui
......
......@@ -134,6 +134,7 @@ func DeepCopy_componentconfig_KubeControllerManagerConfiguration(in KubeControll
if err := unversioned.DeepCopy_unversioned_Duration(in.ControllerStartInterval, &out.ControllerStartInterval, c); err != nil {
return err
}
out.EnableGarbageCollector = in.EnableGarbageCollector
return nil
}
......
......@@ -6403,16 +6403,16 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
var yyq2 [48]bool
var yyq2 [49]bool
_, _, _ = yysep2, yyq2, yy2arr2
const yyr2 bool = false
yyq2[46] = x.Kind != ""
yyq2[47] = x.APIVersion != ""
yyq2[47] = x.Kind != ""
yyq2[48] = x.APIVersion != ""
var yynn2 int
if yyr2 || yy2arr2 {
r.EncodeArrayStart(48)
r.EncodeArrayStart(49)
} else {
yynn2 = 46
yynn2 = 47
for _, b := range yyq2 {
if b {
yynn2++
......@@ -7385,23 +7385,42 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[46] {
yym172 := z.EncBinary()
_ = yym172
if false {
} else {
r.EncodeBool(bool(x.EnableGarbageCollector))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("enableGarbageCollector"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym173 := z.EncBinary()
_ = yym173
if false {
} else {
r.EncodeBool(bool(x.EnableGarbageCollector))
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[47] {
yym175 := z.EncBinary()
_ = yym175
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq2[46] {
if yyq2[47] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym173 := z.EncBinary()
_ = yym173
yym176 := z.EncBinary()
_ = yym176
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
......@@ -7410,9 +7429,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[47] {
yym175 := z.EncBinary()
_ = yym175
if yyq2[48] {
yym178 := z.EncBinary()
_ = yym178
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
......@@ -7421,12 +7440,12 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq2[47] {
if yyq2[48] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym176 := z.EncBinary()
_ = yym176
yym179 := z.EncBinary()
_ = yym179
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
......@@ -7889,6 +7908,12 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromMap(l int, d *co
z.DecFallback(yyv61, false)
}
}
case "enableGarbageCollector":
if r.TryDecodeAsNil() {
x.EnableGarbageCollector = false
} else {
x.EnableGarbageCollector = bool(r.DecodeBool())
}
case "kind":
if r.TryDecodeAsNil() {
x.Kind = ""
......@@ -7912,16 +7937,16 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj65 int
var yyb65 bool
var yyhl65 bool = l >= 0
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
var yyj66 int
var yyb66 bool
var yyhl66 bool = l >= 0
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -7931,13 +7956,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.Port = int32(r.DecodeInt(32))
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -7947,13 +7972,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.Address = string(r.DecodeString())
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -7963,13 +7988,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.CloudProvider = string(r.DecodeString())
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -7979,13 +8004,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.CloudConfigFile = string(r.DecodeString())
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -7995,13 +8020,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.ConcurrentEndpointSyncs = int32(r.DecodeInt(32))
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8011,13 +8036,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.ConcurrentRSSyncs = int32(r.DecodeInt(32))
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8027,13 +8052,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.ConcurrentRCSyncs = int32(r.DecodeInt(32))
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8043,13 +8068,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.ConcurrentResourceQuotaSyncs = int32(r.DecodeInt(32))
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8059,13 +8084,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.ConcurrentDeploymentSyncs = int32(r.DecodeInt(32))
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8075,13 +8100,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.ConcurrentDaemonSetSyncs = int32(r.DecodeInt(32))
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8091,13 +8116,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.ConcurrentJobSyncs = int32(r.DecodeInt(32))
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8107,13 +8132,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.ConcurrentNamespaceSyncs = int32(r.DecodeInt(32))
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8123,13 +8148,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.LookupCacheSizeForRC = int32(r.DecodeInt(32))
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8139,13 +8164,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.LookupCacheSizeForRS = int32(r.DecodeInt(32))
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8155,13 +8180,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.LookupCacheSizeForDaemonSet = int32(r.DecodeInt(32))
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8169,24 +8194,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
if r.TryDecodeAsNil() {
x.ServiceSyncPeriod = pkg1_unversioned.Duration{}
} else {
yyv81 := &x.ServiceSyncPeriod
yym82 := z.DecBinary()
_ = yym82
yyv82 := &x.ServiceSyncPeriod
yym83 := z.DecBinary()
_ = yym83
if false {
} else if z.HasExtensions() && z.DecExt(yyv81) {
} else if !yym82 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv81)
} else if z.HasExtensions() && z.DecExt(yyv82) {
} else if !yym83 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv82)
} else {
z.DecFallback(yyv81, false)
z.DecFallback(yyv82, false)
}
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8194,24 +8219,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
if r.TryDecodeAsNil() {
x.NodeSyncPeriod = pkg1_unversioned.Duration{}
} else {
yyv83 := &x.NodeSyncPeriod
yym84 := z.DecBinary()
_ = yym84
yyv84 := &x.NodeSyncPeriod
yym85 := z.DecBinary()
_ = yym85
if false {
} else if z.HasExtensions() && z.DecExt(yyv83) {
} else if !yym84 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv83)
} else if z.HasExtensions() && z.DecExt(yyv84) {
} else if !yym85 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv84)
} else {
z.DecFallback(yyv83, false)
z.DecFallback(yyv84, false)
}
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8219,24 +8244,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
if r.TryDecodeAsNil() {
x.ResourceQuotaSyncPeriod = pkg1_unversioned.Duration{}
} else {
yyv85 := &x.ResourceQuotaSyncPeriod
yym86 := z.DecBinary()
_ = yym86
yyv86 := &x.ResourceQuotaSyncPeriod
yym87 := z.DecBinary()
_ = yym87
if false {
} else if z.HasExtensions() && z.DecExt(yyv85) {
} else if !yym86 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv85)
} else if z.HasExtensions() && z.DecExt(yyv86) {
} else if !yym87 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv86)
} else {
z.DecFallback(yyv85, false)
z.DecFallback(yyv86, false)
}
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8244,24 +8269,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
if r.TryDecodeAsNil() {
x.NamespaceSyncPeriod = pkg1_unversioned.Duration{}
} else {
yyv87 := &x.NamespaceSyncPeriod
yym88 := z.DecBinary()
_ = yym88
yyv88 := &x.NamespaceSyncPeriod
yym89 := z.DecBinary()
_ = yym89
if false {
} else if z.HasExtensions() && z.DecExt(yyv87) {
} else if !yym88 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv87)
} else if z.HasExtensions() && z.DecExt(yyv88) {
} else if !yym89 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv88)
} else {
z.DecFallback(yyv87, false)
z.DecFallback(yyv88, false)
}
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8269,24 +8294,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
if r.TryDecodeAsNil() {
x.PVClaimBinderSyncPeriod = pkg1_unversioned.Duration{}
} else {
yyv89 := &x.PVClaimBinderSyncPeriod
yym90 := z.DecBinary()
_ = yym90
yyv90 := &x.PVClaimBinderSyncPeriod
yym91 := z.DecBinary()
_ = yym91
if false {
} else if z.HasExtensions() && z.DecExt(yyv89) {
} else if !yym90 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv89)
} else if z.HasExtensions() && z.DecExt(yyv90) {
} else if !yym91 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv90)
} else {
z.DecFallback(yyv89, false)
z.DecFallback(yyv90, false)
}
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8294,24 +8319,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
if r.TryDecodeAsNil() {
x.MinResyncPeriod = pkg1_unversioned.Duration{}
} else {
yyv91 := &x.MinResyncPeriod
yym92 := z.DecBinary()
_ = yym92
yyv92 := &x.MinResyncPeriod
yym93 := z.DecBinary()
_ = yym93
if false {
} else if z.HasExtensions() && z.DecExt(yyv91) {
} else if !yym92 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv91)
} else if z.HasExtensions() && z.DecExt(yyv92) {
} else if !yym93 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv92)
} else {
z.DecFallback(yyv91, false)
z.DecFallback(yyv92, false)
}
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8321,13 +8346,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.TerminatedPodGCThreshold = int32(r.DecodeInt(32))
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8335,24 +8360,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
if r.TryDecodeAsNil() {
x.HorizontalPodAutoscalerSyncPeriod = pkg1_unversioned.Duration{}
} else {
yyv94 := &x.HorizontalPodAutoscalerSyncPeriod
yym95 := z.DecBinary()
_ = yym95
yyv95 := &x.HorizontalPodAutoscalerSyncPeriod
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)
}
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8360,24 +8385,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
if r.TryDecodeAsNil() {
x.DeploymentControllerSyncPeriod = pkg1_unversioned.Duration{}
} else {
yyv96 := &x.DeploymentControllerSyncPeriod
yym97 := z.DecBinary()
_ = yym97
yyv97 := &x.DeploymentControllerSyncPeriod
yym98 := z.DecBinary()
_ = yym98
if false {
} else if z.HasExtensions() && z.DecExt(yyv96) {
} else if !yym97 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv96)
} else if z.HasExtensions() && z.DecExt(yyv97) {
} else if !yym98 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv97)
} else {
z.DecFallback(yyv96, false)
z.DecFallback(yyv97, false)
}
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8385,24 +8410,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
if r.TryDecodeAsNil() {
x.PodEvictionTimeout = pkg1_unversioned.Duration{}
} else {
yyv98 := &x.PodEvictionTimeout
yym99 := z.DecBinary()
_ = yym99
yyv99 := &x.PodEvictionTimeout
yym100 := z.DecBinary()
_ = yym100
if false {
} else if z.HasExtensions() && z.DecExt(yyv98) {
} else if !yym99 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv98)
} else if z.HasExtensions() && z.DecExt(yyv99) {
} else if !yym100 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv99)
} else {
z.DecFallback(yyv98, false)
z.DecFallback(yyv99, false)
}
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8412,13 +8437,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.DeletingPodsQps = float32(r.DecodeFloat(true))
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8428,13 +8453,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.DeletingPodsBurst = int32(r.DecodeInt(32))
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8442,24 +8467,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
if r.TryDecodeAsNil() {
x.NodeMonitorGracePeriod = pkg1_unversioned.Duration{}
} else {
yyv102 := &x.NodeMonitorGracePeriod
yym103 := z.DecBinary()
_ = yym103
yyv103 := &x.NodeMonitorGracePeriod
yym104 := z.DecBinary()
_ = yym104
if false {
} else if z.HasExtensions() && z.DecExt(yyv102) {
} else if !yym103 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv102)
} else if z.HasExtensions() && z.DecExt(yyv103) {
} else if !yym104 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv103)
} else {
z.DecFallback(yyv102, false)
z.DecFallback(yyv103, false)
}
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8469,13 +8494,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.RegisterRetryCount = int32(r.DecodeInt(32))
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8483,24 +8508,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
if r.TryDecodeAsNil() {
x.NodeStartupGracePeriod = pkg1_unversioned.Duration{}
} else {
yyv105 := &x.NodeStartupGracePeriod
yym106 := z.DecBinary()
_ = yym106
yyv106 := &x.NodeStartupGracePeriod
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)
}
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8508,24 +8533,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
if r.TryDecodeAsNil() {
x.NodeMonitorPeriod = pkg1_unversioned.Duration{}
} else {
yyv107 := &x.NodeMonitorPeriod
yym108 := z.DecBinary()
_ = yym108
yyv108 := &x.NodeMonitorPeriod
yym109 := z.DecBinary()
_ = yym109
if false {
} else if z.HasExtensions() && z.DecExt(yyv107) {
} else if !yym108 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv107)
} else if z.HasExtensions() && z.DecExt(yyv108) {
} else if !yym109 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv108)
} else {
z.DecFallback(yyv107, false)
z.DecFallback(yyv108, false)
}
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8535,13 +8560,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.ServiceAccountKeyFile = string(r.DecodeString())
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8551,13 +8576,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.EnableProfiling = bool(r.DecodeBool())
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8567,13 +8592,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.ClusterName = string(r.DecodeString())
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8583,13 +8608,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.ClusterCIDR = string(r.DecodeString())
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8599,13 +8624,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.ServiceCIDR = string(r.DecodeString())
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8615,13 +8640,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.NodeCIDRMaskSize = int32(r.DecodeInt(32))
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8631,13 +8656,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.AllocateNodeCIDRs = bool(r.DecodeBool())
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8647,13 +8672,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.ConfigureCloudRoutes = bool(r.DecodeBool())
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8663,13 +8688,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.RootCAFile = string(r.DecodeString())
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8679,13 +8704,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.ContentType = string(r.DecodeString())
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8695,13 +8720,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.KubeAPIQPS = float32(r.DecodeFloat(true))
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8711,13 +8736,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.KubeAPIBurst = int32(r.DecodeInt(32))
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8725,16 +8750,16 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
if r.TryDecodeAsNil() {
x.LeaderElection = LeaderElectionConfiguration{}
} else {
yyv121 := &x.LeaderElection
yyv121.CodecDecodeSelf(d)
yyv122 := &x.LeaderElection
yyv122.CodecDecodeSelf(d)
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8742,16 +8767,16 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
if r.TryDecodeAsNil() {
x.VolumeConfiguration = VolumeConfiguration{}
} else {
yyv122 := &x.VolumeConfiguration
yyv122.CodecDecodeSelf(d)
yyv123 := &x.VolumeConfiguration
yyv123.CodecDecodeSelf(d)
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8759,24 +8784,40 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
if r.TryDecodeAsNil() {
x.ControllerStartInterval = pkg1_unversioned.Duration{}
} else {
yyv123 := &x.ControllerStartInterval
yym124 := z.DecBinary()
_ = yym124
yyv124 := &x.ControllerStartInterval
yym125 := z.DecBinary()
_ = yym125
if false {
} else if z.HasExtensions() && z.DecExt(yyv123) {
} else if !yym124 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv123)
} else if z.HasExtensions() && z.DecExt(yyv124) {
} else if !yym125 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv124)
} else {
z.DecFallback(yyv124, false)
}
}
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
z.DecFallback(yyv123, false)
yyb66 = r.CheckBreak()
}
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.EnableGarbageCollector = false
} else {
x.EnableGarbageCollector = bool(r.DecodeBool())
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8786,13 +8827,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
} else {
x.Kind = string(r.DecodeString())
}
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
......@@ -8803,17 +8844,17 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *
x.APIVersion = string(r.DecodeString())
}
for {
yyj65++
if yyhl65 {
yyb65 = yyj65 > l
yyj66++
if yyhl66 {
yyb66 = yyj66 > l
} else {
yyb65 = r.CheckBreak()
yyb66 = r.CheckBreak()
}
if yyb65 {
if yyb66 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj65-1, "")
z.DecStructFieldNotFound(yyj66-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
......
......@@ -556,6 +556,10 @@ type KubeControllerManagerConfiguration struct {
VolumeConfiguration VolumeConfiguration `json:"volumeConfiguration"`
// How long to wait between starting controller managers
ControllerStartInterval unversioned.Duration `json:"controllerStartInterval"`
// 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.
EnableGarbageCollector bool `json:"enableGarbageCollector"`
}
// VolumeConfiguration contains *all* enumerated flags meant to configure all volume
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment