From 1162cfd3b10b3b18aaa8b3b476beea9b1738bdb4 Mon Sep 17 00:00:00 2001 From: Mike Danese Date: Mon, 11 Jan 2016 12:28:09 -0800 Subject: [PATCH 1/2] kubelet: move most of kubelet server configuration to a config object. This is part of migrating kubelet configuration to the componentconfig api group and is preliminary to retrofitting client configuration and implementing full fledged API group mechinary. Signed-off-by: Mike Danese --- cmd/kubelet/app/options/options.go | 239 +++++++----------- cmd/kubelet/app/server.go | 22 +- contrib/mesos/pkg/executor/service/service.go | 4 +- contrib/mesos/pkg/minion/server.go | 2 +- contrib/mesos/pkg/node/statusupdater.go | 2 +- contrib/mesos/pkg/node/statusupdater_test.go | 6 +- docs/admin/kubelet.md | 11 +- pkg/apis/componentconfig/types.go | 213 ++++++++++++++++ 8 files changed, 324 insertions(+), 175 deletions(-) diff --git a/cmd/kubelet/app/options/options.go b/cmd/kubelet/app/options/options.go index 46e84cc94a4..ef985ae8790 100644 --- a/cmd/kubelet/app/options/options.go +++ b/cmd/kubelet/app/options/options.go @@ -18,11 +18,12 @@ limitations under the License. package options import ( - "net" _ "net/http/pprof" "time" "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/unversioned" + "k8s.io/kubernetes/pkg/apis/componentconfig" "k8s.io/kubernetes/pkg/kubelet/qos" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/master/ports" @@ -39,171 +40,101 @@ const ( // KubeletServer encapsulates all of the parameters necessary for starting up // a kubelet. These can either be set via command line or directly. type KubeletServer struct { - Address net.IP - AllowPrivileged bool - APIServerList []string - AuthPath util.StringFlag // Deprecated -- use KubeConfig instead - CAdvisorPort uint - CertDirectory string - CgroupRoot string - CloudConfigFile string - CloudProvider string - ClusterDNS net.IP - ClusterDomain string - Config string - ConfigureCBR0 bool - ContainerRuntime string - CPUCFSQuota bool - DockerDaemonContainer string - DockerEndpoint string - DockerExecHandlerName string - EnableDebuggingHandlers bool - EnableServer bool - EventBurst int - EventRecordQPS float32 - FileCheckFrequency time.Duration - HealthzBindAddress net.IP - HealthzPort int - HostnameOverride string - HostNetworkSources string - HostPIDSources string - HostIPCSources string - HTTPCheckFrequency time.Duration - ImageGCHighThresholdPercent int - ImageGCLowThresholdPercent int - KubeConfig util.StringFlag - LowDiskSpaceThresholdMB int - ManifestURL string - ManifestURLHeader string - MasterServiceNamespace string - MaxContainerCount int - MaxOpenFiles uint64 - MaxPerPodContainerCount int - MaxPods int - MinimumGCAge time.Duration - NetworkPluginDir string - NetworkPluginName string - VolumePluginDir string - NodeLabels map[string]string - NodeStatusUpdateFrequency time.Duration - OOMScoreAdj int - PodCIDR string - PodInfraContainerImage string - Port uint - ReadOnlyPort uint - RegisterNode bool - RegisterSchedulable bool - RegistryBurst int - RegistryPullQPS float64 - ResolverConfig string - ResourceContainer string - RktPath string - RktStage1Image string - RootDirectory string - RunOnce bool - StandaloneMode bool - StreamingConnectionIdleTimeout time.Duration - SyncFrequency time.Duration - SystemContainer string - TLSCertFile string - TLSPrivateKeyFile string - ReconcileCIDR bool - SystemReserved util.ConfigurationMap - KubeReserved util.ConfigurationMap + componentconfig.KubeletConfiguration + + AuthPath util.StringFlag // Deprecated -- use KubeConfig instead + KubeConfig util.StringFlag + APIServerList []string + + DockerDaemonContainer string + RunOnce bool - // Flags intended for testing - // Is the kubelet containerized? - Containerized bool // Insert a probability of random errors during calls to the master. ChaosChance float64 // Crash immediately, rather than eating panics. ReallyCrashForTesting bool - - KubeAPIQPS float32 - KubeAPIBurst int - - // Pull images one at a time. - SerializeImagePulls bool - ExperimentalFlannelOverlay bool - OutOfDiskTransitionFrequency time.Duration - NodeIP net.IP + SystemReserved util.ConfigurationMap + KubeReserved util.ConfigurationMap } // NewKubeletServer will create a new KubeletServer with default values. func NewKubeletServer() *KubeletServer { return &KubeletServer{ - Address: net.ParseIP("0.0.0.0"), - AuthPath: util.NewStringFlag("/var/lib/kubelet/kubernetes_auth"), // deprecated - CAdvisorPort: 4194, - CertDirectory: "/var/run/kubernetes", - CgroupRoot: "", - ConfigureCBR0: false, - ContainerRuntime: "docker", - CPUCFSQuota: false, - DockerDaemonContainer: "/docker-daemon", - DockerExecHandlerName: "native", - EventBurst: 10, - EventRecordQPS: 5.0, - EnableDebuggingHandlers: true, - EnableServer: true, - FileCheckFrequency: 20 * time.Second, - HealthzBindAddress: net.ParseIP("127.0.0.1"), - HealthzPort: 10248, - HostNetworkSources: kubetypes.AllSource, - HostPIDSources: kubetypes.AllSource, - HostIPCSources: kubetypes.AllSource, - HTTPCheckFrequency: 20 * time.Second, - ImageGCHighThresholdPercent: 90, - ImageGCLowThresholdPercent: 80, - KubeConfig: util.NewStringFlag("/var/lib/kubelet/kubeconfig"), - LowDiskSpaceThresholdMB: 256, - MasterServiceNamespace: api.NamespaceDefault, - MaxContainerCount: 100, - MaxPerPodContainerCount: 2, - MaxOpenFiles: 1000000, - MaxPods: 40, - MinimumGCAge: 1 * time.Minute, - NetworkPluginDir: "/usr/libexec/kubernetes/kubelet-plugins/net/exec/", - NetworkPluginName: "", - VolumePluginDir: "/usr/libexec/kubernetes/kubelet-plugins/volume/exec/", - NodeLabels: make(map[string]string), - NodeStatusUpdateFrequency: 10 * time.Second, - OOMScoreAdj: qos.KubeletOOMScoreAdj, - PodInfraContainerImage: kubetypes.PodInfraContainerImage, - Port: ports.KubeletPort, - ReadOnlyPort: ports.KubeletReadOnlyPort, - RegisterNode: true, // will be ignored if no apiserver is configured - RegisterSchedulable: true, - RegistryBurst: 10, - RegistryPullQPS: 5.0, - ResourceContainer: "/kubelet", - RktPath: "", - RktStage1Image: "", - RootDirectory: defaultRootDir, - SerializeImagePulls: true, - StreamingConnectionIdleTimeout: 5 * time.Minute, - SyncFrequency: 1 * time.Minute, - SystemContainer: "", - ReconcileCIDR: true, - SystemReserved: make(util.ConfigurationMap), - KubeReserved: make(util.ConfigurationMap), - KubeAPIQPS: 5.0, - KubeAPIBurst: 10, - ExperimentalFlannelOverlay: experimentalFlannelOverlay, - OutOfDiskTransitionFrequency: 5 * time.Minute, + AuthPath: util.NewStringFlag("/var/lib/kubelet/kubernetes_auth"), // deprecated + KubeConfig: util.NewStringFlag("/var/lib/kubelet/kubeconfig"), + DockerDaemonContainer: "/docker-daemon", + + SystemReserved: make(util.ConfigurationMap), + KubeReserved: make(util.ConfigurationMap), + KubeletConfiguration: componentconfig.KubeletConfiguration{ + Address: "0.0.0.0", + CAdvisorPort: 4194, + CertDirectory: "/var/run/kubernetes", + CgroupRoot: "", + ConfigureCBR0: false, + ContainerRuntime: "docker", + CPUCFSQuota: false, + DockerExecHandlerName: "native", + EventBurst: 10, + EventRecordQPS: 5.0, + EnableDebuggingHandlers: true, + EnableServer: true, + FileCheckFrequency: unversioned.Duration{20 * time.Second}, + HealthzBindAddress: "127.0.0.1", + HealthzPort: 10248, + HostNetworkSources: kubetypes.AllSource, + HostPIDSources: kubetypes.AllSource, + HostIPCSources: kubetypes.AllSource, + HTTPCheckFrequency: unversioned.Duration{20 * time.Second}, + ImageGCHighThresholdPercent: 90, + ImageGCLowThresholdPercent: 80, + LowDiskSpaceThresholdMB: 256, + MasterServiceNamespace: api.NamespaceDefault, + MaxContainerCount: 100, + MaxPerPodContainerCount: 2, + MaxOpenFiles: 1000000, + MaxPods: 40, + MinimumGCAge: unversioned.Duration{1 * time.Minute}, + NetworkPluginDir: "/usr/libexec/kubernetes/kubelet-plugins/net/exec/", + NetworkPluginName: "", + VolumePluginDir: "/usr/libexec/kubernetes/kubelet-plugins/volume/exec/", + NodeStatusUpdateFrequency: unversioned.Duration{10 * time.Second}, + NodeLabels: make(map[string]string), + OOMScoreAdj: qos.KubeletOOMScoreAdj, + PodInfraContainerImage: kubetypes.PodInfraContainerImage, + Port: ports.KubeletPort, + ReadOnlyPort: ports.KubeletReadOnlyPort, + RegisterNode: true, // will be ignored if no apiserver is configured + RegisterSchedulable: true, + RegistryBurst: 10, + RegistryPullQPS: 5.0, + ResourceContainer: "/kubelet", + RktPath: "", + RktStage1Image: "", + RootDirectory: defaultRootDir, + SerializeImagePulls: true, + StreamingConnectionIdleTimeout: unversioned.Duration{5 * time.Minute}, + SyncFrequency: unversioned.Duration{1 * time.Minute}, + SystemContainer: "", + ReconcileCIDR: true, + KubeAPIQPS: 5.0, + KubeAPIBurst: 10, + ExperimentalFlannelOverlay: experimentalFlannelOverlay, + OutOfDiskTransitionFrequency: unversioned.Duration{5 * time.Minute}, + }, } } // AddFlags adds flags for a specific KubeletServer to the specified FlagSet func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) { fs.StringVar(&s.Config, "config", s.Config, "Path to the config file or directory of files") - fs.DurationVar(&s.SyncFrequency, "sync-frequency", s.SyncFrequency, "Max period between synchronizing running containers and config") - fs.DurationVar(&s.FileCheckFrequency, "file-check-frequency", s.FileCheckFrequency, "Duration between checking config files for new data") - fs.DurationVar(&s.HTTPCheckFrequency, "http-check-frequency", s.HTTPCheckFrequency, "Duration between checking http for new data") + fs.DurationVar(&s.SyncFrequency.Duration, "sync-frequency", s.SyncFrequency.Duration, "Max period between synchronizing running containers and config") + fs.DurationVar(&s.FileCheckFrequency.Duration, "file-check-frequency", s.FileCheckFrequency.Duration, "Duration between checking config files for new data") + fs.DurationVar(&s.HTTPCheckFrequency.Duration, "http-check-frequency", s.HTTPCheckFrequency.Duration, "Duration between checking http for new data") fs.StringVar(&s.ManifestURL, "manifest-url", s.ManifestURL, "URL for accessing the container manifest") fs.StringVar(&s.ManifestURLHeader, "manifest-url-header", s.ManifestURLHeader, "HTTP header to use when accessing the manifest URL, with the key separated from the value with a ':', as in 'key:value'") fs.BoolVar(&s.EnableServer, "enable-server", s.EnableServer, "Enable the Kubelet's server") - fs.IPVar(&s.Address, "address", s.Address, "The IP address for the Kubelet to serve on (set to 0.0.0.0 for all interfaces)") + fs.StringVar(&s.Address, "address", s.Address, "The IP address for the Kubelet to serve on (set to 0.0.0.0 for all interfaces)") fs.UintVar(&s.Port, "port", s.Port, "The port for the Kubelet to serve on.") fs.UintVar(&s.ReadOnlyPort, "read-only-port", s.ReadOnlyPort, "The read-only port for the Kubelet to serve on with no authentication/authorization (set to 0 to disable)") fs.StringVar(&s.TLSCertFile, "tls-cert-file", s.TLSCertFile, ""+ @@ -227,7 +158,7 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) { fs.IntVar(&s.EventBurst, "event-burst", s.EventBurst, "Maximum size of a bursty event records, temporarily allows event records to burst to this number, while still not exceeding event-qps. Only used if --event-qps > 0") fs.BoolVar(&s.RunOnce, "runonce", s.RunOnce, "If true, exit after spawning pods from local manifests or remote urls. Exclusive with --api-servers, and --enable-server") fs.BoolVar(&s.EnableDebuggingHandlers, "enable-debugging-handlers", s.EnableDebuggingHandlers, "Enables server endpoints for log collection and local running of containers and commands") - fs.DurationVar(&s.MinimumGCAge, "minimum-container-ttl-duration", s.MinimumGCAge, "Minimum age for a finished container before it is garbage collected. Examples: '300ms', '10s' or '2h45m'") + fs.DurationVar(&s.MinimumGCAge.Duration, "minimum-container-ttl-duration", s.MinimumGCAge.Duration, "Minimum age for a finished container before it is garbage collected. Examples: '300ms', '10s' or '2h45m'") fs.IntVar(&s.MaxPerPodContainerCount, "maximum-dead-containers-per-container", s.MaxPerPodContainerCount, "Maximum number of old instances to retain per container. Each container takes up some disk space. Default: 2.") fs.IntVar(&s.MaxContainerCount, "maximum-dead-containers", s.MaxContainerCount, "Maximum number of old instances of containers to retain globally. Each container takes up some disk space. Default: 100.") fs.Var(&s.AuthPath, "auth-path", "Path to .kubernetes_auth file, specifying how to authenticate to API server.") @@ -235,17 +166,17 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) { fs.Var(&s.KubeConfig, "kubeconfig", "Path to a kubeconfig file, specifying how to authenticate to API server (the master location is set by the api-servers flag).") fs.UintVar(&s.CAdvisorPort, "cadvisor-port", s.CAdvisorPort, "The port of the localhost cAdvisor endpoint") fs.IntVar(&s.HealthzPort, "healthz-port", s.HealthzPort, "The port of the localhost healthz endpoint") - fs.IPVar(&s.HealthzBindAddress, "healthz-bind-address", s.HealthzBindAddress, "The IP address for the healthz server to serve on, defaulting to 127.0.0.1 (set to 0.0.0.0 for all interfaces)") + fs.StringVar(&s.HealthzBindAddress, "healthz-bind-address", s.HealthzBindAddress, "The IP address for the healthz server to serve on, defaulting to 127.0.0.1 (set to 0.0.0.0 for all interfaces)") fs.IntVar(&s.OOMScoreAdj, "oom-score-adj", s.OOMScoreAdj, "The oom-score-adj value for kubelet process. Values must be within the range [-1000, 1000]") fs.StringSliceVar(&s.APIServerList, "api-servers", []string{}, "List of Kubernetes API servers for publishing events, and reading pods and services. (ip:port), comma separated.") fs.BoolVar(&s.RegisterNode, "register-node", s.RegisterNode, "Register the node with the apiserver (defaults to true if --api-servers is set)") fs.StringVar(&s.ClusterDomain, "cluster-domain", s.ClusterDomain, "Domain for this cluster. If set, kubelet will configure all containers to search this domain in addition to the host's search domains") fs.StringVar(&s.MasterServiceNamespace, "master-service-namespace", s.MasterServiceNamespace, "The namespace from which the kubernetes master services should be injected into pods") - fs.IPVar(&s.ClusterDNS, "cluster-dns", s.ClusterDNS, "IP address for a cluster DNS server. If set, kubelet will configure all containers to use this for DNS resolution in addition to the host's DNS servers") - fs.DurationVar(&s.StreamingConnectionIdleTimeout, "streaming-connection-idle-timeout", s.StreamingConnectionIdleTimeout, "Maximum time a streaming connection can be idle before the connection is automatically closed. Example: '5m'") + fs.StringVar(&s.ClusterDNS, "cluster-dns", s.ClusterDNS, "IP address for a cluster DNS server. If set, kubelet will configure all containers to use this for DNS resolution in addition to the host's DNS servers") + fs.DurationVar(&s.StreamingConnectionIdleTimeout.Duration, "streaming-connection-idle-timeout", s.StreamingConnectionIdleTimeout.Duration, "Maximum time a streaming connection can be idle before the connection is automatically closed. Example: '5m'") + fs.DurationVar(&s.NodeStatusUpdateFrequency.Duration, "node-status-update-frequency", s.NodeStatusUpdateFrequency.Duration, "Specifies how often kubelet posts node status to master. Note: be cautious when changing the constant, it must work with nodeMonitorGracePeriod in nodecontroller. Default: 10s") bindableNodeLabels := util.ConfigurationMap(s.NodeLabels) fs.Var(&bindableNodeLabels, "node-labels", " Labels to add when registering the node in the cluster. Labels must are key=value pairs seperated by ','.") - fs.DurationVar(&s.NodeStatusUpdateFrequency, "node-status-update-frequency", s.NodeStatusUpdateFrequency, "Specifies how often kubelet posts node status to master. Note: be cautious when changing the constant, it must work with nodeMonitorGracePeriod in nodecontroller. Default: 10s") 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") @@ -279,6 +210,6 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) { fs.IntVar(&s.KubeAPIBurst, "kube-api-burst", s.KubeAPIBurst, "Burst to use while talking with kubernetes apiserver") fs.BoolVar(&s.SerializeImagePulls, "serialize-image-pulls", s.SerializeImagePulls, "Pull images one at a time. We recommend *not* changing the default value on nodes that run docker daemon with version < 1.9 or an Aufs storage backend. Issue #10959 has more details. [default=true]") fs.BoolVar(&s.ExperimentalFlannelOverlay, "experimental-flannel-overlay", s.ExperimentalFlannelOverlay, "Experimental support for starting the kubelet with the default overlay network (flannel). Assumes flanneld is already running in client mode. [default=false]") - fs.DurationVar(&s.OutOfDiskTransitionFrequency, "outofdisk-transition-frequency", s.OutOfDiskTransitionFrequency, "Duration for which the kubelet has to wait before transitioning out of out-of-disk node condition status. Default: 5m0s") - fs.IPVar(&s.NodeIP, "node-ip", s.NodeIP, "IP address of the node. If set, kubelet will use this IP address for the node") + fs.DurationVar(&s.OutOfDiskTransitionFrequency.Duration, "outofdisk-transition-frequency", s.OutOfDiskTransitionFrequency.Duration, "Duration for which the kubelet has to wait before transitioning out of out-of-disk node condition status. Default: 5m0s") + fs.StringVar(&s.NodeIP, "node-ip", s.NodeIP, "IP address of the node. If set, kubelet will use this IP address for the node") } diff --git a/cmd/kubelet/app/server.go b/cmd/kubelet/app/server.go index 2010fb21e56..32d9599ad63 100644 --- a/cmd/kubelet/app/server.go +++ b/cmd/kubelet/app/server.go @@ -178,13 +178,13 @@ func UnsecuredKubeletConfig(s *options.KubeletServer) (*KubeletConfig, error) { } return &KubeletConfig{ - Address: s.Address, + Address: net.ParseIP(s.Address), AllowPrivileged: s.AllowPrivileged, Auth: nil, // default does not enforce auth[nz] CAdvisorInterface: nil, // launches background processes, not set here CgroupRoot: s.CgroupRoot, Cloud: nil, // cloud provider might start background processes - ClusterDNS: s.ClusterDNS, + ClusterDNS: net.ParseIP(s.ClusterDNS), ClusterDomain: s.ClusterDomain, ConfigFile: s.Config, ConfigureCBR0: s.ConfigureCBR0, @@ -199,12 +199,12 @@ func UnsecuredKubeletConfig(s *options.KubeletServer) (*KubeletConfig, error) { EnableServer: s.EnableServer, EventBurst: s.EventBurst, EventRecordQPS: s.EventRecordQPS, - FileCheckFrequency: s.FileCheckFrequency, + FileCheckFrequency: s.FileCheckFrequency.Duration, HostnameOverride: s.HostnameOverride, HostNetworkSources: hostNetworkSources, HostPIDSources: hostPIDSources, HostIPCSources: hostIPCSources, - HTTPCheckFrequency: s.HTTPCheckFrequency, + HTTPCheckFrequency: s.HTTPCheckFrequency.Duration, ImageGCPolicy: imageGCPolicy, KubeClient: nil, ManifestURL: s.ManifestURL, @@ -214,14 +214,14 @@ func UnsecuredKubeletConfig(s *options.KubeletServer) (*KubeletConfig, error) { MaxOpenFiles: s.MaxOpenFiles, MaxPerPodContainerCount: s.MaxPerPodContainerCount, MaxPods: s.MaxPods, - MinimumGCAge: s.MinimumGCAge, + MinimumGCAge: s.MinimumGCAge.Duration, Mounter: mounter, ChownRunner: chownRunner, ChmodRunner: chmodRunner, NetworkPluginName: s.NetworkPluginName, NetworkPlugins: ProbeNetworkPlugins(s.NetworkPluginDir), NodeLabels: s.NodeLabels, - NodeStatusUpdateFrequency: s.NodeStatusUpdateFrequency, + NodeStatusUpdateFrequency: s.NodeStatusUpdateFrequency.Duration, OOMAdjuster: oom.NewOOMAdjuster(), OSInterface: kubecontainer.RealOS{}, PodCIDR: s.PodCIDR, @@ -242,16 +242,16 @@ func UnsecuredKubeletConfig(s *options.KubeletServer) (*KubeletConfig, error) { Runonce: s.RunOnce, SerializeImagePulls: s.SerializeImagePulls, StandaloneMode: (len(s.APIServerList) == 0), - StreamingConnectionIdleTimeout: s.StreamingConnectionIdleTimeout, - SyncFrequency: s.SyncFrequency, + StreamingConnectionIdleTimeout: s.StreamingConnectionIdleTimeout.Duration, + SyncFrequency: s.SyncFrequency.Duration, SystemContainer: s.SystemContainer, TLSOptions: tlsOptions, Writer: writer, VolumePlugins: ProbeVolumePlugins(s.VolumePluginDir), - OutOfDiskTransitionFrequency: s.OutOfDiskTransitionFrequency, + OutOfDiskTransitionFrequency: s.OutOfDiskTransitionFrequency.Duration, ExperimentalFlannelOverlay: s.ExperimentalFlannelOverlay, - NodeIP: s.NodeIP, + NodeIP: net.ParseIP(s.NodeIP), }, nil } @@ -324,7 +324,7 @@ func Run(s *options.KubeletServer, kcfg *KubeletConfig) error { if s.HealthzPort > 0 { healthz.DefaultHealthz() go util.Until(func() { - err := http.ListenAndServe(net.JoinHostPort(s.HealthzBindAddress.String(), strconv.Itoa(s.HealthzPort)), nil) + err := http.ListenAndServe(net.JoinHostPort(s.HealthzBindAddress, strconv.Itoa(s.HealthzPort)), nil) if err != nil { glog.Errorf("Starting health server failed: %v", err) } diff --git a/contrib/mesos/pkg/executor/service/service.go b/contrib/mesos/pkg/executor/service/service.go index 048b59afde5..bf37c4d9ada 100644 --- a/contrib/mesos/pkg/executor/service/service.go +++ b/contrib/mesos/pkg/executor/service/service.go @@ -65,7 +65,7 @@ func NewKubeletExecutorServer() *KubeletExecutorServer { } else { k.RootDirectory = pwd // mesos sandbox dir } - k.Address = net.ParseIP(defaultBindingAddress()) + k.Address = defaultBindingAddress() return k } @@ -121,7 +121,7 @@ func (s *KubeletExecutorServer) runExecutor( dconfig := bindings.DriverConfig{ Executor: exec, HostnameOverride: s.HostnameOverride, - BindingAddress: s.Address, + BindingAddress: net.ParseIP(s.Address), } driver, err := bindings.NewMesosExecutorDriver(dconfig) if err != nil { diff --git a/contrib/mesos/pkg/minion/server.go b/contrib/mesos/pkg/minion/server.go index f141348c48c..7654b9d250a 100644 --- a/contrib/mesos/pkg/minion/server.go +++ b/contrib/mesos/pkg/minion/server.go @@ -135,7 +135,7 @@ func findMesosCgroup(prefix string) string { func (ms *MinionServer) launchProxyServer() { bindAddress := "0.0.0.0" if !ms.proxyBindall { - bindAddress = ms.KubeletExecutorServer.Address.String() + bindAddress = ms.KubeletExecutorServer.Address } args := []string{ fmt.Sprintf("--bind-address=%s", bindAddress), diff --git a/contrib/mesos/pkg/node/statusupdater.go b/contrib/mesos/pkg/node/statusupdater.go index 9644f8d422c..4f69656a0f7 100644 --- a/contrib/mesos/pkg/node/statusupdater.go +++ b/contrib/mesos/pkg/node/statusupdater.go @@ -51,7 +51,7 @@ func NewStatusUpdater(client *client.Client, relistPeriod time.Duration, nowFunc return &StatusUpdater{ client: client, relistPeriod: relistPeriod, - heartBeatPeriod: kubecfg.NodeStatusUpdateFrequency, + heartBeatPeriod: kubecfg.NodeStatusUpdateFrequency.Duration, nowFunc: nowFunc, } } diff --git a/contrib/mesos/pkg/node/statusupdater_test.go b/contrib/mesos/pkg/node/statusupdater_test.go index ffb0cf441fd..aba8fca5b33 100644 --- a/contrib/mesos/pkg/node/statusupdater_test.go +++ b/contrib/mesos/pkg/node/statusupdater_test.go @@ -48,7 +48,7 @@ func Test_nodeWithUpdatedStatus(t *testing.T) { cm := cmoptions.NewCMServer() kubecfg := kubeletoptions.NewKubeletServer() - assert.True(t, kubecfg.NodeStatusUpdateFrequency*3 < cm.NodeMonitorGracePeriod) // sanity check for defaults + assert.True(t, kubecfg.NodeStatusUpdateFrequency.Duration*3 < cm.NodeMonitorGracePeriod) // sanity check for defaults n := testNode(0, api.ConditionTrue, "KubeletReady") su := NewStatusUpdater(nil, cm.NodeMonitorPeriod, func() time.Time { return now }) @@ -63,12 +63,12 @@ func Test_nodeWithUpdatedStatus(t *testing.T) { assert.Equal(t, getCondition(&n2.Status, api.NodeReady).Reason, slaveReadyReason) assert.Equal(t, getCondition(&n2.Status, api.NodeReady).Message, slaveReadyMessage) - n = testNode(-kubecfg.NodeStatusUpdateFrequency, api.ConditionTrue, "KubeletReady") + n = testNode(-kubecfg.NodeStatusUpdateFrequency.Duration, api.ConditionTrue, "KubeletReady") n2, updated, err = su.nodeWithUpdatedStatus(n) assert.NoError(t, err) assert.False(t, updated, "no update expected b/c kubelet's update was missed only once") - n = testNode(-kubecfg.NodeStatusUpdateFrequency*3, api.ConditionTrue, "KubeletReady") + n = testNode(-kubecfg.NodeStatusUpdateFrequency.Duration*3, api.ConditionTrue, "KubeletReady") n2, updated, err = su.nodeWithUpdatedStatus(n) assert.NoError(t, err) assert.True(t, updated, "update expected b/c kubelet's update is older than 3*DefaultNodeStatusUpdateFrequency") diff --git a/docs/admin/kubelet.md b/docs/admin/kubelet.md index 2050a5575b6..4933807b40a 100644 --- a/docs/admin/kubelet.md +++ b/docs/admin/kubelet.md @@ -64,7 +64,7 @@ kubelet ### Options ``` - --address=0.0.0.0: The IP address for the Kubelet to serve on (set to 0.0.0.0 for all interfaces) + --address="0.0.0.0": The IP address for the Kubelet to serve on (set to 0.0.0.0 for all interfaces) --allow-privileged[=false]: If true, allow containers to request privileged mode. [default=false] --api-servers=[]: List of Kubernetes API servers for publishing events, and reading pods and services. (ip:port), comma separated. --cadvisor-port=4194: The port of the localhost cAdvisor endpoint @@ -73,7 +73,7 @@ kubelet --chaos-chance=0: If > 0.0, introduce random client errors and latency. Intended for testing. [default=0.0] --cloud-config="": The path to the cloud provider configuration file. Empty string for no configuration file. --cloud-provider="": The provider for cloud services. Empty string for no provider. - --cluster-dns=: IP address for a cluster DNS server. If set, kubelet will configure all containers to use this for DNS resolution in addition to the host's DNS servers + --cluster-dns="": IP address for a cluster DNS server. If set, kubelet will configure all containers to use this for DNS resolution in addition to the host's DNS servers --cluster-domain="": Domain for this cluster. If set, kubelet will configure all containers to search this domain in addition to the host's search domains --config="": Path to the config file or directory of files --configure-cbr0[=false]: If true, kubelet will configure cbr0 based on Node.Spec.PodCIDR. @@ -89,7 +89,7 @@ kubelet --experimental-flannel-overlay[=false]: Experimental support for starting the kubelet with the default overlay network (flannel). Assumes flanneld is already running in client mode. [default=false] --file-check-frequency=20s: Duration between checking config files for new data --google-json-key="": The Google Cloud Platform Service Account JSON Key to use for authentication. - --healthz-bind-address=127.0.0.1: The IP address for the healthz server to serve on, defaulting to 127.0.0.1 (set to 0.0.0.0 for all interfaces) + --healthz-bind-address="127.0.0.1": The IP address for the healthz server to serve on, defaulting to 127.0.0.1 (set to 0.0.0.0 for all interfaces) --healthz-port=10248: The port of the localhost healthz endpoint --host-ipc-sources="*": Comma-separated list of sources from which the Kubelet allows pods to use the host ipc namespace. [default="*"] --host-network-sources="*": Comma-separated list of sources from which the Kubelet allows pods to use of host network. [default="*"] @@ -114,8 +114,13 @@ kubelet --minimum-container-ttl-duration=1m0s: Minimum age for a finished container before it is garbage collected. Examples: '300ms', '10s' or '2h45m' --network-plugin="": The name of the network plugin to be invoked for various events in kubelet/pod lifecycle --network-plugin-dir="/usr/libexec/kubernetes/kubelet-plugins/net/exec/": The full path of the directory in which to search for network plugins +<<<<<<< HEAD --node-ip=: IP address of the node. If set, kubelet will use this IP address for the node --node-labels=: Labels to add when registering the node in the cluster. Labels must are key=value pairs seperated by ','. +======= + --node-ip="": IP address of the node. If set, kubelet will use this IP address for the node + --node-labels="": Labels to add when registering the node in the cluster. Labels must be specified as a json map of key:value pairs. +>>>>>>> kubelet: move most of kubelet server configuration to a config object. --node-status-update-frequency=10s: Specifies how often kubelet posts node status to master. Note: be cautious when changing the constant, it must work with nodeMonitorGracePeriod in nodecontroller. Default: 10s --oom-score-adj=-999: The oom-score-adj value for kubelet process. Values must be within the range [-1000, 1000] --outofdisk-transition-frequency=5m0s: Duration for which the kubelet has to wait before transitioning out of out-of-disk node condition status. Default: 5m0s diff --git a/pkg/apis/componentconfig/types.go b/pkg/apis/componentconfig/types.go index 8c40d1bf44c..65591b40428 100644 --- a/pkg/apis/componentconfig/types.go +++ b/pkg/apis/componentconfig/types.go @@ -63,6 +63,219 @@ const ( ProxyModeIPTables ProxyMode = "iptables" ) +// TODO: curate the ordering and structure of this config object +type KubeletConfiguration struct { + // config is the path to the config file or directory of files + Config string `json:"config"` + // syncFrequency is the max period between synchronizing running + // containers and config + SyncFrequency unversioned.Duration `json:"syncFrequency"` + // fileCheckFrequency is the duration between checking config files for + // new data + FileCheckFrequency unversioned.Duration `json:"fileCheckFrequency"` + // httpCheckFrequency is the duration between checking http for new data + HTTPCheckFrequency unversioned.Duration `json:"httpCheckFrequency"` + // manifestURL is the URL for accessing the container manifest + ManifestURL string `json:"manifestURL"` + // manifestURLHeader is the HTTP header to use when accessing the manifest + // URL, with the key separated from the value with a ':', as in 'key:value' + ManifestURLHeader string `json:"manifestURLHeader"` + // enableServer enables the Kubelet's server + EnableServer bool `json:"enableServer"` + // address is the IP address for the Kubelet to serve on (set to 0.0.0.0 + // for all interfaces) + Address string `json:"address"` + // port is the port for the Kubelet to serve on. + Port uint `json:"port"` + // readOnlyPort is the read-only port for the Kubelet to serve on with + // no authentication/authorization (set to 0 to disable) + ReadOnlyPort uint `json:"readOnlyPort"` + // tLSCertFile is the file containing x509 Certificate for HTTPS. (CA cert, + // if any, concatenated after server cert). If tlsCertFile and + // tlsPrivateKeyFile are not provided, a self-signed certificate + // and key are generated for the public address and saved to the directory + // passed to certDir. + TLSCertFile string `json:"tLSCertFile"` + // tLSPrivateKeyFile is the ile containing x509 private key matching + // tlsCertFile. + TLSPrivateKeyFile string `json:"tLSPrivateKeyFile"` + // certDirectory is the directory where the TLS certs are located (by + // default /var/run/kubernetes). If tlsCertFile and tlsPrivateKeyFile + // are provided, this flag will be ignored. + CertDirectory string `json:"certDirectory"` + // hostnameOverride is the hostname used to identify the kubelet instead + // of the actual hostname. + HostnameOverride string `json:"hostnameOverride"` + // podInfraContainerImage is the image whose network/ipc namespaces + // containers in each pod will use. + PodInfraContainerImage string `json:"podInfraContainerImage"` + // dockerEndpoint is the path to the docker endpoint to communicate with. + DockerEndpoint string `json:"dockerEndpoint"` + // rootDirectory is the directory path to place kubelet files (volume + // mounts,etc). + RootDirectory string `json:"rootDirectory"` + // allowPrivileged enables containers to request privileged mode. + // Defaults to false. + AllowPrivileged bool `json:"allowPrivileged"` + // hostNetworkSources is a comma-separated list of sources from which the + // Kubelet allows pods to use of host network. Defaults to "*". + HostNetworkSources string `json:"hostNetworkSources"` + // hostPIDSources is a comma-separated list of sources from which the + // Kubelet allows pods to use the host pid namespace. Defaults to "*". + HostPIDSources string `json:"hostPIDSources"` + // hostIPCSources is a comma-separated list of sources from which the + // Kubelet allows pods to use the host ipc namespace. Defaults to "*". + HostIPCSources string `json:"hostIPCSources"` + // registryPullQPS is the limit of registry pulls per second. If 0, + // unlimited. Set to 0 for no limit. Defaults to 5.0. + RegistryPullQPS float64 `json:"registryPullQPS"` + // registryBurst is the maximum size of a bursty pulls, temporarily allows + // pulls to burst to this number, while still not exceeding registryQps. + // Only used if registryQps > 0. + RegistryBurst int `json:"registryBurst"` + // eventRecordQPS is the maximum event creations per second. If 0, there + // is no limit enforced. + EventRecordQPS float32 `json:"eventRecordQPS"` + // eventBurst is the maximum size of a bursty event records, temporarily + // allows event records to burst to this number, while still not exceeding + // event-qps. Only used if eventQps > 0 + EventBurst int `json:"eventBurst"` + // enableDebuggingHandlers enables server endpoints for log collection + // and local running of containers and commands + EnableDebuggingHandlers bool `json:"enableDebuggingHandlers"` + // minimumGCAge is the minimum age for a finished container before it is + // garbage collected. + MinimumGCAge unversioned.Duration `json:"minimumGCAge"` + // maxPerPodContainerCount is the maximum number of old instances to + // retain per container. Each container takes up some disk space. + MaxPerPodContainerCount int `json:"maxPerPodContainerCount"` + // maxContainerCount is the maximum number of old instances of containers + // to retain globally. Each container takes up some disk space. + MaxContainerCount int `json:"maxContainerCount"` + // cAdvisorPort is the port of the localhost cAdvisor endpoint + CAdvisorPort uint `json:"cAdvisorPort"` + // healthzPort is the port of the localhost healthz endpoint + HealthzPort int `json:"healthzPort"` + // healthzBindAddress is the IP address for the healthz server to serve + // on. + HealthzBindAddress string `json:"healthzBindAddress"` + // oomScoreAdj is The oom-score-adj value for kubelet process. Values + // must be within the range [-1000, 1000]. + OOMScoreAdj int `json:"oomScoreAdj"` + // registerNode enables automatic registration with the apiserver. + RegisterNode bool `json:"registerNode"` + // clusterDomain is the DNS domain for this cluster. If set, kubelet will + // configure all containers to search this domain in addition to the + // host's search domains. + ClusterDomain string `json:"clusterDomain"` + // masterServiceNamespace is The namespace from which the kubernetes + // master services should be injected into pods. + MasterServiceNamespace string `json:"masterServiceNamespace"` + // clusterDNS is the IP address for a cluster DNS server. If set, kubelet + // will configure all containers to use this for DNS resolution in + // addition to the host's DNS servers + ClusterDNS string `json:"clusterDNS"` + // streamingConnectionIdleTimeout is the maximum time a streaming connection + // can be idle before the connection is automatically closed. + StreamingConnectionIdleTimeout unversioned.Duration `json:"streamingConnectionIdleTimeout"` + // nodeStatusUpdateFrequency is the frequency that kubelet posts node + // status to master. Note: be cautious when changing the constant, it + // must work with nodeMonitorGracePeriod in nodecontroller. + NodeStatusUpdateFrequency unversioned.Duration `json:"nodeStatusUpdateFrequency"` + // imageGCHighThresholdPercent is the percent of disk usage after which + // image garbage collection is always run. + ImageGCHighThresholdPercent int `json:"imageGCHighThresholdPercent"` + // imageGCLowThresholdPercent is the percent of disk usage before which + // image garbage collection is never run. Lowest disk usage to garbage + // collect to. + ImageGCLowThresholdPercent int `json:"imageGCLowThresholdPercent"` + // lowDiskSpaceThresholdMB is the absolute free disk space, in MB, to + // maintain. When disk space falls below this threshold, new pods would + // be rejected. + LowDiskSpaceThresholdMB int `json:"lowDiskSpaceThresholdMB"` + // networkPluginName is the name of the network plugin to be invoked for + // various events in kubelet/pod lifecycle + NetworkPluginName string `json:"networkPluginName"` + // networkPluginDir is the full path of the directory in which to search + // for network plugins + NetworkPluginDir string `json:"networkPluginDir"` + // volumePluginDir is the full path of the directory in which to search + // for additional third party volume plugins + VolumePluginDir string `json:"volumePluginDir"` + // cloudProvider is the provider for cloud services. + CloudProvider string `json:"cloudProvider,omitempty"` + // cloudConfigFile is the path to the cloud provider configuration file. + CloudConfigFile string `json:"cloudConfigFile,omitempty"` + // resourceContainer is the absolute name of the resource-only container + // to create and run the Kubelet in. + ResourceContainer string `json:"resourceContainer,omitempty"` + // cgroupRoot is the root cgroup to use for pods. This is handled by the + // container runtime on a best effort basis. + CgroupRoot string `json:"cgroupRoot,omitempty"` + // containerRuntime is the container runtime to use. + ContainerRuntime string `json:"containerRuntime"` + // rktPath is hte path of rkt binary. Leave empty to use the first rkt in + // $PATH. + RktPath string `json:"rktPath,omitempty"` + // rktStage1Image is the image to use as stage1. Local paths and + // http/https URLs are supported. + RktStage1Image string `json:"rktStage1Image,omitempty"` + // systemContainer is the resource-only container in which to place + // all non-kernel processes that are not already in a container. Empty + // for no container. Rolling back the flag requires a reboot. + SystemContainer string `json:"systemContainer"` + // configureCBR0 enables the kublet to configure cbr0 based on + // Node.Spec.PodCIDR. + ConfigureCBR0 bool `json:"configureCbr0"` + // maxPods is the number of pods that can run on this Kubelet. + MaxPods int `json:"maxPods"` + // dockerExecHandlerName is the handler to use when executing a command + // in a container. Valid values are 'native' and 'nsenter'. Defaults to + // 'native'. + DockerExecHandlerName string `json:"dockerExecHandlerName"` + // The CIDR to use for pod IP addresses, only used in standalone mode. + // In cluster mode, this is obtained from the master. + PodCIDR string `json:"podCIDR"` + // ResolverConfig is the resolver configuration file used as the basis + // for the container DNS resolution configuration."), [] + ResolverConfig string `json:"resolvConf"` + // cpuCFSQuota is Enable CPU CFS quota enforcement for containers that + // specify CPU limits + CPUCFSQuota bool `json:"cpuCFSQuota"` + // containerized should be set to true if kubelet is running in a container. + Containerized bool `json:"containerized"` + // maxOpenFiles is Number of files that can be opened by Kubelet process. + MaxOpenFiles uint64 `json:"maxOpenFiles"` + // reconcileCIDR is Reconcile node CIDR with the CIDR specified by the + // API server. No-op if register-node or configure-cbr0 is false. + ReconcileCIDR bool `json:"reconcileCIDR"` + // registerSchedulable tells the kubelet to register the node as + // schedulable. No-op if register-node is false. + RegisterSchedulable bool `json:"registerSchedulable"` + // kubeAPIQPS is the QPS to use while talking with kubernetes apiserver + KubeAPIQPS float32 `json:"kubeAPIQPS"` + // kubeAPIBurst is the burst to allow while talking with kubernetes + // apiserver + KubeAPIBurst int `json:"kubeAPIBurst"` + // serializeImagePulls when enabled, tells the Kubelet to pull images one + // at a time. We recommend *not* changing the default value on nodes that + // run docker daemon with version < 1.9 or an Aufs storage backend. + // Issue #10959 has more details. + SerializeImagePulls bool `json:"serializeImagePulls"` + // experimentalFlannelOverlay enables experimental support for starting the + // kubelet with the default overlay network (flannel). Assumes flanneld + // is already running in client mode. + ExperimentalFlannelOverlay bool `json:"experimentalFlannelOverlay"` + // outOfDiskTransitionFrequency is duration for which the kubelet has to + // wait before transitioning out of out-of-disk node condition status. + OutOfDiskTransitionFrequency unversioned.Duration `json:"outOfDiskTransitionFrequency,omitempty"` + // nodeIP is IP address of the node. If set, kubelet will use this IP + // address for the node. + NodeIP string `json:"nodeIP,omitempty"` + // nodeLabels to add when registering the node in the cluster. + NodeLabels map[string]string `json:"nodeLabels"` +} + // LeaderElectionConfiguration defines the configuration of leader election // clients for components that can run with leader election enabled. type LeaderElectionConfiguration struct { From fe8ae1a28a18d373331ad2b331b98645aeaa34fa Mon Sep 17 00:00:00 2001 From: Mike Danese Date: Tue, 12 Jan 2016 11:53:10 -0800 Subject: [PATCH 2/2] autogenerated --- docs/admin/kubelet.md | 9 +- pkg/apis/componentconfig/types.generated.go | 3469 ++++++++++++++++++- 2 files changed, 3361 insertions(+), 117 deletions(-) diff --git a/docs/admin/kubelet.md b/docs/admin/kubelet.md index 4933807b40a..42a99a7aca7 100644 --- a/docs/admin/kubelet.md +++ b/docs/admin/kubelet.md @@ -114,13 +114,8 @@ kubelet --minimum-container-ttl-duration=1m0s: Minimum age for a finished container before it is garbage collected. Examples: '300ms', '10s' or '2h45m' --network-plugin="": The name of the network plugin to be invoked for various events in kubelet/pod lifecycle --network-plugin-dir="/usr/libexec/kubernetes/kubelet-plugins/net/exec/": The full path of the directory in which to search for network plugins -<<<<<<< HEAD - --node-ip=: IP address of the node. If set, kubelet will use this IP address for the node - --node-labels=: Labels to add when registering the node in the cluster. Labels must are key=value pairs seperated by ','. -======= --node-ip="": IP address of the node. If set, kubelet will use this IP address for the node - --node-labels="": Labels to add when registering the node in the cluster. Labels must be specified as a json map of key:value pairs. ->>>>>>> kubelet: move most of kubelet server configuration to a config object. + --node-labels=: Labels to add when registering the node in the cluster. Labels must are key=value pairs seperated by ','. --node-status-update-frequency=10s: Specifies how often kubelet posts node status to master. Note: be cautious when changing the constant, it must work with nodeMonitorGracePeriod in nodecontroller. Default: 10s --oom-score-adj=-999: The oom-score-adj value for kubelet process. Values must be within the range [-1000, 1000] --outofdisk-transition-frequency=5m0s: Duration for which the kubelet has to wait before transitioning out of out-of-disk node condition status. Default: 5m0s @@ -150,7 +145,7 @@ kubelet --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 ``` -###### Auto generated by spf13/cobra on 14-Jan-2016 +###### Auto generated by spf13/cobra on 15-Jan-2016 diff --git a/pkg/apis/componentconfig/types.generated.go b/pkg/apis/componentconfig/types.generated.go index 89e5b961679..47b6c0c1987 100644 --- a/pkg/apis/componentconfig/types.generated.go +++ b/pkg/apis/componentconfig/types.generated.go @@ -986,7 +986,7 @@ func (x *ProxyMode) CodecDecodeSelf(d *codec1978.Decoder) { } } -func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { +func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r @@ -1000,14 +1000,22 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep102 := !z.EncBinary() yy2arr102 := z.EncBasicHandle().StructToArray - var yyq102 [4]bool + var yyq102 [70]bool _, _, _ = yysep102, yyq102, yy2arr102 const yyr102 bool = false + yyq102[45] = x.CloudProvider != "" + yyq102[46] = x.CloudConfigFile != "" + yyq102[47] = x.ResourceContainer != "" + yyq102[48] = x.CgroupRoot != "" + yyq102[50] = x.RktPath != "" + yyq102[51] = x.RktStage1Image != "" + yyq102[67] = true + yyq102[68] = x.NodeIP != "" var yynn102 int if yyr102 || yy2arr102 { - r.EncodeArrayStart(4) + r.EncodeArrayStart(70) } else { - yynn102 = 4 + yynn102 = 62 for _, b := range yyq102 { if b { yynn102++ @@ -1022,22 +1030,22 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym104 if false { } else { - r.EncodeBool(bool(x.LeaderElect)) + r.EncodeString(codecSelferC_UTF81234, string(x.Config)) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("leaderElect")) + r.EncodeString(codecSelferC_UTF81234, string("config")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yym105 := z.EncBinary() _ = yym105 if false { } else { - r.EncodeBool(bool(x.LeaderElect)) + r.EncodeString(codecSelferC_UTF81234, string(x.Config)) } } if yyr102 || yy2arr102 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy107 := &x.LeaseDuration + yy107 := &x.SyncFrequency yym108 := z.EncBinary() _ = yym108 if false { @@ -1049,9 +1057,9 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("leaseDuration")) + r.EncodeString(codecSelferC_UTF81234, string("syncFrequency")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy109 := &x.LeaseDuration + yy109 := &x.SyncFrequency yym110 := z.EncBinary() _ = yym110 if false { @@ -1064,7 +1072,7 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr102 || yy2arr102 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy112 := &x.RenewDeadline + yy112 := &x.FileCheckFrequency yym113 := z.EncBinary() _ = yym113 if false { @@ -1076,9 +1084,9 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("renewDeadline")) + r.EncodeString(codecSelferC_UTF81234, string("fileCheckFrequency")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy114 := &x.RenewDeadline + yy114 := &x.FileCheckFrequency yym115 := z.EncBinary() _ = yym115 if false { @@ -1091,7 +1099,7 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr102 || yy2arr102 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy117 := &x.RetryPeriod + yy117 := &x.HTTPCheckFrequency yym118 := z.EncBinary() _ = yym118 if false { @@ -1103,9 +1111,9 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("retryPeriod")) + r.EncodeString(codecSelferC_UTF81234, string("httpCheckFrequency")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy119 := &x.RetryPeriod + yy119 := &x.HTTPCheckFrequency yym120 := z.EncBinary() _ = yym120 if false { @@ -1117,6 +1125,3247 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } } if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym122 := z.EncBinary() + _ = yym122 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ManifestURL)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("manifestURL")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym123 := z.EncBinary() + _ = yym123 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ManifestURL)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym125 := z.EncBinary() + _ = yym125 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ManifestURLHeader)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("manifestURLHeader")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym126 := z.EncBinary() + _ = yym126 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ManifestURLHeader)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym128 := z.EncBinary() + _ = yym128 + if false { + } else { + r.EncodeBool(bool(x.EnableServer)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("enableServer")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym129 := z.EncBinary() + _ = yym129 + if false { + } else { + r.EncodeBool(bool(x.EnableServer)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym131 := z.EncBinary() + _ = yym131 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Address)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("address")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym132 := z.EncBinary() + _ = yym132 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Address)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym134 := z.EncBinary() + _ = yym134 + if false { + } else { + r.EncodeUint(uint64(x.Port)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("port")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym135 := z.EncBinary() + _ = yym135 + if false { + } else { + r.EncodeUint(uint64(x.Port)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym137 := z.EncBinary() + _ = yym137 + if false { + } else { + r.EncodeUint(uint64(x.ReadOnlyPort)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("readOnlyPort")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym138 := z.EncBinary() + _ = yym138 + if false { + } else { + r.EncodeUint(uint64(x.ReadOnlyPort)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym140 := z.EncBinary() + _ = yym140 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.TLSCertFile)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("tLSCertFile")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym141 := z.EncBinary() + _ = yym141 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.TLSCertFile)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym143 := z.EncBinary() + _ = yym143 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.TLSPrivateKeyFile)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("tLSPrivateKeyFile")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym144 := z.EncBinary() + _ = yym144 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.TLSPrivateKeyFile)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym146 := z.EncBinary() + _ = yym146 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.CertDirectory)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("certDirectory")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym147 := z.EncBinary() + _ = yym147 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.CertDirectory)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym149 := z.EncBinary() + _ = yym149 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.HostnameOverride)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("hostnameOverride")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym150 := z.EncBinary() + _ = yym150 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.HostnameOverride)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym152 := z.EncBinary() + _ = yym152 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.PodInfraContainerImage)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("podInfraContainerImage")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym153 := z.EncBinary() + _ = yym153 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.PodInfraContainerImage)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym155 := z.EncBinary() + _ = yym155 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.DockerEndpoint)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("dockerEndpoint")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym156 := z.EncBinary() + _ = yym156 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.DockerEndpoint)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym158 := z.EncBinary() + _ = yym158 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.RootDirectory)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("rootDirectory")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym159 := z.EncBinary() + _ = yym159 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.RootDirectory)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym161 := z.EncBinary() + _ = yym161 + if false { + } else { + r.EncodeBool(bool(x.AllowPrivileged)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("allowPrivileged")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym162 := z.EncBinary() + _ = yym162 + if false { + } else { + r.EncodeBool(bool(x.AllowPrivileged)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym164 := z.EncBinary() + _ = yym164 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.HostNetworkSources)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("hostNetworkSources")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym165 := z.EncBinary() + _ = yym165 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.HostNetworkSources)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym167 := z.EncBinary() + _ = yym167 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.HostPIDSources)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("hostPIDSources")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym168 := z.EncBinary() + _ = yym168 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.HostPIDSources)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym170 := z.EncBinary() + _ = yym170 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.HostIPCSources)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("hostIPCSources")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym171 := z.EncBinary() + _ = yym171 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.HostIPCSources)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym173 := z.EncBinary() + _ = yym173 + if false { + } else { + r.EncodeFloat64(float64(x.RegistryPullQPS)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("registryPullQPS")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym174 := z.EncBinary() + _ = yym174 + if false { + } else { + r.EncodeFloat64(float64(x.RegistryPullQPS)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym176 := z.EncBinary() + _ = yym176 + if false { + } else { + r.EncodeInt(int64(x.RegistryBurst)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("registryBurst")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym177 := z.EncBinary() + _ = yym177 + if false { + } else { + r.EncodeInt(int64(x.RegistryBurst)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym179 := z.EncBinary() + _ = yym179 + if false { + } else { + r.EncodeFloat32(float32(x.EventRecordQPS)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("eventRecordQPS")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym180 := z.EncBinary() + _ = yym180 + if false { + } else { + r.EncodeFloat32(float32(x.EventRecordQPS)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym182 := z.EncBinary() + _ = yym182 + if false { + } else { + r.EncodeInt(int64(x.EventBurst)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("eventBurst")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym183 := z.EncBinary() + _ = yym183 + if false { + } else { + r.EncodeInt(int64(x.EventBurst)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym185 := z.EncBinary() + _ = yym185 + if false { + } else { + r.EncodeBool(bool(x.EnableDebuggingHandlers)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("enableDebuggingHandlers")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym186 := z.EncBinary() + _ = yym186 + if false { + } else { + r.EncodeBool(bool(x.EnableDebuggingHandlers)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy188 := &x.MinimumGCAge + yym189 := z.EncBinary() + _ = yym189 + if false { + } else if z.HasExtensions() && z.EncExt(yy188) { + } else if !yym189 && z.IsJSONHandle() { + z.EncJSONMarshal(yy188) + } else { + z.EncFallback(yy188) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("minimumGCAge")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy190 := &x.MinimumGCAge + yym191 := z.EncBinary() + _ = yym191 + if false { + } else if z.HasExtensions() && z.EncExt(yy190) { + } else if !yym191 && z.IsJSONHandle() { + z.EncJSONMarshal(yy190) + } else { + z.EncFallback(yy190) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym193 := z.EncBinary() + _ = yym193 + if false { + } else { + r.EncodeInt(int64(x.MaxPerPodContainerCount)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("maxPerPodContainerCount")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym194 := z.EncBinary() + _ = yym194 + if false { + } else { + r.EncodeInt(int64(x.MaxPerPodContainerCount)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym196 := z.EncBinary() + _ = yym196 + if false { + } else { + r.EncodeInt(int64(x.MaxContainerCount)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("maxContainerCount")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym197 := z.EncBinary() + _ = yym197 + if false { + } else { + r.EncodeInt(int64(x.MaxContainerCount)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym199 := z.EncBinary() + _ = yym199 + if false { + } else { + r.EncodeUint(uint64(x.CAdvisorPort)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("cAdvisorPort")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym200 := z.EncBinary() + _ = yym200 + if false { + } else { + r.EncodeUint(uint64(x.CAdvisorPort)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym202 := z.EncBinary() + _ = yym202 + if false { + } else { + r.EncodeInt(int64(x.HealthzPort)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("healthzPort")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym203 := z.EncBinary() + _ = yym203 + if false { + } else { + r.EncodeInt(int64(x.HealthzPort)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym205 := z.EncBinary() + _ = yym205 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.HealthzBindAddress)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("healthzBindAddress")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym206 := z.EncBinary() + _ = yym206 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.HealthzBindAddress)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym208 := z.EncBinary() + _ = yym208 + if false { + } else { + r.EncodeInt(int64(x.OOMScoreAdj)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("oomScoreAdj")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym209 := z.EncBinary() + _ = yym209 + if false { + } else { + r.EncodeInt(int64(x.OOMScoreAdj)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym211 := z.EncBinary() + _ = yym211 + if false { + } else { + r.EncodeBool(bool(x.RegisterNode)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("registerNode")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym212 := z.EncBinary() + _ = yym212 + if false { + } else { + r.EncodeBool(bool(x.RegisterNode)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym214 := z.EncBinary() + _ = yym214 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ClusterDomain)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("clusterDomain")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym215 := z.EncBinary() + _ = yym215 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ClusterDomain)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym217 := z.EncBinary() + _ = yym217 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.MasterServiceNamespace)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("masterServiceNamespace")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym218 := z.EncBinary() + _ = yym218 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.MasterServiceNamespace)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym220 := z.EncBinary() + _ = yym220 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ClusterDNS)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("clusterDNS")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym221 := z.EncBinary() + _ = yym221 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ClusterDNS)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy223 := &x.StreamingConnectionIdleTimeout + yym224 := z.EncBinary() + _ = yym224 + if false { + } else if z.HasExtensions() && z.EncExt(yy223) { + } else if !yym224 && z.IsJSONHandle() { + z.EncJSONMarshal(yy223) + } else { + z.EncFallback(yy223) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("streamingConnectionIdleTimeout")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy225 := &x.StreamingConnectionIdleTimeout + yym226 := z.EncBinary() + _ = yym226 + if false { + } else if z.HasExtensions() && z.EncExt(yy225) { + } else if !yym226 && z.IsJSONHandle() { + z.EncJSONMarshal(yy225) + } else { + z.EncFallback(yy225) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy228 := &x.NodeStatusUpdateFrequency + yym229 := z.EncBinary() + _ = yym229 + if false { + } else if z.HasExtensions() && z.EncExt(yy228) { + } else if !yym229 && z.IsJSONHandle() { + z.EncJSONMarshal(yy228) + } else { + z.EncFallback(yy228) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("nodeStatusUpdateFrequency")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy230 := &x.NodeStatusUpdateFrequency + yym231 := z.EncBinary() + _ = yym231 + if false { + } else if z.HasExtensions() && z.EncExt(yy230) { + } else if !yym231 && z.IsJSONHandle() { + z.EncJSONMarshal(yy230) + } else { + z.EncFallback(yy230) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym233 := z.EncBinary() + _ = yym233 + if false { + } else { + r.EncodeInt(int64(x.ImageGCHighThresholdPercent)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("imageGCHighThresholdPercent")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym234 := z.EncBinary() + _ = yym234 + if false { + } else { + r.EncodeInt(int64(x.ImageGCHighThresholdPercent)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym236 := z.EncBinary() + _ = yym236 + if false { + } else { + r.EncodeInt(int64(x.ImageGCLowThresholdPercent)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("imageGCLowThresholdPercent")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym237 := z.EncBinary() + _ = yym237 + if false { + } else { + r.EncodeInt(int64(x.ImageGCLowThresholdPercent)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym239 := z.EncBinary() + _ = yym239 + if false { + } else { + r.EncodeInt(int64(x.LowDiskSpaceThresholdMB)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("lowDiskSpaceThresholdMB")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym240 := z.EncBinary() + _ = yym240 + if false { + } else { + r.EncodeInt(int64(x.LowDiskSpaceThresholdMB)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym242 := z.EncBinary() + _ = yym242 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.NetworkPluginName)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("networkPluginName")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym243 := z.EncBinary() + _ = yym243 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.NetworkPluginName)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym245 := z.EncBinary() + _ = yym245 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.NetworkPluginDir)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("networkPluginDir")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym246 := z.EncBinary() + _ = yym246 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.NetworkPluginDir)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym248 := z.EncBinary() + _ = yym248 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.VolumePluginDir)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("volumePluginDir")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym249 := z.EncBinary() + _ = yym249 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.VolumePluginDir)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq102[45] { + yym251 := z.EncBinary() + _ = yym251 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.CloudProvider)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq102[45] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("cloudProvider")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym252 := z.EncBinary() + _ = yym252 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.CloudProvider)) + } + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq102[46] { + yym254 := z.EncBinary() + _ = yym254 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.CloudConfigFile)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq102[46] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("cloudConfigFile")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym255 := z.EncBinary() + _ = yym255 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.CloudConfigFile)) + } + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq102[47] { + yym257 := z.EncBinary() + _ = yym257 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ResourceContainer)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq102[47] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("resourceContainer")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym258 := z.EncBinary() + _ = yym258 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ResourceContainer)) + } + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq102[48] { + yym260 := z.EncBinary() + _ = yym260 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.CgroupRoot)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq102[48] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("cgroupRoot")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym261 := z.EncBinary() + _ = yym261 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.CgroupRoot)) + } + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym263 := z.EncBinary() + _ = yym263 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ContainerRuntime)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("containerRuntime")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym264 := z.EncBinary() + _ = yym264 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ContainerRuntime)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq102[50] { + yym266 := z.EncBinary() + _ = yym266 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.RktPath)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq102[50] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("rktPath")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym267 := z.EncBinary() + _ = yym267 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.RktPath)) + } + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq102[51] { + yym269 := z.EncBinary() + _ = yym269 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.RktStage1Image)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq102[51] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("rktStage1Image")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym270 := z.EncBinary() + _ = yym270 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.RktStage1Image)) + } + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym272 := z.EncBinary() + _ = yym272 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.SystemContainer)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("systemContainer")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym273 := z.EncBinary() + _ = yym273 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.SystemContainer)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym275 := z.EncBinary() + _ = yym275 + if false { + } else { + r.EncodeBool(bool(x.ConfigureCBR0)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("configureCbr0")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym276 := z.EncBinary() + _ = yym276 + if false { + } else { + r.EncodeBool(bool(x.ConfigureCBR0)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym278 := z.EncBinary() + _ = yym278 + if false { + } else { + r.EncodeInt(int64(x.MaxPods)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("maxPods")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym279 := z.EncBinary() + _ = yym279 + if false { + } else { + r.EncodeInt(int64(x.MaxPods)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym281 := z.EncBinary() + _ = yym281 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.DockerExecHandlerName)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("dockerExecHandlerName")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym282 := z.EncBinary() + _ = yym282 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.DockerExecHandlerName)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym284 := z.EncBinary() + _ = yym284 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.PodCIDR)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("podCIDR")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym285 := z.EncBinary() + _ = yym285 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.PodCIDR)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym287 := z.EncBinary() + _ = yym287 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ResolverConfig)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("resolvConf")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym288 := z.EncBinary() + _ = yym288 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ResolverConfig)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym290 := z.EncBinary() + _ = yym290 + if false { + } else { + r.EncodeBool(bool(x.CPUCFSQuota)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("cpuCFSQuota")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym291 := z.EncBinary() + _ = yym291 + if false { + } else { + r.EncodeBool(bool(x.CPUCFSQuota)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym293 := z.EncBinary() + _ = yym293 + if false { + } else { + r.EncodeBool(bool(x.Containerized)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("containerized")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym294 := z.EncBinary() + _ = yym294 + if false { + } else { + r.EncodeBool(bool(x.Containerized)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym296 := z.EncBinary() + _ = yym296 + if false { + } else { + r.EncodeUint(uint64(x.MaxOpenFiles)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("maxOpenFiles")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym297 := z.EncBinary() + _ = yym297 + if false { + } else { + r.EncodeUint(uint64(x.MaxOpenFiles)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym299 := z.EncBinary() + _ = yym299 + if false { + } else { + r.EncodeBool(bool(x.ReconcileCIDR)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("reconcileCIDR")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym300 := z.EncBinary() + _ = yym300 + if false { + } else { + r.EncodeBool(bool(x.ReconcileCIDR)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym302 := z.EncBinary() + _ = yym302 + if false { + } else { + r.EncodeBool(bool(x.RegisterSchedulable)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("registerSchedulable")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym303 := z.EncBinary() + _ = yym303 + if false { + } else { + r.EncodeBool(bool(x.RegisterSchedulable)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym305 := z.EncBinary() + _ = yym305 + if false { + } else { + r.EncodeFloat32(float32(x.KubeAPIQPS)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kubeAPIQPS")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym306 := z.EncBinary() + _ = yym306 + if false { + } else { + r.EncodeFloat32(float32(x.KubeAPIQPS)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym308 := z.EncBinary() + _ = yym308 + if false { + } else { + r.EncodeInt(int64(x.KubeAPIBurst)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kubeAPIBurst")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym309 := z.EncBinary() + _ = yym309 + if false { + } else { + r.EncodeInt(int64(x.KubeAPIBurst)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym311 := z.EncBinary() + _ = yym311 + if false { + } else { + r.EncodeBool(bool(x.SerializeImagePulls)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("serializeImagePulls")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym312 := z.EncBinary() + _ = yym312 + if false { + } else { + r.EncodeBool(bool(x.SerializeImagePulls)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym314 := z.EncBinary() + _ = yym314 + if false { + } else { + r.EncodeBool(bool(x.ExperimentalFlannelOverlay)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("experimentalFlannelOverlay")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym315 := z.EncBinary() + _ = yym315 + if false { + } else { + r.EncodeBool(bool(x.ExperimentalFlannelOverlay)) + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq102[67] { + yy317 := &x.OutOfDiskTransitionFrequency + yym318 := z.EncBinary() + _ = yym318 + if false { + } else if z.HasExtensions() && z.EncExt(yy317) { + } else if !yym318 && z.IsJSONHandle() { + z.EncJSONMarshal(yy317) + } else { + z.EncFallback(yy317) + } + } else { + r.EncodeNil() + } + } else { + if yyq102[67] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("outOfDiskTransitionFrequency")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy319 := &x.OutOfDiskTransitionFrequency + yym320 := z.EncBinary() + _ = yym320 + if false { + } else if z.HasExtensions() && z.EncExt(yy319) { + } else if !yym320 && z.IsJSONHandle() { + z.EncJSONMarshal(yy319) + } else { + z.EncFallback(yy319) + } + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq102[68] { + yym322 := z.EncBinary() + _ = yym322 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.NodeIP)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq102[68] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("nodeIP")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym323 := z.EncBinary() + _ = yym323 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.NodeIP)) + } + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.NodeLabels == nil { + r.EncodeNil() + } else { + yym325 := z.EncBinary() + _ = yym325 + if false { + } else { + z.F.EncMapStringStringV(x.NodeLabels, false, e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("nodeLabels")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.NodeLabels == nil { + r.EncodeNil() + } else { + yym326 := z.EncBinary() + _ = yym326 + if false { + } else { + z.F.EncMapStringStringV(x.NodeLabels, false, e) + } + } + } + if yyr102 || yy2arr102 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *KubeletConfiguration) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym327 := z.DecBinary() + _ = yym327 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct328 := r.ContainerType() + if yyct328 == codecSelferValueTypeMap1234 { + yyl328 := r.ReadMapStart() + if yyl328 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl328, d) + } + } else if yyct328 == codecSelferValueTypeArray1234 { + yyl328 := r.ReadArrayStart() + if yyl328 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl328, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys329Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys329Slc + var yyhl329 bool = l >= 0 + for yyj329 := 0; ; yyj329++ { + if yyhl329 { + if yyj329 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys329Slc = r.DecodeBytes(yys329Slc, true, true) + yys329 := string(yys329Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys329 { + case "config": + if r.TryDecodeAsNil() { + x.Config = "" + } else { + x.Config = string(r.DecodeString()) + } + case "syncFrequency": + if r.TryDecodeAsNil() { + x.SyncFrequency = pkg1_unversioned.Duration{} + } else { + yyv331 := &x.SyncFrequency + yym332 := z.DecBinary() + _ = yym332 + if false { + } else if z.HasExtensions() && z.DecExt(yyv331) { + } else if !yym332 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv331) + } else { + z.DecFallback(yyv331, false) + } + } + case "fileCheckFrequency": + if r.TryDecodeAsNil() { + x.FileCheckFrequency = pkg1_unversioned.Duration{} + } else { + yyv333 := &x.FileCheckFrequency + yym334 := z.DecBinary() + _ = yym334 + if false { + } else if z.HasExtensions() && z.DecExt(yyv333) { + } else if !yym334 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv333) + } else { + z.DecFallback(yyv333, false) + } + } + case "httpCheckFrequency": + if r.TryDecodeAsNil() { + x.HTTPCheckFrequency = pkg1_unversioned.Duration{} + } else { + yyv335 := &x.HTTPCheckFrequency + yym336 := z.DecBinary() + _ = yym336 + if false { + } else if z.HasExtensions() && z.DecExt(yyv335) { + } else if !yym336 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv335) + } else { + z.DecFallback(yyv335, false) + } + } + case "manifestURL": + if r.TryDecodeAsNil() { + x.ManifestURL = "" + } else { + x.ManifestURL = string(r.DecodeString()) + } + case "manifestURLHeader": + if r.TryDecodeAsNil() { + x.ManifestURLHeader = "" + } else { + x.ManifestURLHeader = string(r.DecodeString()) + } + case "enableServer": + if r.TryDecodeAsNil() { + x.EnableServer = false + } else { + x.EnableServer = bool(r.DecodeBool()) + } + case "address": + if r.TryDecodeAsNil() { + x.Address = "" + } else { + x.Address = string(r.DecodeString()) + } + case "port": + if r.TryDecodeAsNil() { + x.Port = 0 + } else { + x.Port = uint(r.DecodeUint(codecSelferBitsize1234)) + } + case "readOnlyPort": + if r.TryDecodeAsNil() { + x.ReadOnlyPort = 0 + } else { + x.ReadOnlyPort = uint(r.DecodeUint(codecSelferBitsize1234)) + } + case "tLSCertFile": + if r.TryDecodeAsNil() { + x.TLSCertFile = "" + } else { + x.TLSCertFile = string(r.DecodeString()) + } + case "tLSPrivateKeyFile": + if r.TryDecodeAsNil() { + x.TLSPrivateKeyFile = "" + } else { + x.TLSPrivateKeyFile = string(r.DecodeString()) + } + case "certDirectory": + if r.TryDecodeAsNil() { + x.CertDirectory = "" + } else { + x.CertDirectory = string(r.DecodeString()) + } + case "hostnameOverride": + if r.TryDecodeAsNil() { + x.HostnameOverride = "" + } else { + x.HostnameOverride = string(r.DecodeString()) + } + case "podInfraContainerImage": + if r.TryDecodeAsNil() { + x.PodInfraContainerImage = "" + } else { + x.PodInfraContainerImage = string(r.DecodeString()) + } + case "dockerEndpoint": + if r.TryDecodeAsNil() { + x.DockerEndpoint = "" + } else { + x.DockerEndpoint = string(r.DecodeString()) + } + case "rootDirectory": + if r.TryDecodeAsNil() { + x.RootDirectory = "" + } else { + x.RootDirectory = string(r.DecodeString()) + } + case "allowPrivileged": + if r.TryDecodeAsNil() { + x.AllowPrivileged = false + } else { + x.AllowPrivileged = bool(r.DecodeBool()) + } + case "hostNetworkSources": + if r.TryDecodeAsNil() { + x.HostNetworkSources = "" + } else { + x.HostNetworkSources = string(r.DecodeString()) + } + case "hostPIDSources": + if r.TryDecodeAsNil() { + x.HostPIDSources = "" + } else { + x.HostPIDSources = string(r.DecodeString()) + } + case "hostIPCSources": + if r.TryDecodeAsNil() { + x.HostIPCSources = "" + } else { + x.HostIPCSources = string(r.DecodeString()) + } + case "registryPullQPS": + if r.TryDecodeAsNil() { + x.RegistryPullQPS = 0 + } else { + x.RegistryPullQPS = float64(r.DecodeFloat(false)) + } + case "registryBurst": + if r.TryDecodeAsNil() { + x.RegistryBurst = 0 + } else { + x.RegistryBurst = int(r.DecodeInt(codecSelferBitsize1234)) + } + case "eventRecordQPS": + if r.TryDecodeAsNil() { + x.EventRecordQPS = 0 + } else { + x.EventRecordQPS = float32(r.DecodeFloat(true)) + } + case "eventBurst": + if r.TryDecodeAsNil() { + x.EventBurst = 0 + } else { + x.EventBurst = int(r.DecodeInt(codecSelferBitsize1234)) + } + case "enableDebuggingHandlers": + if r.TryDecodeAsNil() { + x.EnableDebuggingHandlers = false + } else { + x.EnableDebuggingHandlers = bool(r.DecodeBool()) + } + case "minimumGCAge": + if r.TryDecodeAsNil() { + x.MinimumGCAge = pkg1_unversioned.Duration{} + } else { + yyv359 := &x.MinimumGCAge + yym360 := z.DecBinary() + _ = yym360 + if false { + } else if z.HasExtensions() && z.DecExt(yyv359) { + } else if !yym360 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv359) + } else { + z.DecFallback(yyv359, false) + } + } + case "maxPerPodContainerCount": + if r.TryDecodeAsNil() { + x.MaxPerPodContainerCount = 0 + } else { + x.MaxPerPodContainerCount = int(r.DecodeInt(codecSelferBitsize1234)) + } + case "maxContainerCount": + if r.TryDecodeAsNil() { + x.MaxContainerCount = 0 + } else { + x.MaxContainerCount = int(r.DecodeInt(codecSelferBitsize1234)) + } + case "cAdvisorPort": + if r.TryDecodeAsNil() { + x.CAdvisorPort = 0 + } else { + x.CAdvisorPort = uint(r.DecodeUint(codecSelferBitsize1234)) + } + case "healthzPort": + if r.TryDecodeAsNil() { + x.HealthzPort = 0 + } else { + x.HealthzPort = int(r.DecodeInt(codecSelferBitsize1234)) + } + case "healthzBindAddress": + if r.TryDecodeAsNil() { + x.HealthzBindAddress = "" + } else { + x.HealthzBindAddress = string(r.DecodeString()) + } + case "oomScoreAdj": + if r.TryDecodeAsNil() { + x.OOMScoreAdj = 0 + } else { + x.OOMScoreAdj = int(r.DecodeInt(codecSelferBitsize1234)) + } + case "registerNode": + if r.TryDecodeAsNil() { + x.RegisterNode = false + } else { + x.RegisterNode = bool(r.DecodeBool()) + } + case "clusterDomain": + if r.TryDecodeAsNil() { + x.ClusterDomain = "" + } else { + x.ClusterDomain = string(r.DecodeString()) + } + case "masterServiceNamespace": + if r.TryDecodeAsNil() { + x.MasterServiceNamespace = "" + } else { + x.MasterServiceNamespace = string(r.DecodeString()) + } + case "clusterDNS": + if r.TryDecodeAsNil() { + x.ClusterDNS = "" + } else { + x.ClusterDNS = string(r.DecodeString()) + } + case "streamingConnectionIdleTimeout": + if r.TryDecodeAsNil() { + x.StreamingConnectionIdleTimeout = pkg1_unversioned.Duration{} + } else { + yyv371 := &x.StreamingConnectionIdleTimeout + yym372 := z.DecBinary() + _ = yym372 + if false { + } else if z.HasExtensions() && z.DecExt(yyv371) { + } else if !yym372 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv371) + } else { + z.DecFallback(yyv371, false) + } + } + case "nodeStatusUpdateFrequency": + if r.TryDecodeAsNil() { + x.NodeStatusUpdateFrequency = pkg1_unversioned.Duration{} + } else { + yyv373 := &x.NodeStatusUpdateFrequency + yym374 := z.DecBinary() + _ = yym374 + if false { + } else if z.HasExtensions() && z.DecExt(yyv373) { + } else if !yym374 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv373) + } else { + z.DecFallback(yyv373, false) + } + } + case "imageGCHighThresholdPercent": + if r.TryDecodeAsNil() { + x.ImageGCHighThresholdPercent = 0 + } else { + x.ImageGCHighThresholdPercent = int(r.DecodeInt(codecSelferBitsize1234)) + } + case "imageGCLowThresholdPercent": + if r.TryDecodeAsNil() { + x.ImageGCLowThresholdPercent = 0 + } else { + x.ImageGCLowThresholdPercent = int(r.DecodeInt(codecSelferBitsize1234)) + } + case "lowDiskSpaceThresholdMB": + if r.TryDecodeAsNil() { + x.LowDiskSpaceThresholdMB = 0 + } else { + x.LowDiskSpaceThresholdMB = int(r.DecodeInt(codecSelferBitsize1234)) + } + case "networkPluginName": + if r.TryDecodeAsNil() { + x.NetworkPluginName = "" + } else { + x.NetworkPluginName = string(r.DecodeString()) + } + case "networkPluginDir": + if r.TryDecodeAsNil() { + x.NetworkPluginDir = "" + } else { + x.NetworkPluginDir = string(r.DecodeString()) + } + case "volumePluginDir": + if r.TryDecodeAsNil() { + x.VolumePluginDir = "" + } else { + x.VolumePluginDir = string(r.DecodeString()) + } + case "cloudProvider": + if r.TryDecodeAsNil() { + x.CloudProvider = "" + } else { + x.CloudProvider = string(r.DecodeString()) + } + case "cloudConfigFile": + if r.TryDecodeAsNil() { + x.CloudConfigFile = "" + } else { + x.CloudConfigFile = string(r.DecodeString()) + } + case "resourceContainer": + if r.TryDecodeAsNil() { + x.ResourceContainer = "" + } else { + x.ResourceContainer = string(r.DecodeString()) + } + case "cgroupRoot": + if r.TryDecodeAsNil() { + x.CgroupRoot = "" + } else { + x.CgroupRoot = string(r.DecodeString()) + } + case "containerRuntime": + if r.TryDecodeAsNil() { + x.ContainerRuntime = "" + } else { + x.ContainerRuntime = string(r.DecodeString()) + } + case "rktPath": + if r.TryDecodeAsNil() { + x.RktPath = "" + } else { + x.RktPath = string(r.DecodeString()) + } + case "rktStage1Image": + if r.TryDecodeAsNil() { + x.RktStage1Image = "" + } else { + x.RktStage1Image = string(r.DecodeString()) + } + case "systemContainer": + if r.TryDecodeAsNil() { + x.SystemContainer = "" + } else { + x.SystemContainer = string(r.DecodeString()) + } + case "configureCbr0": + if r.TryDecodeAsNil() { + x.ConfigureCBR0 = false + } else { + x.ConfigureCBR0 = bool(r.DecodeBool()) + } + case "maxPods": + if r.TryDecodeAsNil() { + x.MaxPods = 0 + } else { + x.MaxPods = int(r.DecodeInt(codecSelferBitsize1234)) + } + case "dockerExecHandlerName": + if r.TryDecodeAsNil() { + x.DockerExecHandlerName = "" + } else { + x.DockerExecHandlerName = string(r.DecodeString()) + } + case "podCIDR": + if r.TryDecodeAsNil() { + x.PodCIDR = "" + } else { + x.PodCIDR = string(r.DecodeString()) + } + case "resolvConf": + if r.TryDecodeAsNil() { + x.ResolverConfig = "" + } else { + x.ResolverConfig = string(r.DecodeString()) + } + case "cpuCFSQuota": + if r.TryDecodeAsNil() { + x.CPUCFSQuota = false + } else { + x.CPUCFSQuota = bool(r.DecodeBool()) + } + case "containerized": + if r.TryDecodeAsNil() { + x.Containerized = false + } else { + x.Containerized = bool(r.DecodeBool()) + } + case "maxOpenFiles": + if r.TryDecodeAsNil() { + x.MaxOpenFiles = 0 + } else { + x.MaxOpenFiles = uint64(r.DecodeUint(64)) + } + case "reconcileCIDR": + if r.TryDecodeAsNil() { + x.ReconcileCIDR = false + } else { + x.ReconcileCIDR = bool(r.DecodeBool()) + } + case "registerSchedulable": + if r.TryDecodeAsNil() { + x.RegisterSchedulable = false + } else { + x.RegisterSchedulable = bool(r.DecodeBool()) + } + case "kubeAPIQPS": + if r.TryDecodeAsNil() { + x.KubeAPIQPS = 0 + } else { + x.KubeAPIQPS = float32(r.DecodeFloat(true)) + } + case "kubeAPIBurst": + if r.TryDecodeAsNil() { + x.KubeAPIBurst = 0 + } else { + x.KubeAPIBurst = int(r.DecodeInt(codecSelferBitsize1234)) + } + case "serializeImagePulls": + if r.TryDecodeAsNil() { + x.SerializeImagePulls = false + } else { + x.SerializeImagePulls = bool(r.DecodeBool()) + } + case "experimentalFlannelOverlay": + if r.TryDecodeAsNil() { + x.ExperimentalFlannelOverlay = false + } else { + x.ExperimentalFlannelOverlay = bool(r.DecodeBool()) + } + case "outOfDiskTransitionFrequency": + if r.TryDecodeAsNil() { + x.OutOfDiskTransitionFrequency = pkg1_unversioned.Duration{} + } else { + yyv403 := &x.OutOfDiskTransitionFrequency + yym404 := z.DecBinary() + _ = yym404 + if false { + } else if z.HasExtensions() && z.DecExt(yyv403) { + } else if !yym404 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv403) + } else { + z.DecFallback(yyv403, false) + } + } + case "nodeIP": + if r.TryDecodeAsNil() { + x.NodeIP = "" + } else { + x.NodeIP = string(r.DecodeString()) + } + case "nodeLabels": + if r.TryDecodeAsNil() { + x.NodeLabels = nil + } else { + yyv406 := &x.NodeLabels + yym407 := z.DecBinary() + _ = yym407 + if false { + } else { + z.F.DecMapStringStringX(yyv406, false, d) + } + } + default: + z.DecStructFieldNotFound(-1, yys329) + } // end switch yys329 + } // end for yyj329 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj408 int + var yyb408 bool + var yyhl408 bool = l >= 0 + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Config = "" + } else { + x.Config = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.SyncFrequency = pkg1_unversioned.Duration{} + } else { + yyv410 := &x.SyncFrequency + yym411 := z.DecBinary() + _ = yym411 + if false { + } else if z.HasExtensions() && z.DecExt(yyv410) { + } else if !yym411 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv410) + } else { + z.DecFallback(yyv410, false) + } + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.FileCheckFrequency = pkg1_unversioned.Duration{} + } else { + yyv412 := &x.FileCheckFrequency + yym413 := z.DecBinary() + _ = yym413 + if false { + } else if z.HasExtensions() && z.DecExt(yyv412) { + } else if !yym413 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv412) + } else { + z.DecFallback(yyv412, false) + } + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HTTPCheckFrequency = pkg1_unversioned.Duration{} + } else { + yyv414 := &x.HTTPCheckFrequency + yym415 := z.DecBinary() + _ = yym415 + if false { + } else if z.HasExtensions() && z.DecExt(yyv414) { + } else if !yym415 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv414) + } else { + z.DecFallback(yyv414, false) + } + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ManifestURL = "" + } else { + x.ManifestURL = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ManifestURLHeader = "" + } else { + x.ManifestURLHeader = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.EnableServer = false + } else { + x.EnableServer = bool(r.DecodeBool()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Address = "" + } else { + x.Address = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Port = 0 + } else { + x.Port = uint(r.DecodeUint(codecSelferBitsize1234)) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ReadOnlyPort = 0 + } else { + x.ReadOnlyPort = uint(r.DecodeUint(codecSelferBitsize1234)) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.TLSCertFile = "" + } else { + x.TLSCertFile = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.TLSPrivateKeyFile = "" + } else { + x.TLSPrivateKeyFile = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.CertDirectory = "" + } else { + x.CertDirectory = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HostnameOverride = "" + } else { + x.HostnameOverride = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.PodInfraContainerImage = "" + } else { + x.PodInfraContainerImage = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.DockerEndpoint = "" + } else { + x.DockerEndpoint = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.RootDirectory = "" + } else { + x.RootDirectory = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.AllowPrivileged = false + } else { + x.AllowPrivileged = bool(r.DecodeBool()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HostNetworkSources = "" + } else { + x.HostNetworkSources = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HostPIDSources = "" + } else { + x.HostPIDSources = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HostIPCSources = "" + } else { + x.HostIPCSources = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.RegistryPullQPS = 0 + } else { + x.RegistryPullQPS = float64(r.DecodeFloat(false)) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.RegistryBurst = 0 + } else { + x.RegistryBurst = int(r.DecodeInt(codecSelferBitsize1234)) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.EventRecordQPS = 0 + } else { + x.EventRecordQPS = float32(r.DecodeFloat(true)) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.EventBurst = 0 + } else { + x.EventBurst = int(r.DecodeInt(codecSelferBitsize1234)) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.EnableDebuggingHandlers = false + } else { + x.EnableDebuggingHandlers = bool(r.DecodeBool()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.MinimumGCAge = pkg1_unversioned.Duration{} + } else { + yyv438 := &x.MinimumGCAge + yym439 := z.DecBinary() + _ = yym439 + if false { + } else if z.HasExtensions() && z.DecExt(yyv438) { + } else if !yym439 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv438) + } else { + z.DecFallback(yyv438, false) + } + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.MaxPerPodContainerCount = 0 + } else { + x.MaxPerPodContainerCount = int(r.DecodeInt(codecSelferBitsize1234)) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.MaxContainerCount = 0 + } else { + x.MaxContainerCount = int(r.DecodeInt(codecSelferBitsize1234)) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.CAdvisorPort = 0 + } else { + x.CAdvisorPort = uint(r.DecodeUint(codecSelferBitsize1234)) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HealthzPort = 0 + } else { + x.HealthzPort = int(r.DecodeInt(codecSelferBitsize1234)) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HealthzBindAddress = "" + } else { + x.HealthzBindAddress = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.OOMScoreAdj = 0 + } else { + x.OOMScoreAdj = int(r.DecodeInt(codecSelferBitsize1234)) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.RegisterNode = false + } else { + x.RegisterNode = bool(r.DecodeBool()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ClusterDomain = "" + } else { + x.ClusterDomain = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.MasterServiceNamespace = "" + } else { + x.MasterServiceNamespace = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ClusterDNS = "" + } else { + x.ClusterDNS = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.StreamingConnectionIdleTimeout = pkg1_unversioned.Duration{} + } else { + yyv450 := &x.StreamingConnectionIdleTimeout + yym451 := z.DecBinary() + _ = yym451 + if false { + } else if z.HasExtensions() && z.DecExt(yyv450) { + } else if !yym451 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv450) + } else { + z.DecFallback(yyv450, false) + } + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.NodeStatusUpdateFrequency = pkg1_unversioned.Duration{} + } else { + yyv452 := &x.NodeStatusUpdateFrequency + yym453 := z.DecBinary() + _ = yym453 + if false { + } else if z.HasExtensions() && z.DecExt(yyv452) { + } else if !yym453 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv452) + } else { + z.DecFallback(yyv452, false) + } + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ImageGCHighThresholdPercent = 0 + } else { + x.ImageGCHighThresholdPercent = int(r.DecodeInt(codecSelferBitsize1234)) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ImageGCLowThresholdPercent = 0 + } else { + x.ImageGCLowThresholdPercent = int(r.DecodeInt(codecSelferBitsize1234)) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.LowDiskSpaceThresholdMB = 0 + } else { + x.LowDiskSpaceThresholdMB = int(r.DecodeInt(codecSelferBitsize1234)) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.NetworkPluginName = "" + } else { + x.NetworkPluginName = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.NetworkPluginDir = "" + } else { + x.NetworkPluginDir = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.VolumePluginDir = "" + } else { + x.VolumePluginDir = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.CloudProvider = "" + } else { + x.CloudProvider = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.CloudConfigFile = "" + } else { + x.CloudConfigFile = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ResourceContainer = "" + } else { + x.ResourceContainer = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.CgroupRoot = "" + } else { + x.CgroupRoot = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ContainerRuntime = "" + } else { + x.ContainerRuntime = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.RktPath = "" + } else { + x.RktPath = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.RktStage1Image = "" + } else { + x.RktStage1Image = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.SystemContainer = "" + } else { + x.SystemContainer = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ConfigureCBR0 = false + } else { + x.ConfigureCBR0 = bool(r.DecodeBool()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.MaxPods = 0 + } else { + x.MaxPods = int(r.DecodeInt(codecSelferBitsize1234)) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.DockerExecHandlerName = "" + } else { + x.DockerExecHandlerName = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.PodCIDR = "" + } else { + x.PodCIDR = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ResolverConfig = "" + } else { + x.ResolverConfig = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.CPUCFSQuota = false + } else { + x.CPUCFSQuota = bool(r.DecodeBool()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Containerized = false + } else { + x.Containerized = bool(r.DecodeBool()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.MaxOpenFiles = 0 + } else { + x.MaxOpenFiles = uint64(r.DecodeUint(64)) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ReconcileCIDR = false + } else { + x.ReconcileCIDR = bool(r.DecodeBool()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.RegisterSchedulable = false + } else { + x.RegisterSchedulable = bool(r.DecodeBool()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.KubeAPIQPS = 0 + } else { + x.KubeAPIQPS = float32(r.DecodeFloat(true)) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.KubeAPIBurst = 0 + } else { + x.KubeAPIBurst = int(r.DecodeInt(codecSelferBitsize1234)) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.SerializeImagePulls = false + } else { + x.SerializeImagePulls = bool(r.DecodeBool()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ExperimentalFlannelOverlay = false + } else { + x.ExperimentalFlannelOverlay = bool(r.DecodeBool()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.OutOfDiskTransitionFrequency = pkg1_unversioned.Duration{} + } else { + yyv482 := &x.OutOfDiskTransitionFrequency + yym483 := z.DecBinary() + _ = yym483 + if false { + } else if z.HasExtensions() && z.DecExt(yyv482) { + } else if !yym483 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv482) + } else { + z.DecFallback(yyv482, false) + } + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.NodeIP = "" + } else { + x.NodeIP = string(r.DecodeString()) + } + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.NodeLabels = nil + } else { + yyv485 := &x.NodeLabels + yym486 := z.DecBinary() + _ = yym486 + if false { + } else { + z.F.DecMapStringStringX(yyv485, false, d) + } + } + for { + yyj408++ + if yyhl408 { + yyb408 = yyj408 > l + } else { + yyb408 = r.CheckBreak() + } + if yyb408 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj408-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym487 := z.EncBinary() + _ = yym487 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep488 := !z.EncBinary() + yy2arr488 := z.EncBasicHandle().StructToArray + var yyq488 [4]bool + _, _, _ = yysep488, yyq488, yy2arr488 + const yyr488 bool = false + var yynn488 int + if yyr488 || yy2arr488 { + r.EncodeArrayStart(4) + } else { + yynn488 = 4 + for _, b := range yyq488 { + if b { + yynn488++ + } + } + r.EncodeMapStart(yynn488) + yynn488 = 0 + } + if yyr488 || yy2arr488 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym490 := z.EncBinary() + _ = yym490 + if false { + } else { + r.EncodeBool(bool(x.LeaderElect)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("leaderElect")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym491 := z.EncBinary() + _ = yym491 + if false { + } else { + r.EncodeBool(bool(x.LeaderElect)) + } + } + if yyr488 || yy2arr488 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy493 := &x.LeaseDuration + yym494 := z.EncBinary() + _ = yym494 + if false { + } else if z.HasExtensions() && z.EncExt(yy493) { + } else if !yym494 && z.IsJSONHandle() { + z.EncJSONMarshal(yy493) + } else { + z.EncFallback(yy493) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("leaseDuration")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy495 := &x.LeaseDuration + yym496 := z.EncBinary() + _ = yym496 + if false { + } else if z.HasExtensions() && z.EncExt(yy495) { + } else if !yym496 && z.IsJSONHandle() { + z.EncJSONMarshal(yy495) + } else { + z.EncFallback(yy495) + } + } + if yyr488 || yy2arr488 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy498 := &x.RenewDeadline + yym499 := z.EncBinary() + _ = yym499 + if false { + } else if z.HasExtensions() && z.EncExt(yy498) { + } else if !yym499 && z.IsJSONHandle() { + z.EncJSONMarshal(yy498) + } else { + z.EncFallback(yy498) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("renewDeadline")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy500 := &x.RenewDeadline + yym501 := z.EncBinary() + _ = yym501 + if false { + } else if z.HasExtensions() && z.EncExt(yy500) { + } else if !yym501 && z.IsJSONHandle() { + z.EncJSONMarshal(yy500) + } else { + z.EncFallback(yy500) + } + } + if yyr488 || yy2arr488 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy503 := &x.RetryPeriod + yym504 := z.EncBinary() + _ = yym504 + if false { + } else if z.HasExtensions() && z.EncExt(yy503) { + } else if !yym504 && z.IsJSONHandle() { + z.EncJSONMarshal(yy503) + } else { + z.EncFallback(yy503) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("retryPeriod")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy505 := &x.RetryPeriod + yym506 := z.EncBinary() + _ = yym506 + if false { + } else if z.HasExtensions() && z.EncExt(yy505) { + } else if !yym506 && z.IsJSONHandle() { + z.EncJSONMarshal(yy505) + } else { + z.EncFallback(yy505) + } + } + if yyr488 || yy2arr488 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -1129,25 +4378,25 @@ func (x *LeaderElectionConfiguration) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym121 := z.DecBinary() - _ = yym121 + yym507 := z.DecBinary() + _ = yym507 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct122 := r.ContainerType() - if yyct122 == codecSelferValueTypeMap1234 { - yyl122 := r.ReadMapStart() - if yyl122 == 0 { + yyct508 := r.ContainerType() + if yyct508 == codecSelferValueTypeMap1234 { + yyl508 := r.ReadMapStart() + if yyl508 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl122, d) + x.codecDecodeSelfFromMap(yyl508, d) } - } else if yyct122 == codecSelferValueTypeArray1234 { - yyl122 := r.ReadArrayStart() - if yyl122 == 0 { + } else if yyct508 == codecSelferValueTypeArray1234 { + yyl508 := r.ReadArrayStart() + if yyl508 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl122, d) + x.codecDecodeSelfFromArray(yyl508, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -1159,12 +4408,12 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromMap(l int, d *codec1978 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys123Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys123Slc - var yyhl123 bool = l >= 0 - for yyj123 := 0; ; yyj123++ { - if yyhl123 { - if yyj123 >= l { + var yys509Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys509Slc + var yyhl509 bool = l >= 0 + for yyj509 := 0; ; yyj509++ { + if yyhl509 { + if yyj509 >= l { break } } else { @@ -1173,10 +4422,10 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromMap(l int, d *codec1978 } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys123Slc = r.DecodeBytes(yys123Slc, true, true) - yys123 := string(yys123Slc) + yys509Slc = r.DecodeBytes(yys509Slc, true, true) + yys509 := string(yys509Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys123 { + switch yys509 { case "leaderElect": if r.TryDecodeAsNil() { x.LeaderElect = false @@ -1187,51 +4436,51 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromMap(l int, d *codec1978 if r.TryDecodeAsNil() { x.LeaseDuration = pkg1_unversioned.Duration{} } else { - yyv125 := &x.LeaseDuration - yym126 := z.DecBinary() - _ = yym126 + yyv511 := &x.LeaseDuration + yym512 := z.DecBinary() + _ = yym512 if false { - } else if z.HasExtensions() && z.DecExt(yyv125) { - } else if !yym126 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv125) + } else if z.HasExtensions() && z.DecExt(yyv511) { + } else if !yym512 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv511) } else { - z.DecFallback(yyv125, false) + z.DecFallback(yyv511, false) } } case "renewDeadline": if r.TryDecodeAsNil() { x.RenewDeadline = pkg1_unversioned.Duration{} } else { - yyv127 := &x.RenewDeadline - yym128 := z.DecBinary() - _ = yym128 + yyv513 := &x.RenewDeadline + yym514 := z.DecBinary() + _ = yym514 if false { - } else if z.HasExtensions() && z.DecExt(yyv127) { - } else if !yym128 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv127) + } else if z.HasExtensions() && z.DecExt(yyv513) { + } else if !yym514 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv513) } else { - z.DecFallback(yyv127, false) + z.DecFallback(yyv513, false) } } case "retryPeriod": if r.TryDecodeAsNil() { x.RetryPeriod = pkg1_unversioned.Duration{} } else { - yyv129 := &x.RetryPeriod - yym130 := z.DecBinary() - _ = yym130 + yyv515 := &x.RetryPeriod + yym516 := z.DecBinary() + _ = yym516 if false { - } else if z.HasExtensions() && z.DecExt(yyv129) { - } else if !yym130 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv129) + } else if z.HasExtensions() && z.DecExt(yyv515) { + } else if !yym516 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv515) } else { - z.DecFallback(yyv129, false) + z.DecFallback(yyv515, false) } } default: - z.DecStructFieldNotFound(-1, yys123) - } // end switch yys123 - } // end for yyj123 + z.DecStructFieldNotFound(-1, yys509) + } // end switch yys509 + } // end for yyj509 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -1239,16 +4488,16 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj131 int - var yyb131 bool - var yyhl131 bool = l >= 0 - yyj131++ - if yyhl131 { - yyb131 = yyj131 > l + var yyj517 int + var yyb517 bool + var yyhl517 bool = l >= 0 + yyj517++ + if yyhl517 { + yyb517 = yyj517 > l } else { - yyb131 = r.CheckBreak() + yyb517 = r.CheckBreak() } - if yyb131 { + if yyb517 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1258,13 +4507,13 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19 } else { x.LeaderElect = bool(r.DecodeBool()) } - yyj131++ - if yyhl131 { - yyb131 = yyj131 > l + yyj517++ + if yyhl517 { + yyb517 = yyj517 > l } else { - yyb131 = r.CheckBreak() + yyb517 = r.CheckBreak() } - if yyb131 { + if yyb517 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1272,24 +4521,24 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19 if r.TryDecodeAsNil() { x.LeaseDuration = pkg1_unversioned.Duration{} } else { - yyv133 := &x.LeaseDuration - yym134 := z.DecBinary() - _ = yym134 + yyv519 := &x.LeaseDuration + yym520 := z.DecBinary() + _ = yym520 if false { - } else if z.HasExtensions() && z.DecExt(yyv133) { - } else if !yym134 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv133) + } else if z.HasExtensions() && z.DecExt(yyv519) { + } else if !yym520 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv519) } else { - z.DecFallback(yyv133, false) + z.DecFallback(yyv519, false) } } - yyj131++ - if yyhl131 { - yyb131 = yyj131 > l + yyj517++ + if yyhl517 { + yyb517 = yyj517 > l } else { - yyb131 = r.CheckBreak() + yyb517 = r.CheckBreak() } - if yyb131 { + if yyb517 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1297,24 +4546,24 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19 if r.TryDecodeAsNil() { x.RenewDeadline = pkg1_unversioned.Duration{} } else { - yyv135 := &x.RenewDeadline - yym136 := z.DecBinary() - _ = yym136 + yyv521 := &x.RenewDeadline + yym522 := z.DecBinary() + _ = yym522 if false { - } else if z.HasExtensions() && z.DecExt(yyv135) { - } else if !yym136 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv135) + } else if z.HasExtensions() && z.DecExt(yyv521) { + } else if !yym522 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv521) } else { - z.DecFallback(yyv135, false) + z.DecFallback(yyv521, false) } } - yyj131++ - if yyhl131 { - yyb131 = yyj131 > l + yyj517++ + if yyhl517 { + yyb517 = yyj517 > l } else { - yyb131 = r.CheckBreak() + yyb517 = r.CheckBreak() } - if yyb131 { + if yyb517 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1322,29 +4571,29 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19 if r.TryDecodeAsNil() { x.RetryPeriod = pkg1_unversioned.Duration{} } else { - yyv137 := &x.RetryPeriod - yym138 := z.DecBinary() - _ = yym138 + yyv523 := &x.RetryPeriod + yym524 := z.DecBinary() + _ = yym524 if false { - } else if z.HasExtensions() && z.DecExt(yyv137) { - } else if !yym138 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv137) + } else if z.HasExtensions() && z.DecExt(yyv523) { + } else if !yym524 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv523) } else { - z.DecFallback(yyv137, false) + z.DecFallback(yyv523, false) } } for { - yyj131++ - if yyhl131 { - yyb131 = yyj131 > l + yyj517++ + if yyhl517 { + yyb517 = yyj517 > l } else { - yyb131 = r.CheckBreak() + yyb517 = r.CheckBreak() } - if yyb131 { + if yyb517 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj131-1, "") + z.DecStructFieldNotFound(yyj517-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) }