From f7011d22f81c0b704e29bf06d0a93d8e022108ab Mon Sep 17 00:00:00 2001 From: Manuel de Brito Fontes Date: Mon, 28 Nov 2016 22:39:32 -0300 Subject: [PATCH] Update godeps --- Godeps/Godeps.json | 825 +-- controllers/gce/controller/controller.go | 2 +- .../ncabatoff/process-exporter/.gitignore | 4 + .../ncabatoff/process-exporter/.promu.yml | 35 + .../ncabatoff/process-exporter/Dockerfile | 17 + .../ncabatoff/process-exporter/LICENSE | 21 + .../ncabatoff/process-exporter/Makefile | 71 + .../ncabatoff/process-exporter/README.md | 160 + .../ncabatoff/process-exporter/VERSION | 1 + .../ncabatoff/process-exporter/common.go | 14 + .../process-exporter/proc/grouper.go | 166 + .../ncabatoff/process-exporter/proc/read.go | 306 + .../process-exporter/proc/tracker.go | 160 + .../prometheus/client_golang/NOTICE | 5 - .../client_golang/prometheus/README.md | 54 +- .../client_golang/prometheus/collector.go | 52 +- .../client_golang/prometheus/counter.go | 37 +- .../client_golang/prometheus/desc.go | 55 +- .../client_golang/prometheus/doc.go | 180 +- .../{expvar.go => expvar_collector.go} | 32 +- .../client_golang/prometheus/fnv.go | 29 + .../client_golang/prometheus/gauge.go | 28 +- .../client_golang/prometheus/go_collector.go | 12 +- .../client_golang/prometheus/histogram.go | 26 +- .../client_golang/prometheus/http.go | 242 +- .../client_golang/prometheus/metric.go | 34 +- .../prometheus/process_collector.go | 108 +- .../client_golang/prometheus/promhttp/http.go | 201 + .../client_golang/prometheus/push.go | 65 - .../client_golang/prometheus/registry.go | 943 +-- .../client_golang/prometheus/summary.go | 47 +- .../client_golang/prometheus/timer.go | 74 + .../client_golang/prometheus/untyped.go | 20 +- .../client_golang/prometheus/value.go | 13 +- .../client_golang/prometheus/vec.go | 253 +- .../prometheus/common/expfmt/decode.go | 49 +- .../prometheus/common/expfmt/encode.go | 2 +- .../prometheus/common/expfmt/expfmt.go | 3 - .../prometheus/common/expfmt/fuzz.go | 4 +- .../prometheus/common/expfmt/json_decode.go | 162 - .../prometheus/common/expfmt/text_create.go | 30 +- .../prometheus/common/expfmt/text_parse.go | 9 +- .../bitbucket.org/ww/goautoneg/README.txt | 67 + .../bitbucket.org/ww/goautoneg/autoneg.go | 162 + .../prometheus/common/model/alert.go | 33 +- .../github.com/prometheus/common/model/fnv.go | 42 + .../prometheus/common/model/labels.go | 32 +- .../prometheus/common/model/labelset.go | 18 +- .../prometheus/common/model/metric.go | 24 +- .../prometheus/common/model/model.go | 2 +- .../prometheus/common/model/signature.go | 108 +- .../prometheus/common/model/silence.go | 46 + .../prometheus/common/model/time.go | 61 +- .../prometheus/common/model/value.go | 34 +- .../github.com/prometheus/procfs/.travis.yml | 4 +- .../github.com/prometheus/procfs/AUTHORS.md | 2 +- vendor/github.com/prometheus/procfs/Makefile | 2 +- vendor/github.com/prometheus/procfs/fs.go | 13 +- vendor/github.com/prometheus/procfs/ipvs.go | 5 +- vendor/github.com/prometheus/procfs/mdstat.go | 88 +- vendor/github.com/prometheus/procfs/proc.go | 44 +- .../github.com/prometheus/procfs/proc_io.go | 3 +- .../prometheus/procfs/proc_limits.go | 64 +- .../github.com/prometheus/procfs/proc_stat.go | 18 +- vendor/github.com/prometheus/procfs/stat.go | 3 +- .../federation/apis/federation/types.go | 2 +- .../kubernetes/pkg/api/v1/generated.proto | 2 +- vendor/k8s.io/kubernetes/pkg/api/v1/types.go | 2 +- .../pkg/api/v1/types_swagger_doc_generated.go | 2 +- .../pkg/api/validation/validation.go | 8 +- .../pkg/apis/autoscaling/register.go | 1 + .../kubernetes/pkg/apis/autoscaling/v1/BUILD | 13 + .../kubernetes/pkg/apis/batch/register.go | 1 + .../apis/componentconfig/types.generated.go | 5972 +++++++++-------- .../pkg/apis/componentconfig/types.go | 8 +- .../apis/componentconfig/v1alpha1/defaults.go | 12 +- .../apis/componentconfig/v1alpha1/types.go | 6 +- .../v1alpha1/zz_generated.conversion.go | 6 +- .../v1alpha1/zz_generated.deepcopy.go | 7 +- .../componentconfig/zz_generated.deepcopy.go | 3 +- .../kubernetes/pkg/apis/extensions/types.go | 2 - .../apis/extensions/validation/validation.go | 3 + .../k8s.io/kubernetes/pkg/auth/user/user.go | 1 + .../kubernetes/pkg/client/cache/controller.go | 9 +- .../kubernetes/pkg/client/cache/reflector.go | 10 +- .../core/internalversion/event_expansion.go | 6 +- .../typed/discovery/discovery_client.go | 49 +- .../pkg/cloudprovider/providers/gce/gce.go | 15 +- .../pkg/controller/controller_utils.go | 2 +- vendor/k8s.io/kubernetes/pkg/kubectl/BUILD | 4 +- .../pkg/kubectl/cmd/util/factory.go | 17 +- .../k8s.io/kubernetes/pkg/kubectl/describe.go | 38 + .../kubernetes/pkg/kubectl/resource_filter.go | 11 + .../pkg/kubectl/resource_printer.go | 57 +- .../k8s.io/kubernetes/pkg/kubectl/version.go | 28 - vendor/k8s.io/kubernetes/pkg/storage/BUILD | 1 + .../pkg/util/config/feature_gate.go | 29 +- .../k8s.io/kubernetes/pkg/util/mount/mount.go | 13 +- .../k8s.io/kubernetes/pkg/util/wait/wait.go | 143 +- .../pkg/util/workqueue/delaying_queue.go | 10 +- .../pkg/util/workqueue/parallelizer.go | 4 + .../kubernetes/pkg/util/workqueue/queue.go | 2 +- .../util/workqueue/rate_limitting_queue.go | 5 +- vendor/k8s.io/kubernetes/pkg/version/base.go | 6 +- vendor/k8s.io/kubernetes/pkg/volume/util.go | 7 +- vendor/k8s.io/kubernetes/pkg/volume/volume.go | 12 + .../kubernetes/pkg/volume/volume_linux.go | 6 +- .../plugin/pkg/client/auth/gcp/gcp.go | 79 +- 108 files changed, 7093 insertions(+), 4947 deletions(-) create mode 100644 vendor/github.com/ncabatoff/process-exporter/.gitignore create mode 100644 vendor/github.com/ncabatoff/process-exporter/.promu.yml create mode 100644 vendor/github.com/ncabatoff/process-exporter/Dockerfile create mode 100644 vendor/github.com/ncabatoff/process-exporter/LICENSE create mode 100644 vendor/github.com/ncabatoff/process-exporter/Makefile create mode 100644 vendor/github.com/ncabatoff/process-exporter/README.md create mode 100644 vendor/github.com/ncabatoff/process-exporter/VERSION create mode 100644 vendor/github.com/ncabatoff/process-exporter/common.go create mode 100644 vendor/github.com/ncabatoff/process-exporter/proc/grouper.go create mode 100644 vendor/github.com/ncabatoff/process-exporter/proc/read.go create mode 100644 vendor/github.com/ncabatoff/process-exporter/proc/tracker.go rename vendor/github.com/prometheus/client_golang/prometheus/{expvar.go => expvar_collector.go} (81%) create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/fnv.go create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go delete mode 100644 vendor/github.com/prometheus/client_golang/prometheus/push.go create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/timer.go delete mode 100644 vendor/github.com/prometheus/common/expfmt/json_decode.go create mode 100644 vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/README.txt create mode 100644 vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/autoneg.go create mode 100644 vendor/github.com/prometheus/common/model/fnv.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubectl/version.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 6ba00dd8d..7bd8083ef 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -253,14 +253,29 @@ "ImportPath": "github.com/mitchellh/mapstructure", "Rev": "740c764bc6149d3f1806231418adb9f52c11bcbf" }, + { + "ImportPath": "github.com/ncabatoff/process-exporter", + "Comment": "v0.1.0", + "Rev": "2942f905437b665326fe044c49edb2094df13b37" + }, + { + "ImportPath": "github.com/ncabatoff/process-exporter/proc", + "Comment": "v0.1.0", + "Rev": "2942f905437b665326fe044c49edb2094df13b37" + }, { "ImportPath": "github.com/pborman/uuid", "Rev": "ca53cad383cad2479bbba7f7a1a05797ec1386e4" }, { "ImportPath": "github.com/prometheus/client_golang/prometheus", - "Comment": "0.7.0-52-ge51041b", - "Rev": "e51041b3fa41cece0dca035740ba6411905be473" + "Comment": "v0.8.0-42-g575f371", + "Rev": "575f371f7862609249a1be4c9145f429fe065e32" + }, + { + "ImportPath": "github.com/prometheus/client_golang/prometheus/promhttp", + "Comment": "v0.8.0-42-g575f371", + "Rev": "575f371f7862609249a1be4c9145f429fe065e32" }, { "ImportPath": "github.com/prometheus/client_model/go", @@ -269,15 +284,19 @@ }, { "ImportPath": "github.com/prometheus/common/expfmt", - "Rev": "ffe929a3f4c4faeaa10f2b9535c2b1be3ad15650" + "Rev": "0d5de9d6d8629cb8bee6d4674da4127cd8b615a3" + }, + { + "ImportPath": "github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg", + "Rev": "0d5de9d6d8629cb8bee6d4674da4127cd8b615a3" }, { "ImportPath": "github.com/prometheus/common/model", - "Rev": "ffe929a3f4c4faeaa10f2b9535c2b1be3ad15650" + "Rev": "0d5de9d6d8629cb8bee6d4674da4127cd8b615a3" }, { "ImportPath": "github.com/prometheus/procfs", - "Rev": "454a56f35412459b5e684fd5ec0f9211b94f002a" + "Rev": "abf152e5f3e97f2fafac028d2cc06c1feb87ffa5" }, { "ImportPath": "github.com/segmentio/go-camelcase", @@ -471,998 +490,998 @@ }, { "ImportPath": "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/install", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha1", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/federation/apis/federation", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/federation/apis/federation/install", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/federation/apis/federation/v1beta1", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/api", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/api/annotations", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/api/endpoints", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/api/errors", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/api/events", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/api/install", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/api/meta", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/api/meta/metatypes", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/api/pod", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/api/resource", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/api/rest", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/api/service", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/api/testapi", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/api/unversioned", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/api/unversioned/validation", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/api/util", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/api/v1", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/api/validation", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/api/validation/path", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apimachinery", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apimachinery/announced", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apimachinery/registered", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/apps", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/apps/install", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/apps/v1beta1", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/authentication", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/authentication/install", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/authentication/v1beta1", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/authorization", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/authorization/install", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/authorization/v1beta1", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/autoscaling", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/autoscaling/install", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/autoscaling/v1", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/batch", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/batch/install", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/batch/v1", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/batch/v2alpha1", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/certificates", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/certificates/install", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/componentconfig", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/componentconfig/install", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/extensions", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/extensions/install", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/extensions/v1beta1", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/extensions/validation", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/imagepolicy", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/imagepolicy/install", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/policy", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/policy/install", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/policy/v1beta1", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/rbac", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/rbac/install", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/storage", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/storage/install", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/storage/util", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/apis/storage/v1beta1", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/auth/authenticator", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/auth/user", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/capabilities", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/cache", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/leaderelection", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/leaderelection/resourcelock", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/metrics", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/record", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/restclient", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/retry", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/testing/core", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/transport", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/typed/discovery", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/typed/discovery/fake", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/typed/dynamic", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/unversioned", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/unversioned/auth", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/unversioned/clientcmd", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/latest", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/cloudprovider", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/cloudprovider/providers/gce", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/controller", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/controller/deployment/util", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/conversion", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/conversion/queryparams", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/credentialprovider", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/fieldpath", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/fields", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/genericapiserver/openapi/common", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/healthz", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/kubectl", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/kubectl/cmd/util", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/kubectl/resource", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/kubelet/qos", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/kubelet/types", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/labels", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/master/ports", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/runtime", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/runtime/serializer", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/runtime/serializer/json", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/runtime/serializer/protobuf", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/runtime/serializer/recognizer", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/runtime/serializer/streaming", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/runtime/serializer/versioning", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/security/apparmor", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/security/podsecuritypolicy/seccomp", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/security/podsecuritypolicy/util", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/selection", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/serviceaccount", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/storage", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/types", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/cert", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/chmod", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/chown", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/clock", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/config", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/diff", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/errors", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/exec", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/flag", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/flowcontrol", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/framer", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/hash", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/homedir", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/integer", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/intstr", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/io", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/json", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/jsonpath", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/labels", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/mount", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/net", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/net/sets", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/node", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/parsers", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/pod", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/rand", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/ratelimit", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/runtime", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/sets", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/slice", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/strategicpatch", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/sysctl", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/uuid", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/validation", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/validation/field", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/wait", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/workqueue", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/util/yaml", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/version", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/volume", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/volume/util", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/watch", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/pkg/watch/versioned", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/plugin/pkg/client/auth", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/plugin/pkg/client/auth/gcp", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/plugin/pkg/client/auth/oidc", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/third_party/forked/golang/json", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/third_party/forked/golang/reflect", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" }, { "ImportPath": "k8s.io/kubernetes/third_party/forked/golang/template", - "Comment": "v1.6.0-alpha.0-319-g06fa13e", - "Rev": "06fa13efd1a622d31841765f8a033d94f381699b" + "Comment": "v1.5.0-beta.2", + "Rev": "0776eab45fe28f02bbeac0f05ae1a203051a21eb" } ] } diff --git a/controllers/gce/controller/controller.go b/controllers/gce/controller/controller.go index eb514fd28..9b69b1e6f 100644 --- a/controllers/gce/controller/controller.go +++ b/controllers/gce/controller/controller.go @@ -90,7 +90,7 @@ type LoadBalancerController struct { func NewLoadBalancerController(kubeClient client.Interface, clusterManager *ClusterManager, resyncPeriod time.Duration, namespace string) (*LoadBalancerController, error) { eventBroadcaster := record.NewBroadcaster() eventBroadcaster.StartLogging(glog.Infof) - eventBroadcaster.StartRecordingToSink(unversionedcore.EventSinkImpl{ + eventBroadcaster.StartRecordingToSink(&unversionedcore.EventSinkImpl{ Interface: kubeClient.Core().Events(""), }) lbc := LoadBalancerController{ diff --git a/vendor/github.com/ncabatoff/process-exporter/.gitignore b/vendor/github.com/ncabatoff/process-exporter/.gitignore new file mode 100644 index 000000000..77ed2b599 --- /dev/null +++ b/vendor/github.com/ncabatoff/process-exporter/.gitignore @@ -0,0 +1,4 @@ +.*.sw? +process-exporter +.tarballs +process-exporter-*.tar.gz diff --git a/vendor/github.com/ncabatoff/process-exporter/.promu.yml b/vendor/github.com/ncabatoff/process-exporter/.promu.yml new file mode 100644 index 000000000..ae8ab4ebc --- /dev/null +++ b/vendor/github.com/ncabatoff/process-exporter/.promu.yml @@ -0,0 +1,35 @@ +repository: + path: github.com/ncabatoff/process-exporter +build: + binaries: + - name: process-exporter + path: ./cmd/process-exporter + flags: -a -tags netgo +tarball: + files: + - LICENSE +crossbuild: + platforms: + - linux/amd64 + - linux/386 + - darwin/amd64 + - darwin/386 + - freebsd/amd64 + - freebsd/386 + - openbsd/amd64 + - openbsd/386 + - netbsd/amd64 + - netbsd/386 + - dragonfly/amd64 + - linux/arm + - linux/arm64 + - freebsd/arm + # Temporarily deactivated as golang.org/x/sys does not have syscalls + # implemented for that os/platform combination. + #- openbsd/arm + #- linux/mips64 + #- linux/mips64le + - netbsd/arm + - linux/ppc64 + - linux/ppc64le + diff --git a/vendor/github.com/ncabatoff/process-exporter/Dockerfile b/vendor/github.com/ncabatoff/process-exporter/Dockerfile new file mode 100644 index 000000000..77abaff65 --- /dev/null +++ b/vendor/github.com/ncabatoff/process-exporter/Dockerfile @@ -0,0 +1,17 @@ +# Start from a Debian image with the latest version of Go installed +# and a workspace (GOPATH) configured at /go. +FROM golang + +# Copy the local package files to the container's workspace. +ADD . /go/src/github.com/ncabatoff/process-exporter + +# Build the process-exporter command inside the container. +RUN make -C /go/src/github.com/ncabatoff/process-exporter + +USER root + +# Run the process-exporter command by default when the container starts. +ENTRYPOINT ["/go/src/github.com/ncabatoff/process-exporter/process-exporter"] + +# Document that the service listens on port 9256. +EXPOSE 9256 diff --git a/vendor/github.com/ncabatoff/process-exporter/LICENSE b/vendor/github.com/ncabatoff/process-exporter/LICENSE new file mode 100644 index 000000000..51043b693 --- /dev/null +++ b/vendor/github.com/ncabatoff/process-exporter/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 ncabatoff + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/ncabatoff/process-exporter/Makefile b/vendor/github.com/ncabatoff/process-exporter/Makefile new file mode 100644 index 000000000..028c2c236 --- /dev/null +++ b/vendor/github.com/ncabatoff/process-exporter/Makefile @@ -0,0 +1,71 @@ +# Copyright 2015 The Prometheus Authors +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +GO := GO15VENDOREXPERIMENT=1 go +FIRST_GOPATH := $(firstword $(subst :, ,$(GOPATH))) +PROMU := $(FIRST_GOPATH)/bin/promu +pkgs = $(shell $(GO) list ./... | grep -v /vendor/) + +PREFIX ?= $(shell pwd) +BIN_DIR ?= $(shell pwd) +DOCKER_IMAGE_NAME ?= process-exporter +DOCKER_IMAGE_TAG ?= $(subst /,-,$(shell git rev-parse --abbrev-ref HEAD)) + +ifdef DEBUG + bindata_flags = -debug +endif + + +all: format build test + +style: + @echo ">> checking code style" + @! gofmt -d $(shell find . -path ./vendor -prune -o -name '*.go' -print) | grep '^' + +test: + @echo ">> running short tests" + @$(GO) test -short $(pkgs) + +format: + @echo ">> formatting code" + @$(GO) fmt $(pkgs) + +vet: + @echo ">> vetting code" + @$(GO) vet $(pkgs) + +build: promu + @echo ">> building binaries" + @$(PROMU) build --prefix $(PREFIX) + +tarball: promu + @echo ">> building release tarball" + @$(PROMU) tarball --prefix $(PREFIX) $(BIN_DIR) + +crossbuild: promu + @echo ">> cross-building" + @$(PROMU) crossbuild + @$(PROMU) crossbuild tarballs + +docker: + @echo ">> building docker image" + @docker build -t "$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" . + +promu: + @echo ">> fetching promu" + @GOOS=$(shell uname -s | tr A-Z a-z) \ + GOARCH=$(subst x86_64,amd64,$(patsubst i%86,386,$(shell uname -m))) \ + $(GO) get -u github.com/prometheus/promu + + +.PHONY: all style format build test vet tarball crossbuild docker promu diff --git a/vendor/github.com/ncabatoff/process-exporter/README.md b/vendor/github.com/ncabatoff/process-exporter/README.md new file mode 100644 index 000000000..01cb32186 --- /dev/null +++ b/vendor/github.com/ncabatoff/process-exporter/README.md @@ -0,0 +1,160 @@ +# process-exporter +Prometheus exporter that mines /proc to report on selected processes. + +The premise for this exporter is that sometimes you have apps that are +impractical to instrument directly, either because you don't control the code +or they're written in a language that isn't easy to instrument with Prometheus. +A fair bit of information can be gleaned from /proc, especially for +long-running programs. + +For most systems it won't be beneficial to create metrics for every process by +name: there are just too many of them and most don't do enough to merit it. +Various command-line options are provided to control how processes are grouped +and the groups are named. Run "process-exporter -man" to see a help page +giving details. + +Metrics available currently include CPU usage, bytes written and read, and +number of processes in each group. + +Bytes read and written come from /proc/[pid]/io in recent enough kernels. +These correspond to the fields `read_bytes` and `write_bytes` respectively. +These IO stats come with plenty of caveats, see either the Linux kernel +documentation or man 5 proc. + +CPU usage comes from /proc/[pid]/stat fields utime (user time) and stime (system +time.) It has been translated into fractional seconds of CPU consumed. Since +it is a counter, using rate() will tell you how many fractional cores were running +code from this process during the interval given. + +An example Grafana dashboard to view the metrics is available at https://grafana.net/dashboards/249 + +## Instrumentation cost + +process-exporter will consume CPU in proportion to the number of processes in +the system and the rate at which new ones are created. The most expensive +parts - applying regexps and executing templates - are only applied once per +process seen. If you have mostly long-running processes process-exporter +should be lightweight: each time a scrape occurs, parsing of /proc/$pid/stat +and /proc/$pid/cmdline for every process being monitored and adding a few +numbers. + +## Config + +To select and group the processes to monitor, either provide command-line +arguments or use a YAML configuration file. + +To avoid confusion with the cmdline YAML element, we'll refer to the +null-delimited contents of `/proc//cmdline` as the array `argv[]`. + +Each item in `process_names` gives a recipe for identifying and naming +processes. The optional `name` tag defines a template to use to name +matching processes; if not specified, `name` defaults to `{{.ExeBase}}`. + +Template variables available: +- `{{.ExeBase}}` contains the basename of the executable +- `{{.ExeFull}}` contains the fully qualified path of the executable +- `{{.Matches}}` map contains all the matches resulting from applying cmdline regexps + +Each item in `process_names` must contain one or more selectors (`comm`, `exe` +or `cmdline`); if more than one selector is present, they must all match. Each +selector is a list of strings to match against a process's `comm`, `argv[0]`, +or in the case of `cmdline`, a regexp to apply to the command line. + +For `comm` and `exe`, the list of strings is an OR, meaning any process +matching any of the strings will be added to the item's group. + +For `cmdline`, the list of regexes is an AND, meaning they all must match. Any +capturing groups in a regexp must use the `?P` option to assign a name to +the capture, which is used to populate `.Matches`. + +A process may only belong to one group: even if multiple items would match, the +first one listed in the file wins. + +Other performance tips: give an exe or comm clause in addition to any cmdline +clause, so you avoid executing the regexp when the executable name doesn't +match. + +``` + +process_names: + # comm is the second field of /proc//stat minus parens. + # It is the base executable name, truncated at 15 chars. + # It cannot be modified by the program, unlike exe. + - comm: + - bash + + # exe is argv[0]. If no slashes, only basename of argv[0] need match. + # If exe contains slashes, argv[0] must match exactly. + - exe: + - postgres + - /usr/local/bin/prometheus + + # cmdline is a list of regexps applied to argv. + # Each must match, and any captures are added to the .Matches map. + - name: "{{.ExeFull}}:{{.Matches.Cfgfile}}" + exe: + - /usr/local/bin/process-exporter + cmdline: + - -config.path\\s+(?P\\S+) + + +``` + +Here's the config I use on my home machine: + +``` + +process_names: + - comm: + - chromium-browse + - bash + - prometheus + - gvim + - exe: + - /sbin/upstart + cmdline: + - --user + name: upstart:-user + +``` + +## Docker + +A docker image can be created with + +``` +make docker +``` + +Then run the docker, e.g. + +``` +docker run --privileged --name pexporter -d -v /proc:/host/proc -p 127.0.0.1:9256:9256 process-exporter:master -procfs /host/proc -procnames chromium-browse,bash,prometheus,gvim,upstart:-user -namemapping "upstart,(-user)" +``` + +This will expose metrics on http://localhost:9256/metrics. Leave off the +`127.0.0.1:` to publish on all interfaces. Leave off the --priviliged and +add the --user docker run argument if you only need to monitor processes +belonging to a single user. + +## History + +An earlier version of this exporter had options to enable auto-discovery of +which processes were consuming resources. This functionality has been removed. +These options were based on a percentage of resource usage, e.g. if an +untracked process consumed X% of CPU during a scrape, start tracking processes +with that name. However during any given scrape it's likely that most +processes are idle, so we could add a process that consumes minimal resources +but which happened to be active during the interval preceding the current +scrape. Over time this means that a great many processes wind up being +scraped, which becomes unmanageable to visualize. This could be mitigated by +looking at resource usage over longer intervals, but ultimately I didn't feel +this feature was important enough to invest more time in at this point. It may +re-appear at some point in the future, but no promises. + +Another lost feature: the "other" group was used to count usage by non-tracked +procs. This was useful to get an idea of what wasn't being monitored. But it +comes at a high cost: if you know what processes you care about, you're wasting +a lot of CPU to compute the usage of everything else that you don't care about. +The new approach is to minimize resources expended on non-tracked processes and +to require the user to whitelist the processes to track. diff --git a/vendor/github.com/ncabatoff/process-exporter/VERSION b/vendor/github.com/ncabatoff/process-exporter/VERSION new file mode 100644 index 000000000..6e8bf73aa --- /dev/null +++ b/vendor/github.com/ncabatoff/process-exporter/VERSION @@ -0,0 +1 @@ +0.1.0 diff --git a/vendor/github.com/ncabatoff/process-exporter/common.go b/vendor/github.com/ncabatoff/process-exporter/common.go new file mode 100644 index 000000000..ae5e82a37 --- /dev/null +++ b/vendor/github.com/ncabatoff/process-exporter/common.go @@ -0,0 +1,14 @@ +package common + +type ( + NameAndCmdline struct { + Name string + Cmdline []string + } + + MatchNamer interface { + // MatchAndName returns false if the match failed, otherwise + // true and the resulting name. + MatchAndName(NameAndCmdline) (bool, string) + } +) diff --git a/vendor/github.com/ncabatoff/process-exporter/proc/grouper.go b/vendor/github.com/ncabatoff/process-exporter/proc/grouper.go new file mode 100644 index 000000000..eccb1b985 --- /dev/null +++ b/vendor/github.com/ncabatoff/process-exporter/proc/grouper.go @@ -0,0 +1,166 @@ +package proc + +import ( + common "github.com/ncabatoff/process-exporter" + "time" +) + +type ( + Grouper struct { + namer common.MatchNamer + trackChildren bool + // track how much was seen last time so we can report the delta + GroupStats map[string]Counts + tracker *Tracker + } + + GroupCountMap map[string]GroupCounts + + GroupCounts struct { + Counts + Procs int + Memresident uint64 + Memvirtual uint64 + OldestStartTime time.Time + } +) + +func NewGrouper(trackChildren bool, namer common.MatchNamer) *Grouper { + g := Grouper{ + trackChildren: trackChildren, + namer: namer, + GroupStats: make(map[string]Counts), + tracker: NewTracker(), + } + return &g +} + +func (g *Grouper) checkAncestry(idinfo ProcIdInfo, newprocs map[ProcId]ProcIdInfo) string { + ppid := idinfo.ParentPid + pProcId := g.tracker.ProcIds[ppid] + if pProcId.Pid < 1 { + // Reached root of process tree without finding a tracked parent. + g.tracker.Ignore(idinfo.ProcId) + return "" + } + + // Is the parent already known to the tracker? + if ptproc, ok := g.tracker.Tracked[pProcId]; ok { + if ptproc != nil { + // We've found a tracked parent. + g.tracker.Track(ptproc.GroupName, idinfo) + return ptproc.GroupName + } else { + // We've found an untracked parent. + g.tracker.Ignore(idinfo.ProcId) + return "" + } + } + + // Is the parent another new process? + if pinfoid, ok := newprocs[pProcId]; ok { + if name := g.checkAncestry(pinfoid, newprocs); name != "" { + // We've found a tracked parent, which implies this entire lineage should be tracked. + g.tracker.Track(name, idinfo) + return name + } + } + + // Parent is dead, i.e. we never saw it, or there's no tracked proc in our ancestry. + g.tracker.Ignore(idinfo.ProcId) + return "" + +} + +// Update tracks any new procs that should be according to policy, and updates +// the metrics for already tracked procs. Permission errors are returned as a +// count, and will not affect the error return value. +func (g *Grouper) Update(iter ProcIter) (int, error) { + newProcs, permErrs, err := g.tracker.Update(iter) + if err != nil { + return permErrs, err + } + + // Step 1: track any new proc that should be tracked based on its name and cmdline. + untracked := make(map[ProcId]ProcIdInfo) + for _, idinfo := range newProcs { + wanted, gname := g.namer.MatchAndName(common.NameAndCmdline{idinfo.Name, idinfo.Cmdline}) + if !wanted { + untracked[idinfo.ProcId] = idinfo + continue + } + + g.tracker.Track(gname, idinfo) + } + + // Step 2: track any untracked new proc that should be tracked because its parent is tracked. + if !g.trackChildren { + return permErrs, nil + } + + for _, idinfo := range untracked { + if _, ok := g.tracker.Tracked[idinfo.ProcId]; ok { + // Already tracked or ignored + continue + } + + g.checkAncestry(idinfo, untracked) + } + return permErrs, nil +} + +// groups returns the aggregate metrics for all groups tracked. This reflects +// solely what's currently running. +func (g *Grouper) groups() GroupCountMap { + gcounts := make(GroupCountMap) + + var zeroTime time.Time + for _, tinfo := range g.tracker.Tracked { + if tinfo == nil { + continue + } + cur := gcounts[tinfo.GroupName] + cur.Procs++ + _, counts, mem, start := tinfo.GetStats() + cur.Memresident += mem.Resident + cur.Memvirtual += mem.Virtual + cur.Counts.Cpu += counts.Cpu + cur.Counts.ReadBytes += counts.ReadBytes + cur.Counts.WriteBytes += counts.WriteBytes + if cur.OldestStartTime == zeroTime || start.Before(cur.OldestStartTime) { + cur.OldestStartTime = start + } + gcounts[tinfo.GroupName] = cur + } + + return gcounts +} + +// Groups returns GroupCounts with Counts that never decrease in value from one +// call to the next. Even if processes exit, their CPU and IO contributions up +// to that point are included in the results. Even if no processes remain +// in a group it will still be included in the results. +func (g *Grouper) Groups() GroupCountMap { + groups := g.groups() + + // First add any accumulated counts to what was just observed, + // and update the accumulators. + for gname, group := range groups { + if oldcounts, ok := g.GroupStats[gname]; ok { + group.Counts.Cpu += oldcounts.Cpu + group.Counts.ReadBytes += oldcounts.ReadBytes + group.Counts.WriteBytes += oldcounts.WriteBytes + } + g.GroupStats[gname] = group.Counts + groups[gname] = group + } + + // Now add any groups that were observed in the past but aren't running now. + for gname, gcounts := range g.GroupStats { + if _, ok := groups[gname]; !ok { + groups[gname] = GroupCounts{Counts: gcounts} + } + } + + return groups +} diff --git a/vendor/github.com/ncabatoff/process-exporter/proc/read.go b/vendor/github.com/ncabatoff/process-exporter/proc/read.go new file mode 100644 index 000000000..1cad6ef43 --- /dev/null +++ b/vendor/github.com/ncabatoff/process-exporter/proc/read.go @@ -0,0 +1,306 @@ +package proc + +import ( + "fmt" + "github.com/prometheus/procfs" + "time" +) + +func newProcIdStatic(pid, ppid int, startTime uint64, name string, cmdline []string) ProcIdStatic { + return ProcIdStatic{ProcId{pid, startTime}, ProcStatic{name, cmdline, ppid, time.Time{}}} +} + +type ( + // ProcId uniquely identifies a process. + ProcId struct { + // UNIX process id + Pid int + // The time the process started after system boot, the value is expressed + // in clock ticks. + StartTimeRel uint64 + } + + // ProcStatic contains data read from /proc/pid/* + ProcStatic struct { + Name string + Cmdline []string + ParentPid int + StartTime time.Time + } + + // ProcMetrics contains data read from /proc/pid/* + ProcMetrics struct { + CpuTime float64 + ReadBytes uint64 + WriteBytes uint64 + ResidentBytes uint64 + VirtualBytes uint64 + } + + ProcIdStatic struct { + ProcId + ProcStatic + } + + ProcInfo struct { + ProcStatic + ProcMetrics + } + + ProcIdInfo struct { + ProcId + ProcStatic + ProcMetrics + } + + // Proc wraps the details of the underlying procfs-reading library. + Proc interface { + // GetPid() returns the POSIX PID (process id). They may be reused over time. + GetPid() int + // GetProcId() returns (pid,starttime), which can be considered a unique process id. + // It may fail if the caller doesn't have permission to read /proc//stat, or if + // the process has disapeared. + GetProcId() (ProcId, error) + // GetStatic() returns various details read from files under /proc//. Technically + // name may not be static, but we'll pretend it is. + // It may fail if the caller doesn't have permission to read those files, or if + // the process has disapeared. + GetStatic() (ProcStatic, error) + // GetMetrics() returns various metrics read from files under /proc//. + // It may fail if the caller doesn't have permission to read those files, or if + // the process has disapeared. + GetMetrics() (ProcMetrics, error) + } + + // proc is a wrapper for procfs.Proc that caches results of some reads and implements Proc. + proc struct { + procfs.Proc + procid *ProcId + stat *procfs.ProcStat + cmdline []string + io *procfs.ProcIO + bootTime int64 + } + + procs interface { + get(int) Proc + length() int + } + + procfsprocs struct { + Procs []procfs.Proc + bootTime int64 + } + + // ProcIter is an iterator over a sequence of procs. + ProcIter interface { + // Next returns true if the iterator is not exhausted. + Next() bool + // Close releases any resources the iterator uses. + Close() error + // The iterator satisfies the Proc interface. + Proc + } + + // procIterator implements the ProcIter interface using procfs. + procIterator struct { + // procs is the list of Proc we're iterating over. + procs + // idx is the current iteration, i.e. it's an index into procs. + idx int + // err is set with an error when Next() fails. It is not affected by failures accessing + // the current iteration variable, e.g. with GetProcId. + err error + // Proc is the current iteration variable, or nil if Next() has never been called or the + // iterator is exhausted. + Proc + } + + procIdInfos []ProcIdInfo +) + +func procInfoIter(ps ...ProcIdInfo) ProcIter { + return &procIterator{procs: procIdInfos(ps), idx: -1} +} + +func Info(p Proc) (ProcIdInfo, error) { + id, err := p.GetProcId() + if err != nil { + return ProcIdInfo{}, err + } + static, err := p.GetStatic() + if err != nil { + return ProcIdInfo{}, err + } + metrics, err := p.GetMetrics() + if err != nil { + return ProcIdInfo{}, err + } + return ProcIdInfo{id, static, metrics}, nil +} + +func (p procIdInfos) get(i int) Proc { + return &p[i] +} + +func (p procIdInfos) length() int { + return len(p) +} + +func (p ProcIdInfo) GetPid() int { + return p.ProcId.Pid +} + +func (p ProcIdInfo) GetProcId() (ProcId, error) { + return p.ProcId, nil +} + +func (p ProcIdInfo) GetStatic() (ProcStatic, error) { + return p.ProcStatic, nil +} + +func (p ProcIdInfo) GetMetrics() (ProcMetrics, error) { + return p.ProcMetrics, nil +} + +func (p procfsprocs) get(i int) Proc { + return &proc{Proc: p.Procs[i], bootTime: p.bootTime} +} + +func (p procfsprocs) length() int { + return len(p.Procs) +} + +func (p *proc) GetPid() int { + return p.Proc.PID +} + +func (p *proc) GetStat() (procfs.ProcStat, error) { + if p.stat == nil { + stat, err := p.Proc.NewStat() + if err != nil { + return procfs.ProcStat{}, err + } + p.stat = &stat + } + + return *p.stat, nil +} + +func (p *proc) GetProcId() (ProcId, error) { + if p.procid == nil { + stat, err := p.GetStat() + if err != nil { + return ProcId{}, err + } + p.procid = &ProcId{Pid: p.GetPid(), StartTimeRel: stat.Starttime} + } + + return *p.procid, nil +} + +func (p *proc) GetCmdLine() ([]string, error) { + if p.cmdline == nil { + cmdline, err := p.Proc.CmdLine() + if err != nil { + return nil, err + } + p.cmdline = cmdline + } + return p.cmdline, nil +} + +func (p *proc) GetIo() (procfs.ProcIO, error) { + if p.io == nil { + io, err := p.Proc.NewIO() + if err != nil { + return procfs.ProcIO{}, err + } + p.io = &io + } + return *p.io, nil +} + +func (p proc) GetStatic() (ProcStatic, error) { + cmdline, err := p.GetCmdLine() + if err != nil { + return ProcStatic{}, err + } + stat, err := p.GetStat() + if err != nil { + return ProcStatic{}, err + } + startTime := time.Unix(p.bootTime, 0) + startTime = startTime.Add(time.Second / userHZ * time.Duration(stat.Starttime)) + return ProcStatic{ + Name: stat.Comm, + Cmdline: cmdline, + ParentPid: stat.PPID, + StartTime: startTime, + }, nil +} + +func (p proc) GetMetrics() (ProcMetrics, error) { + io, err := p.GetIo() + if err != nil { + return ProcMetrics{}, err + } + stat, err := p.GetStat() + if err != nil { + return ProcMetrics{}, err + } + return ProcMetrics{ + CpuTime: stat.CPUTime(), + ReadBytes: io.ReadBytes, + WriteBytes: io.WriteBytes, + ResidentBytes: uint64(stat.ResidentMemory()), + VirtualBytes: uint64(stat.VirtualMemory()), + }, nil +} + +type FS struct { + procfs.FS + BootTime int64 +} + +// See https://github.com/prometheus/procfs/blob/master/proc_stat.go for details on userHZ. +const userHZ = 100 + +// NewFS returns a new FS mounted under the given mountPoint. It will error +// if the mount point can't be read. +func NewFS(mountPoint string) (*FS, error) { + fs, err := procfs.NewFS(mountPoint) + if err != nil { + return nil, err + } + stat, err := fs.NewStat() + if err != nil { + return nil, err + } + return &FS{fs, stat.BootTime}, nil +} + +func (fs *FS) AllProcs() ProcIter { + procs, err := fs.FS.AllProcs() + if err != nil { + err = fmt.Errorf("Error reading procs: %v", err) + } + return &procIterator{procs: procfsprocs{procs, fs.BootTime}, err: err, idx: -1} +} + +func (pi *procIterator) Next() bool { + pi.idx++ + if pi.idx < pi.procs.length() { + pi.Proc = pi.procs.get(pi.idx) + } else { + pi.Proc = nil + } + return pi.idx < pi.procs.length() +} + +func (pi *procIterator) Close() error { + pi.Next() + pi.procs = nil + pi.Proc = nil + return pi.err +} diff --git a/vendor/github.com/ncabatoff/process-exporter/proc/tracker.go b/vendor/github.com/ncabatoff/process-exporter/proc/tracker.go new file mode 100644 index 000000000..3c6b44883 --- /dev/null +++ b/vendor/github.com/ncabatoff/process-exporter/proc/tracker.go @@ -0,0 +1,160 @@ +package proc + +import ( + "fmt" + "os" + "time" +) + +type ( + Counts struct { + Cpu float64 + ReadBytes uint64 + WriteBytes uint64 + } + + Memory struct { + Resident uint64 + Virtual uint64 + } + + // Tracker tracks processes and records metrics. + Tracker struct { + // Tracked holds the processes are being monitored. Processes + // may be blacklisted such that they no longer get tracked by + // setting their value in the Tracked map to nil. + Tracked map[ProcId]*TrackedProc + // ProcIds is a map from pid to ProcId. This is a convenience + // to allow finding the Tracked entry of a parent process. + ProcIds map[int]ProcId + } + + // TrackedProc accumulates metrics for a process, as well as + // remembering an optional GroupName tag associated with it. + TrackedProc struct { + // lastUpdate is used internally during the update cycle to find which procs have exited + lastUpdate time.Time + // info is the most recently obtained info for this proc + info ProcInfo + // accum is the total CPU and IO accrued since we started tracking this proc + accum Counts + // lastaccum is the CPU and IO accrued in the last Update() + lastaccum Counts + // GroupName is an optional tag for this proc. + GroupName string + } +) + +func (tp *TrackedProc) GetName() string { + return tp.info.Name +} + +func (tp *TrackedProc) GetCmdLine() []string { + return tp.info.Cmdline +} + +func (tp *TrackedProc) GetStats() (aggregate, latest Counts, mem Memory, start time.Time) { + return tp.accum, tp.lastaccum, Memory{Resident: tp.info.ResidentBytes, Virtual: tp.info.VirtualBytes}, tp.info.StartTime +} + +func NewTracker() *Tracker { + return &Tracker{Tracked: make(map[ProcId]*TrackedProc), ProcIds: make(map[int]ProcId)} +} + +func (t *Tracker) Track(groupName string, idinfo ProcIdInfo) { + info := ProcInfo{idinfo.ProcStatic, idinfo.ProcMetrics} + t.Tracked[idinfo.ProcId] = &TrackedProc{GroupName: groupName, info: info} +} + +func (t *Tracker) Ignore(id ProcId) { + t.Tracked[id] = nil +} + +// Scan procs and update metrics for those which are tracked. Processes that have gone +// away get removed from the Tracked map. New processes are returned, along with the count +// of permission errors. +func (t *Tracker) Update(procs ProcIter) ([]ProcIdInfo, int, error) { + now := time.Now() + var newProcs []ProcIdInfo + var permissionErrors int + + for procs.Next() { + procId, err := procs.GetProcId() + if err != nil { + continue + } + + last, known := t.Tracked[procId] + + // Are we ignoring this proc? + if known && last == nil { + continue + } + + // TODO if just the io file is unreadable, should we still return the other metrics? + metrics, err := procs.GetMetrics() + if err != nil { + if os.IsPermission(err) { + permissionErrors++ + t.Ignore(procId) + } + continue + } + + if known { + var newaccum, lastaccum Counts + dcpu := metrics.CpuTime - last.info.CpuTime + drbytes := metrics.ReadBytes - last.info.ReadBytes + dwbytes := metrics.WriteBytes - last.info.WriteBytes + + lastaccum = Counts{Cpu: dcpu, ReadBytes: drbytes, WriteBytes: dwbytes} + newaccum = Counts{ + Cpu: last.accum.Cpu + lastaccum.Cpu, + ReadBytes: last.accum.ReadBytes + lastaccum.ReadBytes, + WriteBytes: last.accum.WriteBytes + lastaccum.WriteBytes, + } + + last.info.ProcMetrics = metrics + last.lastUpdate = now + last.accum = newaccum + last.lastaccum = lastaccum + } else { + static, err := procs.GetStatic() + if err != nil { + continue + } + newProcs = append(newProcs, ProcIdInfo{procId, static, metrics}) + + // Is this a new process with the same pid as one we already know? + if oldProcId, ok := t.ProcIds[procId.Pid]; ok { + // Delete it from known, otherwise the cleanup below will remove the + // ProcIds entry we're about to create + delete(t.Tracked, oldProcId) + } + t.ProcIds[procId.Pid] = procId + } + + } + err := procs.Close() + if err != nil { + return nil, permissionErrors, fmt.Errorf("Error reading procs: %v", err) + } + + // Rather than allocating a new map each time to detect procs that have + // disappeared, we bump the last update time on those that are still + // present. Then as a second pass we traverse the map looking for + // stale procs and removing them. + for procId, pinfo := range t.Tracked { + if pinfo == nil { + // TODO is this a bug? we're not tracking the proc so we don't see it go away so ProcIds + // and Tracked are leaking? + continue + } + if pinfo.lastUpdate != now { + delete(t.Tracked, procId) + delete(t.ProcIds, procId.Pid) + } + } + + return newProcs, permissionErrors, nil +} diff --git a/vendor/github.com/prometheus/client_golang/NOTICE b/vendor/github.com/prometheus/client_golang/NOTICE index 37e4a7d41..dd878a30e 100644 --- a/vendor/github.com/prometheus/client_golang/NOTICE +++ b/vendor/github.com/prometheus/client_golang/NOTICE @@ -7,11 +7,6 @@ SoundCloud Ltd. (http://soundcloud.com/). The following components are included in this product: -goautoneg -http://bitbucket.org/ww/goautoneg -Copyright 2011, Open Knowledge Foundation Ltd. -See README.txt for license details. - perks - a fork of https://github.com/bmizerany/perks https://github.com/beorn7/perks Copyright 2013-2015 Blake Mizerany, Björn Rabenstein diff --git a/vendor/github.com/prometheus/client_golang/prometheus/README.md b/vendor/github.com/prometheus/client_golang/prometheus/README.md index 81032bed8..44986bff0 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/README.md +++ b/vendor/github.com/prometheus/client_golang/prometheus/README.md @@ -1,53 +1 @@ -# Overview -This is the [Prometheus](http://www.prometheus.io) telemetric -instrumentation client [Go](http://golang.org) client library. It -enable authors to define process-space metrics for their servers and -expose them through a web service interface for extraction, -aggregation, and a whole slew of other post processing techniques. - -# Installing - $ go get github.com/prometheus/client_golang/prometheus - -# Example -```go -package main - -import ( - "net/http" - - "github.com/prometheus/client_golang/prometheus" -) - -var ( - indexed = prometheus.NewCounter(prometheus.CounterOpts{ - Namespace: "my_company", - Subsystem: "indexer", - Name: "documents_indexed", - Help: "The number of documents indexed.", - }) - size = prometheus.NewGauge(prometheus.GaugeOpts{ - Namespace: "my_company", - Subsystem: "storage", - Name: "documents_total_size_bytes", - Help: "The total size of all documents in the storage.", - }) -) - -func main() { - http.Handle("/metrics", prometheus.Handler()) - - indexed.Inc() - size.Set(5) - - http.ListenAndServe(":8080", nil) -} - -func init() { - prometheus.MustRegister(indexed) - prometheus.MustRegister(size) -} -``` - -# Documentation - -[![GoDoc](https://godoc.org/github.com/prometheus/client_golang?status.png)](https://godoc.org/github.com/prometheus/client_golang) +See [![go-doc](https://godoc.org/github.com/prometheus/client_golang/prometheus?status.svg)](https://godoc.org/github.com/prometheus/client_golang/prometheus). diff --git a/vendor/github.com/prometheus/client_golang/prometheus/collector.go b/vendor/github.com/prometheus/client_golang/prometheus/collector.go index c04688009..623d3d83f 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/collector.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/collector.go @@ -15,15 +15,15 @@ package prometheus // Collector is the interface implemented by anything that can be used by // Prometheus to collect metrics. A Collector has to be registered for -// collection. See Register, MustRegister, RegisterOrGet, and MustRegisterOrGet. +// collection. See Registerer.Register. // -// The stock metrics provided by this package (like Gauge, Counter, Summary) are -// also Collectors (which only ever collect one metric, namely itself). An -// implementer of Collector may, however, collect multiple metrics in a -// coordinated fashion and/or create metrics on the fly. Examples for collectors -// already implemented in this library are the metric vectors (i.e. collection -// of multiple instances of the same Metric but with different label values) -// like GaugeVec or SummaryVec, and the ExpvarCollector. +// The stock metrics provided by this package (Gauge, Counter, Summary, +// Histogram, Untyped) are also Collectors (which only ever collect one metric, +// namely itself). An implementer of Collector may, however, collect multiple +// metrics in a coordinated fashion and/or create metrics on the fly. Examples +// for collectors already implemented in this library are the metric vectors +// (i.e. collection of multiple instances of the same Metric but with different +// label values) like GaugeVec or SummaryVec, and the ExpvarCollector. type Collector interface { // Describe sends the super-set of all possible descriptors of metrics // collected by this Collector to the provided channel and returns once @@ -37,39 +37,39 @@ type Collector interface { // executing this method, it must send an invalid descriptor (created // with NewInvalidDesc) to signal the error to the registry. Describe(chan<- *Desc) - // Collect is called by Prometheus when collecting metrics. The - // implementation sends each collected metric via the provided channel - // and returns once the last metric has been sent. The descriptor of - // each sent metric is one of those returned by Describe. Returned - // metrics that share the same descriptor must differ in their variable - // label values. This method may be called concurrently and must - // therefore be implemented in a concurrency safe way. Blocking occurs - // at the expense of total performance of rendering all registered - // metrics. Ideally, Collector implementations support concurrent - // readers. + // Collect is called by the Prometheus registry when collecting + // metrics. The implementation sends each collected metric via the + // provided channel and returns once the last metric has been sent. The + // descriptor of each sent metric is one of those returned by + // Describe. Returned metrics that share the same descriptor must differ + // in their variable label values. This method may be called + // concurrently and must therefore be implemented in a concurrency safe + // way. Blocking occurs at the expense of total performance of rendering + // all registered metrics. Ideally, Collector implementations support + // concurrent readers. Collect(chan<- Metric) } -// SelfCollector implements Collector for a single Metric so that that the -// Metric collects itself. Add it as an anonymous field to a struct that -// implements Metric, and call Init with the Metric itself as an argument. -type SelfCollector struct { +// selfCollector implements Collector for a single Metric so that the Metric +// collects itself. Add it as an anonymous field to a struct that implements +// Metric, and call init with the Metric itself as an argument. +type selfCollector struct { self Metric } -// Init provides the SelfCollector with a reference to the metric it is supposed +// init provides the selfCollector with a reference to the metric it is supposed // to collect. It is usually called within the factory function to create a // metric. See example. -func (c *SelfCollector) Init(self Metric) { +func (c *selfCollector) init(self Metric) { c.self = self } // Describe implements Collector. -func (c *SelfCollector) Describe(ch chan<- *Desc) { +func (c *selfCollector) Describe(ch chan<- *Desc) { ch <- c.self.Desc() } // Collect implements Collector. -func (c *SelfCollector) Collect(ch chan<- Metric) { +func (c *selfCollector) Collect(ch chan<- Metric) { ch <- c.self } diff --git a/vendor/github.com/prometheus/client_golang/prometheus/counter.go b/vendor/github.com/prometheus/client_golang/prometheus/counter.go index a2952d1c8..72d5256a5 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/counter.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/counter.go @@ -15,7 +15,6 @@ package prometheus import ( "errors" - "hash/fnv" ) // Counter is a Metric that represents a single numerical value that only ever @@ -31,13 +30,8 @@ type Counter interface { Metric Collector - // Set is used to set the Counter to an arbitrary value. It is only used - // if you have to transfer a value from an external counter into this - // Prometheus metric. Do not use it for regular handling of a - // Prometheus counter (as it can be used to break the contract of - // monotonically increasing values). - Set(float64) - // Inc increments the counter by 1. + // Inc increments the counter by 1. Use Add to increment it by arbitrary + // non-negative values. Inc() // Add adds the given value to the counter. It panics if the value is < // 0. @@ -56,7 +50,7 @@ func NewCounter(opts CounterOpts) Counter { opts.ConstLabels, ) result := &counter{value: value{desc: desc, valType: CounterValue, labelPairs: desc.constLabelPairs}} - result.Init(result) // Init self-collection. + result.init(result) // Init self-collection. return result } @@ -80,7 +74,7 @@ func (c *counter) Add(v float64) { // CounterVec embeds MetricVec. See there for a full list of methods with // detailed documentation. type CounterVec struct { - MetricVec + *MetricVec } // NewCounterVec creates a new CounterVec based on the provided CounterOpts and @@ -94,20 +88,15 @@ func NewCounterVec(opts CounterOpts, labelNames []string) *CounterVec { opts.ConstLabels, ) return &CounterVec{ - MetricVec: MetricVec{ - children: map[uint64]Metric{}, - desc: desc, - hash: fnv.New64a(), - newMetric: func(lvs ...string) Metric { - result := &counter{value: value{ - desc: desc, - valType: CounterValue, - labelPairs: makeLabelPairs(desc, lvs), - }} - result.Init(result) // Init self-collection. - return result - }, - }, + MetricVec: newMetricVec(desc, func(lvs ...string) Metric { + result := &counter{value: value{ + desc: desc, + valType: CounterValue, + labelPairs: makeLabelPairs(desc, lvs), + }} + result.init(result) // Init self-collection. + return result + }), } } diff --git a/vendor/github.com/prometheus/client_golang/prometheus/desc.go b/vendor/github.com/prometheus/client_golang/prometheus/desc.go index fcde784d6..1835b16f6 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/desc.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/desc.go @@ -1,24 +1,30 @@ +// Copyright 2016 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package prometheus import ( - "bytes" "errors" "fmt" - "hash/fnv" - "regexp" "sort" "strings" "github.com/golang/protobuf/proto" + "github.com/prometheus/common/model" dto "github.com/prometheus/client_model/go" ) -var ( - metricNameRE = regexp.MustCompile(`^[a-zA-Z_][a-zA-Z0-9_:]*$`) - labelNameRE = regexp.MustCompile("^[a-zA-Z_][a-zA-Z0-9_]*$") -) - // reservedLabelPrefix is a prefix which is not legal in user-supplied // label names. const reservedLabelPrefix = "__" @@ -67,7 +73,7 @@ type Desc struct { // Help string. Each Desc with the same fqName must have the same // dimHash. dimHash uint64 - // err is an error that occured during construction. It is reported on + // err is an error that occurred during construction. It is reported on // registration time. err error } @@ -92,7 +98,7 @@ func NewDesc(fqName, help string, variableLabels []string, constLabels Labels) * d.err = errors.New("empty help string") return d } - if !metricNameRE.MatchString(fqName) { + if !model.IsValidMetricName(model.LabelValue(fqName)) { d.err = fmt.Errorf("%q is not a valid metric name", fqName) return d } @@ -131,31 +137,24 @@ func NewDesc(fqName, help string, variableLabels []string, constLabels Labels) * d.err = errors.New("duplicate label names") return d } - h := fnv.New64a() - var b bytes.Buffer // To copy string contents into, avoiding []byte allocations. + vh := hashNew() for _, val := range labelValues { - b.Reset() - b.WriteString(val) - b.WriteByte(separatorByte) - h.Write(b.Bytes()) + vh = hashAdd(vh, val) + vh = hashAddByte(vh, separatorByte) } - d.id = h.Sum64() + d.id = vh // Sort labelNames so that order doesn't matter for the hash. sort.Strings(labelNames) // Now hash together (in this order) the help string and the sorted // label names. - h.Reset() - b.Reset() - b.WriteString(help) - b.WriteByte(separatorByte) - h.Write(b.Bytes()) + lh := hashNew() + lh = hashAdd(lh, help) + lh = hashAddByte(lh, separatorByte) for _, labelName := range labelNames { - b.Reset() - b.WriteString(labelName) - b.WriteByte(separatorByte) - h.Write(b.Bytes()) + lh = hashAdd(lh, labelName) + lh = hashAddByte(lh, separatorByte) } - d.dimHash = h.Sum64() + d.dimHash = lh d.constLabelPairs = make([]*dto.LabelPair, 0, len(constLabels)) for n, v := range constLabels { @@ -196,6 +195,6 @@ func (d *Desc) String() string { } func checkLabelName(l string) bool { - return labelNameRE.MatchString(l) && + return model.LabelName(l).IsValid() && !strings.HasPrefix(l, reservedLabelPrefix) } diff --git a/vendor/github.com/prometheus/client_golang/prometheus/doc.go b/vendor/github.com/prometheus/client_golang/prometheus/doc.go index 425fe8793..618c4dee9 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/doc.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/doc.go @@ -11,18 +11,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package prometheus provides embeddable metric primitives for servers and -// standardized exposition of telemetry through a web services interface. +// Package prometheus provides metrics primitives to instrument code for +// monitoring. It also offers a registry for metrics. Sub-packages allow to +// expose the registered metrics via HTTP (package promhttp) or push them to a +// Pushgateway (package push). // // All exported functions and methods are safe to be used concurrently unless -// specified otherwise. +//specified otherwise. // -// To expose metrics registered with the Prometheus registry, an HTTP server -// needs to know about the Prometheus handler. The usual endpoint is "/metrics". +// A Basic Example // -// http.Handle("/metrics", prometheus.Handler()) -// -// As a starting point a very basic usage example: +// As a starting point, a very basic usage example: // // package main // @@ -30,6 +29,7 @@ // "net/http" // // "github.com/prometheus/client_golang/prometheus" +// "github.com/prometheus/client_golang/prometheus/promhttp" // ) // // var ( @@ -37,73 +37,145 @@ // Name: "cpu_temperature_celsius", // Help: "Current temperature of the CPU.", // }) -// hdFailures = prometheus.NewCounter(prometheus.CounterOpts{ -// Name: "hd_errors_total", -// Help: "Number of hard-disk errors.", -// }) +// hdFailures = prometheus.NewCounterVec( +// prometheus.CounterOpts{ +// Name: "hd_errors_total", +// Help: "Number of hard-disk errors.", +// }, +// []string{"device"}, +// ) // ) // // func init() { +// // Metrics have to be registered to be exposed: // prometheus.MustRegister(cpuTemp) // prometheus.MustRegister(hdFailures) // } // // func main() { // cpuTemp.Set(65.3) -// hdFailures.Inc() +// hdFailures.With(prometheus.Labels{"device":"/dev/sda"}).Inc() // -// http.Handle("/metrics", prometheus.Handler()) -// http.ListenAndServe(":8080", nil) +// // The Handler function provides a default handler to expose metrics +// // via an HTTP server. "/metrics" is the usual endpoint for that. +// http.Handle("/metrics", promhttp.Handler()) +// log.Fatal(http.ListenAndServe(":8080", nil)) // } // // -// This is a complete program that exports two metrics, a Gauge and a Counter. -// It also exports some stats about the HTTP usage of the /metrics -// endpoint. (See the Handler function for more detail.) +// This is a complete program that exports two metrics, a Gauge and a Counter, +// the latter with a label attached to turn it into a (one-dimensional) vector. // -// Two more advanced metric types are the Summary and Histogram. +// Metrics // -// In addition to the fundamental metric types Gauge, Counter, Summary, and -// Histogram, a very important part of the Prometheus data model is the -// partitioning of samples along dimensions called labels, which results in +// The number of exported identifiers in this package might appear a bit +// overwhelming. Hovever, in addition to the basic plumbing shown in the example +// above, you only need to understand the different metric types and their +// vector versions for basic usage. +// +// Above, you have already touched the Counter and the Gauge. There are two more +// advanced metric types: the Summary and Histogram. A more thorough description +// of those four metric types can be found in the Prometheus docs: +// https://prometheus.io/docs/concepts/metric_types/ +// +// A fifth "type" of metric is Untyped. It behaves like a Gauge, but signals the +// Prometheus server not to assume anything about its type. +// +// In addition to the fundamental metric types Gauge, Counter, Summary, +// Histogram, and Untyped, a very important part of the Prometheus data model is +// the partitioning of samples along dimensions called labels, which results in // metric vectors. The fundamental types are GaugeVec, CounterVec, SummaryVec, -// and HistogramVec. +// HistogramVec, and UntypedVec. // -// Those are all the parts needed for basic usage. Detailed documentation and -// examples are provided below. +// While only the fundamental metric types implement the Metric interface, both +// the metrics and their vector versions implement the Collector interface. A +// Collector manages the collection of a number of Metrics, but for convenience, +// a Metric can also “collect itself”. Note that Gauge, Counter, Summary, +// Histogram, and Untyped are interfaces themselves while GaugeVec, CounterVec, +// SummaryVec, HistogramVec, and UntypedVec are not. // -// Everything else this package offers is essentially for "power users" only. A -// few pointers to "power user features": +// To create instances of Metrics and their vector versions, you need a suitable +// …Opts struct, i.e. GaugeOpts, CounterOpts, SummaryOpts, +// HistogramOpts, or UntypedOpts. // -// All the various ...Opts structs have a ConstLabels field for labels that -// never change their value (which is only useful under special circumstances, -// see documentation of the Opts type). +// Custom Collectors and constant Metrics // -// The Untyped metric behaves like a Gauge, but signals the Prometheus server -// not to assume anything about its type. +// While you could create your own implementations of Metric, most likely you +// will only ever implement the Collector interface on your own. At a first +// glance, a custom Collector seems handy to bundle Metrics for common +// registration (with the prime example of the different metric vectors above, +// which bundle all the metrics of the same name but with different labels). // -// Functions to fine-tune how the metric registry works: EnableCollectChecks, -// PanicOnCollectError, Register, Unregister, SetMetricFamilyInjectionHook. +// There is a more involved use case, too: If you already have metrics +// available, created outside of the Prometheus context, you don't need the +// interface of the various Metric types. You essentially want to mirror the +// existing numbers into Prometheus Metrics during collection. An own +// implementation of the Collector interface is perfect for that. You can create +// Metric instances “on the fly” using NewConstMetric, NewConstHistogram, and +// NewConstSummary (and their respective Must… versions). That will happen in +// the Collect method. The Describe method has to return separate Desc +// instances, representative of the “throw-away” metrics to be created +// later. NewDesc comes in handy to create those Desc instances. // -// For custom metric collection, there are two entry points: Custom Metric -// implementations and custom Collector implementations. A Metric is the -// fundamental unit in the Prometheus data model: a sample at a point in time -// together with its meta-data (like its fully-qualified name and any number of -// pairs of label name and label value) that knows how to marshal itself into a -// data transfer object (aka DTO, implemented as a protocol buffer). A Collector -// gets registered with the Prometheus registry and manages the collection of -// one or more Metrics. Many parts of this package are building blocks for -// Metrics and Collectors. Desc is the metric descriptor, actually used by all -// metrics under the hood, and by Collectors to describe the Metrics to be -// collected, but only to be dealt with by users if they implement their own -// Metrics or Collectors. To create a Desc, the BuildFQName function will come -// in handy. Other useful components for Metric and Collector implementation -// include: LabelPairSorter to sort the DTO version of label pairs, -// NewConstMetric and MustNewConstMetric to create "throw away" Metrics at -// collection time, MetricVec to bundle custom Metrics into a metric vector -// Collector, SelfCollector to make a custom Metric collect itself. +// The Collector example illustrates the use case. You can also look at the +// source code of the processCollector (mirroring process metrics), the +// goCollector (mirroring Go metrics), or the expvarCollector (mirroring expvar +// metrics) as examples that are used in this package itself. // -// A good example for a custom Collector is the ExpVarCollector included in this -// package, which exports variables exported via the "expvar" package as -// Prometheus metrics. +// If you just need to call a function to get a single float value to collect as +// a metric, GaugeFunc, CounterFunc, or UntypedFunc might be interesting +// shortcuts. +// +// Advanced Uses of the Registry +// +// While MustRegister is the by far most common way of registering a Collector, +// sometimes you might want to handle the errors the registration might +// cause. As suggested by the name, MustRegister panics if an error occurs. With +// the Register function, the error is returned and can be handled. +// +// An error is returned if the registered Collector is incompatible or +// inconsistent with already registered metrics. The registry aims for +// consistency of the collected metrics according to the Prometheus data +// model. Inconsistencies are ideally detected at registration time, not at +// collect time. The former will usually be detected at start-up time of a +// program, while the latter will only happen at scrape time, possibly not even +// on the first scrape if the inconsistency only becomes relevant later. That is +// the main reason why a Collector and a Metric have to describe themselves to +// the registry. +// +// So far, everything we did operated on the so-called default registry, as it +// can be found in the global DefaultRegistry variable. With NewRegistry, you +// can create a custom registry, or you can even implement the Registerer or +// Gatherer interfaces yourself. The methods Register and Unregister work in +// the same way on a custom registry as the global functions Register and +// Unregister on the default registry. +// +// There are a number of uses for custom registries: You can use registries +// with special properties, see NewPedanticRegistry. You can avoid global state, +// as it is imposed by the DefaultRegistry. You can use multiple registries at +// the same time to expose different metrics in different ways. You can use +// separate registries for testing purposes. +// +// Also note that the DefaultRegistry comes registered with a Collector for Go +// runtime metrics (via NewGoCollector) and a Collector for process metrics (via +// NewProcessCollector). With a custom registry, you are in control and decide +// yourself about the Collectors to register. +// +// HTTP Exposition +// +// The Registry implements the Gatherer interface. The caller of the Gather +// method can then expose the gathered metrics in some way. Usually, the metrics +// are served via HTTP on the /metrics endpoint. That's happening in the example +// above. The tools to expose metrics via HTTP are in the promhttp +// sub-package. (The top-level functions in the prometheus package are +// deprecated.) +// +// Pushing to the Pushgateway +// +// Function for pushing to the Pushgateway can be found in the push sub-package. +// +// Other Means of Exposition +// +// More ways of exposing metrics can easily be added. Sending metrics to +// Graphite would be an example that will soon be implemented. package prometheus diff --git a/vendor/github.com/prometheus/client_golang/prometheus/expvar.go b/vendor/github.com/prometheus/client_golang/prometheus/expvar_collector.go similarity index 81% rename from vendor/github.com/prometheus/client_golang/prometheus/expvar.go rename to vendor/github.com/prometheus/client_golang/prometheus/expvar_collector.go index 0f7630d53..18a99d5fa 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/expvar.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/expvar_collector.go @@ -18,21 +18,21 @@ import ( "expvar" ) -// ExpvarCollector collects metrics from the expvar interface. It provides a -// quick way to expose numeric values that are already exported via expvar as -// Prometheus metrics. Note that the data models of expvar and Prometheus are -// fundamentally different, and that the ExpvarCollector is inherently -// slow. Thus, the ExpvarCollector is probably great for experiments and -// prototying, but you should seriously consider a more direct implementation of -// Prometheus metrics for monitoring production systems. -// -// Use NewExpvarCollector to create new instances. -type ExpvarCollector struct { +type expvarCollector struct { exports map[string]*Desc } -// NewExpvarCollector returns a newly allocated ExpvarCollector that still has -// to be registered with the Prometheus registry. +// NewExpvarCollector returns a newly allocated expvar Collector that still has +// to be registered with a Prometheus registry. +// +// An expvar Collector collects metrics from the expvar interface. It provides a +// quick way to expose numeric values that are already exported via expvar as +// Prometheus metrics. Note that the data models of expvar and Prometheus are +// fundamentally different, and that the expvar Collector is inherently slower +// than native Prometheus metrics. Thus, the expvar Collector is probably great +// for experiments and prototying, but you should seriously consider a more +// direct implementation of Prometheus metrics for monitoring production +// systems. // // The exports map has the following meaning: // @@ -59,21 +59,21 @@ type ExpvarCollector struct { // sample values. // // Anything that does not fit into the scheme above is silently ignored. -func NewExpvarCollector(exports map[string]*Desc) *ExpvarCollector { - return &ExpvarCollector{ +func NewExpvarCollector(exports map[string]*Desc) Collector { + return &expvarCollector{ exports: exports, } } // Describe implements Collector. -func (e *ExpvarCollector) Describe(ch chan<- *Desc) { +func (e *expvarCollector) Describe(ch chan<- *Desc) { for _, desc := range e.exports { ch <- desc } } // Collect implements Collector. -func (e *ExpvarCollector) Collect(ch chan<- Metric) { +func (e *expvarCollector) Collect(ch chan<- Metric) { for name, desc := range e.exports { var m Metric expVar := expvar.Get(name) diff --git a/vendor/github.com/prometheus/client_golang/prometheus/fnv.go b/vendor/github.com/prometheus/client_golang/prometheus/fnv.go new file mode 100644 index 000000000..e3b67df8a --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/fnv.go @@ -0,0 +1,29 @@ +package prometheus + +// Inline and byte-free variant of hash/fnv's fnv64a. + +const ( + offset64 = 14695981039346656037 + prime64 = 1099511628211 +) + +// hashNew initializies a new fnv64a hash value. +func hashNew() uint64 { + return offset64 +} + +// hashAdd adds a string to a fnv64a hash value, returning the updated hash. +func hashAdd(h uint64, s string) uint64 { + for i := 0; i < len(s); i++ { + h ^= uint64(s[i]) + h *= prime64 + } + return h +} + +// hashAddByte adds a byte to a fnv64a hash value, returning the updated hash. +func hashAddByte(h uint64, b byte) uint64 { + h ^= uint64(b) + h *= prime64 + return h +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/gauge.go b/vendor/github.com/prometheus/client_golang/prometheus/gauge.go index ba8a402ca..9ab5a3d62 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/gauge.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/gauge.go @@ -13,8 +13,6 @@ package prometheus -import "hash/fnv" - // Gauge is a Metric that represents a single numerical value that can // arbitrarily go up and down. // @@ -29,16 +27,21 @@ type Gauge interface { // Set sets the Gauge to an arbitrary value. Set(float64) - // Inc increments the Gauge by 1. + // Inc increments the Gauge by 1. Use Add to increment it by arbitrary + // values. Inc() - // Dec decrements the Gauge by 1. + // Dec decrements the Gauge by 1. Use Sub to decrement it by arbitrary + // values. Dec() - // Add adds the given value to the Gauge. (The value can be - // negative, resulting in a decrease of the Gauge.) + // Add adds the given value to the Gauge. (The value can be negative, + // resulting in a decrease of the Gauge.) Add(float64) // Sub subtracts the given value from the Gauge. (The value can be // negative, resulting in an increase of the Gauge.) Sub(float64) + + // SetToCurrentTime sets the Gauge to the current Unix time in seconds. + SetToCurrentTime() } // GaugeOpts is an alias for Opts. See there for doc comments. @@ -60,7 +63,7 @@ func NewGauge(opts GaugeOpts) Gauge { // (e.g. number of operations queued, partitioned by user and operation // type). Create instances with NewGaugeVec. type GaugeVec struct { - MetricVec + *MetricVec } // NewGaugeVec creates a new GaugeVec based on the provided GaugeOpts and @@ -74,14 +77,9 @@ func NewGaugeVec(opts GaugeOpts, labelNames []string) *GaugeVec { opts.ConstLabels, ) return &GaugeVec{ - MetricVec: MetricVec{ - children: map[uint64]Metric{}, - desc: desc, - hash: fnv.New64a(), - newMetric: func(lvs ...string) Metric { - return newValue(desc, GaugeValue, 0, lvs...) - }, - }, + MetricVec: newMetricVec(desc, func(lvs ...string) Metric { + return newValue(desc, GaugeValue, 0, lvs...) + }), } } diff --git a/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go b/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go index 8be247695..6dea674c0 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go @@ -17,7 +17,7 @@ type goCollector struct { // NewGoCollector returns a collector which exports metrics about the current // go process. -func NewGoCollector() *goCollector { +func NewGoCollector() Collector { return &goCollector{ goroutines: NewGauge(GaugeOpts{ Namespace: "go", @@ -48,7 +48,7 @@ func NewGoCollector() *goCollector { }, { desc: NewDesc( memstatNamespace("sys_bytes"), - "Number of bytes obtained by system. Sum of all system allocations.", + "Number of bytes obtained from system.", nil, nil, ), eval: func(ms *runtime.MemStats) float64 { return float64(ms.Sys) }, @@ -111,12 +111,12 @@ func NewGoCollector() *goCollector { valType: GaugeValue, }, { desc: NewDesc( - memstatNamespace("heap_released_bytes_total"), - "Total number of heap bytes released to OS.", + memstatNamespace("heap_released_bytes"), + "Number of heap bytes released to OS.", nil, nil, ), eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapReleased) }, - valType: CounterValue, + valType: GaugeValue, }, { desc: NewDesc( memstatNamespace("heap_objects"), @@ -211,7 +211,7 @@ func NewGoCollector() *goCollector { "Number of seconds since 1970 of last garbage collection.", nil, nil, ), - eval: func(ms *runtime.MemStats) float64 { return float64(ms.LastGC*10 ^ 9) }, + eval: func(ms *runtime.MemStats) float64 { return float64(ms.LastGC) / 1e9 }, valType: GaugeValue, }, }, diff --git a/vendor/github.com/prometheus/client_golang/prometheus/histogram.go b/vendor/github.com/prometheus/client_golang/prometheus/histogram.go index f98a41bc8..9719e8fac 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/histogram.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/histogram.go @@ -15,7 +15,6 @@ package prometheus import ( "fmt" - "hash/fnv" "math" "sort" "sync/atomic" @@ -52,11 +51,11 @@ type Histogram interface { // bucket of a histogram ("le" -> "less or equal"). const bucketLabel = "le" +// DefBuckets are the default Histogram buckets. The default buckets are +// tailored to broadly measure the response time (in seconds) of a network +// service. Most likely, however, you will be required to define buckets +// customized to your use case. var ( - // DefBuckets are the default Histogram buckets. The default buckets are - // tailored to broadly measure the response time (in seconds) of a - // network service. Most likely, however, you will be required to define - // buckets customized to your use case. DefBuckets = []float64{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10} errBucketLabelNotAllowed = fmt.Errorf( @@ -211,7 +210,7 @@ func newHistogram(desc *Desc, opts HistogramOpts, labelValues ...string) Histogr // Finally we know the final length of h.upperBounds and can make counts. h.counts = make([]uint64, len(h.upperBounds)) - h.Init(h) // Init self-collection. + h.init(h) // Init self-collection. return h } @@ -223,7 +222,7 @@ type histogram struct { sumBits uint64 count uint64 - SelfCollector + selfCollector // Note that there is no mutex required. desc *Desc @@ -288,7 +287,7 @@ func (h *histogram) Write(out *dto.Metric) error { // (e.g. HTTP request latencies, partitioned by status code and method). Create // instances with NewHistogramVec. type HistogramVec struct { - MetricVec + *MetricVec } // NewHistogramVec creates a new HistogramVec based on the provided HistogramOpts and @@ -302,14 +301,9 @@ func NewHistogramVec(opts HistogramOpts, labelNames []string) *HistogramVec { opts.ConstLabels, ) return &HistogramVec{ - MetricVec: MetricVec{ - children: map[uint64]Metric{}, - desc: desc, - hash: fnv.New64a(), - newMetric: func(lvs ...string) Metric { - return newHistogram(desc, opts, lvs...) - }, - }, + MetricVec: newMetricVec(desc, func(lvs ...string) Metric { + return newHistogram(desc, opts, lvs...) + }), } } diff --git a/vendor/github.com/prometheus/client_golang/prometheus/http.go b/vendor/github.com/prometheus/client_golang/prometheus/http.go index eabe60246..a39727730 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/http.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/http.go @@ -15,14 +15,114 @@ package prometheus import ( "bufio" + "bytes" + "compress/gzip" + "fmt" "io" "net" "net/http" "strconv" "strings" + "sync" "time" + + "github.com/prometheus/common/expfmt" ) +// TODO(beorn7): Remove this whole file. It is a partial mirror of +// promhttp/http.go (to avoid circular import chains) where everything HTTP +// related should live. The functions here are just for avoiding +// breakage. Everything is deprecated. + +const ( + contentTypeHeader = "Content-Type" + contentLengthHeader = "Content-Length" + contentEncodingHeader = "Content-Encoding" + acceptEncodingHeader = "Accept-Encoding" +) + +var bufPool sync.Pool + +func getBuf() *bytes.Buffer { + buf := bufPool.Get() + if buf == nil { + return &bytes.Buffer{} + } + return buf.(*bytes.Buffer) +} + +func giveBuf(buf *bytes.Buffer) { + buf.Reset() + bufPool.Put(buf) +} + +// Handler returns an HTTP handler for the DefaultGatherer. It is +// already instrumented with InstrumentHandler (using "prometheus" as handler +// name). +// +// Deprecated: Please note the issues described in the doc comment of +// InstrumentHandler. You might want to consider using promhttp.Handler instead +// (which is not instrumented). +func Handler() http.Handler { + return InstrumentHandler("prometheus", UninstrumentedHandler()) +} + +// UninstrumentedHandler returns an HTTP handler for the DefaultGatherer. +// +// Deprecated: Use promhttp.Handler instead. See there for further documentation. +func UninstrumentedHandler() http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + mfs, err := DefaultGatherer.Gather() + if err != nil { + http.Error(w, "An error has occurred during metrics collection:\n\n"+err.Error(), http.StatusInternalServerError) + return + } + + contentType := expfmt.Negotiate(req.Header) + buf := getBuf() + defer giveBuf(buf) + writer, encoding := decorateWriter(req, buf) + enc := expfmt.NewEncoder(writer, contentType) + var lastErr error + for _, mf := range mfs { + if err := enc.Encode(mf); err != nil { + lastErr = err + http.Error(w, "An error has occurred during metrics encoding:\n\n"+err.Error(), http.StatusInternalServerError) + return + } + } + if closer, ok := writer.(io.Closer); ok { + closer.Close() + } + if lastErr != nil && buf.Len() == 0 { + http.Error(w, "No metrics encoded, last error:\n\n"+err.Error(), http.StatusInternalServerError) + return + } + header := w.Header() + header.Set(contentTypeHeader, string(contentType)) + header.Set(contentLengthHeader, fmt.Sprint(buf.Len())) + if encoding != "" { + header.Set(contentEncodingHeader, encoding) + } + w.Write(buf.Bytes()) + }) +} + +// decorateWriter wraps a writer to handle gzip compression if requested. It +// returns the decorated writer and the appropriate "Content-Encoding" header +// (which is empty if no compression is enabled). +func decorateWriter(request *http.Request, writer io.Writer) (io.Writer, string) { + header := request.Header.Get(acceptEncodingHeader) + parts := strings.Split(header, ",") + for _, part := range parts { + part := strings.TrimSpace(part) + if part == "gzip" || strings.HasPrefix(part, "gzip;") { + return gzip.NewWriter(writer), "gzip" + } + } + return writer, "" +} + var instLabels = []string{"method", "code"} type nower interface { @@ -57,29 +157,52 @@ func nowSeries(t ...time.Time) nower { // has a constant label named "handler" with the provided handlerName as // value. http_requests_total is a metric vector partitioned by HTTP method // (label name "method") and HTTP status code (label name "code"). +// +// Deprecated: InstrumentHandler has several issues: +// +// - It uses Summaries rather than Histograms. Summaries are not useful if +// aggregation across multiple instances is required. +// +// - It uses microseconds as unit, which is deprecated and should be replaced by +// seconds. +// +// - The size of the request is calculated in a separate goroutine. Since this +// calculator requires access to the request header, it creates a race with +// any writes to the header performed during request handling. +// httputil.ReverseProxy is a prominent example for a handler +// performing such writes. +// +// Upcoming versions of this package will provide ways of instrumenting HTTP +// handlers that are more flexible and have fewer issues. Please prefer direct +// instrumentation in the meantime. func InstrumentHandler(handlerName string, handler http.Handler) http.HandlerFunc { return InstrumentHandlerFunc(handlerName, handler.ServeHTTP) } // InstrumentHandlerFunc wraps the given function for instrumentation. It -// otherwise works in the same way as InstrumentHandler. +// otherwise works in the same way as InstrumentHandler (and shares the same +// issues). +// +// Deprecated: InstrumentHandlerFunc is deprecated for the same reasons as +// InstrumentHandler is. func InstrumentHandlerFunc(handlerName string, handlerFunc func(http.ResponseWriter, *http.Request)) http.HandlerFunc { return InstrumentHandlerFuncWithOpts( SummaryOpts{ Subsystem: "http", ConstLabels: Labels{"handler": handlerName}, + Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001}, }, handlerFunc, ) } -// InstrumentHandlerWithOpts works like InstrumentHandler but provides more -// flexibility (at the cost of a more complex call syntax). As -// InstrumentHandler, this function registers four metric collectors, but it -// uses the provided SummaryOpts to create them. However, the fields "Name" and -// "Help" in the SummaryOpts are ignored. "Name" is replaced by -// "requests_total", "request_duration_microseconds", "request_size_bytes", and -// "response_size_bytes", respectively. "Help" is replaced by an appropriate +// InstrumentHandlerWithOpts works like InstrumentHandler (and shares the same +// issues) but provides more flexibility (at the cost of a more complex call +// syntax). As InstrumentHandler, this function registers four metric +// collectors, but it uses the provided SummaryOpts to create them. However, the +// fields "Name" and "Help" in the SummaryOpts are ignored. "Name" is replaced +// by "requests_total", "request_duration_microseconds", "request_size_bytes", +// and "response_size_bytes", respectively. "Help" is replaced by an appropriate // help string. The names of the variable labels of the http_requests_total // CounterVec are "method" (get, post, etc.), and "code" (HTTP status code). // @@ -98,13 +221,20 @@ func InstrumentHandlerFunc(handlerName string, handlerFunc func(http.ResponseWri // cannot use SummaryOpts. Instead, a CounterOpts struct is created internally, // and all its fields are set to the equally named fields in the provided // SummaryOpts. +// +// Deprecated: InstrumentHandlerWithOpts is deprecated for the same reasons as +// InstrumentHandler is. func InstrumentHandlerWithOpts(opts SummaryOpts, handler http.Handler) http.HandlerFunc { return InstrumentHandlerFuncWithOpts(opts, handler.ServeHTTP) } -// InstrumentHandlerFuncWithOpts works like InstrumentHandlerFunc but provides -// more flexibility (at the cost of a more complex call syntax). See -// InstrumentHandlerWithOpts for details how the provided SummaryOpts are used. +// InstrumentHandlerFuncWithOpts works like InstrumentHandlerFunc (and shares +// the same issues) but provides more flexibility (at the cost of a more complex +// call syntax). See InstrumentHandlerWithOpts for details how the provided +// SummaryOpts are used. +// +// Deprecated: InstrumentHandlerFuncWithOpts is deprecated for the same reasons +// as InstrumentHandler is. func InstrumentHandlerFuncWithOpts(opts SummaryOpts, handlerFunc func(http.ResponseWriter, *http.Request)) http.HandlerFunc { reqCnt := NewCounterVec( CounterOpts{ @@ -116,34 +246,52 @@ func InstrumentHandlerFuncWithOpts(opts SummaryOpts, handlerFunc func(http.Respo }, instLabels, ) + if err := Register(reqCnt); err != nil { + if are, ok := err.(AlreadyRegisteredError); ok { + reqCnt = are.ExistingCollector.(*CounterVec) + } else { + panic(err) + } + } opts.Name = "request_duration_microseconds" opts.Help = "The HTTP request latencies in microseconds." reqDur := NewSummary(opts) + if err := Register(reqDur); err != nil { + if are, ok := err.(AlreadyRegisteredError); ok { + reqDur = are.ExistingCollector.(Summary) + } else { + panic(err) + } + } opts.Name = "request_size_bytes" opts.Help = "The HTTP request sizes in bytes." reqSz := NewSummary(opts) + if err := Register(reqSz); err != nil { + if are, ok := err.(AlreadyRegisteredError); ok { + reqSz = are.ExistingCollector.(Summary) + } else { + panic(err) + } + } opts.Name = "response_size_bytes" opts.Help = "The HTTP response sizes in bytes." resSz := NewSummary(opts) - - regReqCnt := MustRegisterOrGet(reqCnt).(*CounterVec) - regReqDur := MustRegisterOrGet(reqDur).(Summary) - regReqSz := MustRegisterOrGet(reqSz).(Summary) - regResSz := MustRegisterOrGet(resSz).(Summary) + if err := Register(resSz); err != nil { + if are, ok := err.(AlreadyRegisteredError); ok { + resSz = are.ExistingCollector.(Summary) + } else { + panic(err) + } + } return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { now := time.Now() delegate := &responseWriterDelegator{ResponseWriter: w} - out := make(chan int) - urlLen := 0 - if r.URL != nil { - urlLen = len(r.URL.String()) - } - go computeApproximateRequestSize(r, out, urlLen) + out := computeApproximateRequestSize(r) _, cn := w.(http.CloseNotifier) _, fl := w.(http.Flusher) @@ -161,30 +309,44 @@ func InstrumentHandlerFuncWithOpts(opts SummaryOpts, handlerFunc func(http.Respo method := sanitizeMethod(r.Method) code := sanitizeCode(delegate.status) - regReqCnt.WithLabelValues(method, code).Inc() - regReqDur.Observe(elapsed) - regResSz.Observe(float64(delegate.written)) - regReqSz.Observe(float64(<-out)) + reqCnt.WithLabelValues(method, code).Inc() + reqDur.Observe(elapsed) + resSz.Observe(float64(delegate.written)) + reqSz.Observe(float64(<-out)) }) } -func computeApproximateRequestSize(r *http.Request, out chan int, s int) { - s += len(r.Method) - s += len(r.Proto) - for name, values := range r.Header { - s += len(name) - for _, value := range values { - s += len(value) +func computeApproximateRequestSize(r *http.Request) <-chan int { + // Get URL length in current go routine for avoiding a race condition. + // HandlerFunc that runs in parallel may modify the URL. + s := 0 + if r.URL != nil { + s += len(r.URL.String()) + } + + out := make(chan int, 1) + + go func() { + s += len(r.Method) + s += len(r.Proto) + for name, values := range r.Header { + s += len(name) + for _, value := range values { + s += len(value) + } } - } - s += len(r.Host) + s += len(r.Host) - // N.B. r.Form and r.MultipartForm are assumed to be included in r.URL. + // N.B. r.Form and r.MultipartForm are assumed to be included in r.URL. - if r.ContentLength != -1 { - s += int(r.ContentLength) - } - out <- s + if r.ContentLength != -1 { + s += int(r.ContentLength) + } + out <- s + close(out) + }() + + return out } type responseWriterDelegator struct { diff --git a/vendor/github.com/prometheus/client_golang/prometheus/metric.go b/vendor/github.com/prometheus/client_golang/prometheus/metric.go index 86fd81c10..d4063d98f 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/metric.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/metric.go @@ -22,10 +22,8 @@ import ( const separatorByte byte = 255 // A Metric models a single sample value with its meta data being exported to -// Prometheus. Implementers of Metric in this package inclued Gauge, Counter, -// Untyped, and Summary. Users can implement their own Metric types, but that -// should be rarely needed. See the example for SelfCollector, which is also an -// example for a user-implemented Metric. +// Prometheus. Implementations of Metric in this package are Gauge, Counter, +// Histogram, Summary, and Untyped. type Metric interface { // Desc returns the descriptor for the Metric. This method idempotently // returns the same descriptor throughout the lifetime of the @@ -36,21 +34,23 @@ type Metric interface { // Write encodes the Metric into a "Metric" Protocol Buffer data // transmission object. // - // Implementers of custom Metric types must observe concurrency safety - // as reads of this metric may occur at any time, and any blocking - // occurs at the expense of total performance of rendering all - // registered metrics. Ideally Metric implementations should support - // concurrent readers. + // Metric implementations must observe concurrency safety as reads of + // this metric may occur at any time, and any blocking occurs at the + // expense of total performance of rendering all registered + // metrics. Ideally, Metric implementations should support concurrent + // readers. // - // The Prometheus client library attempts to minimize memory allocations - // and will provide a pre-existing reset dto.Metric pointer. Prometheus - // may recycle the dto.Metric proto message, so Metric implementations - // should just populate the provided dto.Metric and then should not keep - // any reference to it. - // - // While populating dto.Metric, labels must be sorted lexicographically. - // (Implementers may find LabelPairSorter useful for that.) + // While populating dto.Metric, it is the responsibility of the + // implementation to ensure validity of the Metric protobuf (like valid + // UTF-8 strings or syntactically valid metric and label names). It is + // recommended to sort labels lexicographically. (Implementers may find + // LabelPairSorter useful for that.) Callers of Write should still make + // sure of sorting if they depend on it. Write(*dto.Metric) error + // TODO(beorn7): The original rationale of passing in a pre-allocated + // dto.Metric protobuf to save allocations has disappeared. The + // signature of this method should be changed to "Write() (*dto.Metric, + // error)". } // Opts bundles the options for creating most Metric types. Each metric diff --git a/vendor/github.com/prometheus/client_golang/prometheus/process_collector.go b/vendor/github.com/prometheus/client_golang/prometheus/process_collector.go index d8cf0eda3..94b2553e1 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/process_collector.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/process_collector.go @@ -19,16 +19,16 @@ type processCollector struct { pid int collectFn func(chan<- Metric) pidFn func() (int, error) - cpuTotal Counter - openFDs, maxFDs Gauge - vsize, rss Gauge - startTime Gauge + cpuTotal *Desc + openFDs, maxFDs *Desc + vsize, rss *Desc + startTime *Desc } // NewProcessCollector returns a collector which exports the current state of // process metrics including cpu, memory and file descriptor usage as well as // the process start time for the given process id under the given namespace. -func NewProcessCollector(pid int, namespace string) *processCollector { +func NewProcessCollector(pid int, namespace string) Collector { return NewProcessCollectorPIDFn( func() (int, error) { return pid, nil }, namespace, @@ -43,41 +43,46 @@ func NewProcessCollector(pid int, namespace string) *processCollector { func NewProcessCollectorPIDFn( pidFn func() (int, error), namespace string, -) *processCollector { +) Collector { + ns := "" + if len(namespace) > 0 { + ns = namespace + "_" + } + c := processCollector{ pidFn: pidFn, collectFn: func(chan<- Metric) {}, - cpuTotal: NewCounter(CounterOpts{ - Namespace: namespace, - Name: "process_cpu_seconds_total", - Help: "Total user and system CPU time spent in seconds.", - }), - openFDs: NewGauge(GaugeOpts{ - Namespace: namespace, - Name: "process_open_fds", - Help: "Number of open file descriptors.", - }), - maxFDs: NewGauge(GaugeOpts{ - Namespace: namespace, - Name: "process_max_fds", - Help: "Maximum number of open file descriptors.", - }), - vsize: NewGauge(GaugeOpts{ - Namespace: namespace, - Name: "process_virtual_memory_bytes", - Help: "Virtual memory size in bytes.", - }), - rss: NewGauge(GaugeOpts{ - Namespace: namespace, - Name: "process_resident_memory_bytes", - Help: "Resident memory size in bytes.", - }), - startTime: NewGauge(GaugeOpts{ - Namespace: namespace, - Name: "process_start_time_seconds", - Help: "Start time of the process since unix epoch in seconds.", - }), + cpuTotal: NewDesc( + ns+"process_cpu_seconds_total", + "Total user and system CPU time spent in seconds.", + nil, nil, + ), + openFDs: NewDesc( + ns+"process_open_fds", + "Number of open file descriptors.", + nil, nil, + ), + maxFDs: NewDesc( + ns+"process_max_fds", + "Maximum number of open file descriptors.", + nil, nil, + ), + vsize: NewDesc( + ns+"process_virtual_memory_bytes", + "Virtual memory size in bytes.", + nil, nil, + ), + rss: NewDesc( + ns+"process_resident_memory_bytes", + "Resident memory size in bytes.", + nil, nil, + ), + startTime: NewDesc( + ns+"process_start_time_seconds", + "Start time of the process since unix epoch in seconds.", + nil, nil, + ), } // Set up process metric collection if supported by the runtime. @@ -90,12 +95,12 @@ func NewProcessCollectorPIDFn( // Describe returns all descriptions of the collector. func (c *processCollector) Describe(ch chan<- *Desc) { - ch <- c.cpuTotal.Desc() - ch <- c.openFDs.Desc() - ch <- c.maxFDs.Desc() - ch <- c.vsize.Desc() - ch <- c.rss.Desc() - ch <- c.startTime.Desc() + ch <- c.cpuTotal + ch <- c.openFDs + ch <- c.maxFDs + ch <- c.vsize + ch <- c.rss + ch <- c.startTime } // Collect returns the current state of all metrics of the collector. @@ -117,26 +122,19 @@ func (c *processCollector) processCollect(ch chan<- Metric) { } if stat, err := p.NewStat(); err == nil { - c.cpuTotal.Set(stat.CPUTime()) - ch <- c.cpuTotal - c.vsize.Set(float64(stat.VirtualMemory())) - ch <- c.vsize - c.rss.Set(float64(stat.ResidentMemory())) - ch <- c.rss - + ch <- MustNewConstMetric(c.cpuTotal, CounterValue, stat.CPUTime()) + ch <- MustNewConstMetric(c.vsize, GaugeValue, float64(stat.VirtualMemory())) + ch <- MustNewConstMetric(c.rss, GaugeValue, float64(stat.ResidentMemory())) if startTime, err := stat.StartTime(); err == nil { - c.startTime.Set(startTime) - ch <- c.startTime + ch <- MustNewConstMetric(c.startTime, GaugeValue, startTime) } } if fds, err := p.FileDescriptorsLen(); err == nil { - c.openFDs.Set(float64(fds)) - ch <- c.openFDs + ch <- MustNewConstMetric(c.openFDs, GaugeValue, float64(fds)) } if limits, err := p.NewLimits(); err == nil { - c.maxFDs.Set(float64(limits.OpenFiles)) - ch <- c.maxFDs + ch <- MustNewConstMetric(c.maxFDs, GaugeValue, float64(limits.OpenFiles)) } } diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go new file mode 100644 index 000000000..b6dd5a266 --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go @@ -0,0 +1,201 @@ +// Copyright 2016 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Copyright (c) 2013, The Prometheus Authors +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be found +// in the LICENSE file. + +// Package promhttp contains functions to create http.Handler instances to +// expose Prometheus metrics via HTTP. In later versions of this package, it +// will also contain tooling to instrument instances of http.Handler and +// http.RoundTripper. +// +// promhttp.Handler acts on the prometheus.DefaultGatherer. With HandlerFor, +// you can create a handler for a custom registry or anything that implements +// the Gatherer interface. It also allows to create handlers that act +// differently on errors or allow to log errors. +package promhttp + +import ( + "bytes" + "compress/gzip" + "fmt" + "io" + "net/http" + "strings" + "sync" + + "github.com/prometheus/common/expfmt" + + "github.com/prometheus/client_golang/prometheus" +) + +const ( + contentTypeHeader = "Content-Type" + contentLengthHeader = "Content-Length" + contentEncodingHeader = "Content-Encoding" + acceptEncodingHeader = "Accept-Encoding" +) + +var bufPool sync.Pool + +func getBuf() *bytes.Buffer { + buf := bufPool.Get() + if buf == nil { + return &bytes.Buffer{} + } + return buf.(*bytes.Buffer) +} + +func giveBuf(buf *bytes.Buffer) { + buf.Reset() + bufPool.Put(buf) +} + +// Handler returns an HTTP handler for the prometheus.DefaultGatherer. The +// Handler uses the default HandlerOpts, i.e. report the first error as an HTTP +// error, no error logging, and compression if requested by the client. +// +// If you want to create a Handler for the DefaultGatherer with different +// HandlerOpts, create it with HandlerFor with prometheus.DefaultGatherer and +// your desired HandlerOpts. +func Handler() http.Handler { + return HandlerFor(prometheus.DefaultGatherer, HandlerOpts{}) +} + +// HandlerFor returns an http.Handler for the provided Gatherer. The behavior +// of the Handler is defined by the provided HandlerOpts. +func HandlerFor(reg prometheus.Gatherer, opts HandlerOpts) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + mfs, err := reg.Gather() + if err != nil { + if opts.ErrorLog != nil { + opts.ErrorLog.Println("error gathering metrics:", err) + } + switch opts.ErrorHandling { + case PanicOnError: + panic(err) + case ContinueOnError: + if len(mfs) == 0 { + http.Error(w, "No metrics gathered, last error:\n\n"+err.Error(), http.StatusInternalServerError) + return + } + case HTTPErrorOnError: + http.Error(w, "An error has occurred during metrics gathering:\n\n"+err.Error(), http.StatusInternalServerError) + return + } + } + + contentType := expfmt.Negotiate(req.Header) + buf := getBuf() + defer giveBuf(buf) + writer, encoding := decorateWriter(req, buf, opts.DisableCompression) + enc := expfmt.NewEncoder(writer, contentType) + var lastErr error + for _, mf := range mfs { + if err := enc.Encode(mf); err != nil { + lastErr = err + if opts.ErrorLog != nil { + opts.ErrorLog.Println("error encoding metric family:", err) + } + switch opts.ErrorHandling { + case PanicOnError: + panic(err) + case ContinueOnError: + // Handled later. + case HTTPErrorOnError: + http.Error(w, "An error has occurred during metrics encoding:\n\n"+err.Error(), http.StatusInternalServerError) + return + } + } + } + if closer, ok := writer.(io.Closer); ok { + closer.Close() + } + if lastErr != nil && buf.Len() == 0 { + http.Error(w, "No metrics encoded, last error:\n\n"+err.Error(), http.StatusInternalServerError) + return + } + header := w.Header() + header.Set(contentTypeHeader, string(contentType)) + header.Set(contentLengthHeader, fmt.Sprint(buf.Len())) + if encoding != "" { + header.Set(contentEncodingHeader, encoding) + } + w.Write(buf.Bytes()) + // TODO(beorn7): Consider streaming serving of metrics. + }) +} + +// HandlerErrorHandling defines how a Handler serving metrics will handle +// errors. +type HandlerErrorHandling int + +// These constants cause handlers serving metrics to behave as described if +// errors are encountered. +const ( + // Serve an HTTP status code 500 upon the first error + // encountered. Report the error message in the body. + HTTPErrorOnError HandlerErrorHandling = iota + // Ignore errors and try to serve as many metrics as possible. However, + // if no metrics can be served, serve an HTTP status code 500 and the + // last error message in the body. Only use this in deliberate "best + // effort" metrics collection scenarios. It is recommended to at least + // log errors (by providing an ErrorLog in HandlerOpts) to not mask + // errors completely. + ContinueOnError + // Panic upon the first error encountered (useful for "crash only" apps). + PanicOnError +) + +// Logger is the minimal interface HandlerOpts needs for logging. Note that +// log.Logger from the standard library implements this interface, and it is +// easy to implement by custom loggers, if they don't do so already anyway. +type Logger interface { + Println(v ...interface{}) +} + +// HandlerOpts specifies options how to serve metrics via an http.Handler. The +// zero value of HandlerOpts is a reasonable default. +type HandlerOpts struct { + // ErrorLog specifies an optional logger for errors collecting and + // serving metrics. If nil, errors are not logged at all. + ErrorLog Logger + // ErrorHandling defines how errors are handled. Note that errors are + // logged regardless of the configured ErrorHandling provided ErrorLog + // is not nil. + ErrorHandling HandlerErrorHandling + // If DisableCompression is true, the handler will never compress the + // response, even if requested by the client. + DisableCompression bool +} + +// decorateWriter wraps a writer to handle gzip compression if requested. It +// returns the decorated writer and the appropriate "Content-Encoding" header +// (which is empty if no compression is enabled). +func decorateWriter(request *http.Request, writer io.Writer, compressionDisabled bool) (io.Writer, string) { + if compressionDisabled { + return writer, "" + } + header := request.Header.Get(acceptEncodingHeader) + parts := strings.Split(header, ",") + for _, part := range parts { + part := strings.TrimSpace(part) + if part == "gzip" || strings.HasPrefix(part, "gzip;") { + return gzip.NewWriter(writer), "gzip" + } + } + return writer, "" +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/push.go b/vendor/github.com/prometheus/client_golang/prometheus/push.go deleted file mode 100644 index 1c33848a3..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/push.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2015 The Prometheus Authors -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Copyright (c) 2013, The Prometheus Authors -// All rights reserved. -// -// Use of this source code is governed by a BSD-style license that can be found -// in the LICENSE file. - -package prometheus - -// Push triggers a metric collection by the default registry and pushes all -// collected metrics to the Pushgateway specified by addr. See the Pushgateway -// documentation for detailed implications of the job and instance -// parameter. instance can be left empty. You can use just host:port or ip:port -// as url, in which case 'http://' is added automatically. You can also include -// the schema in the URL. However, do not include the '/metrics/jobs/...' part. -// -// Note that all previously pushed metrics with the same job and instance will -// be replaced with the metrics pushed by this call. (It uses HTTP method 'PUT' -// to push to the Pushgateway.) -func Push(job, instance, url string) error { - return defRegistry.Push(job, instance, url, "PUT") -} - -// PushAdd works like Push, but only previously pushed metrics with the same -// name (and the same job and instance) will be replaced. (It uses HTTP method -// 'POST' to push to the Pushgateway.) -func PushAdd(job, instance, url string) error { - return defRegistry.Push(job, instance, url, "POST") -} - -// PushCollectors works like Push, but it does not collect from the default -// registry. Instead, it collects from the provided collectors. It is a -// convenient way to push only a few metrics. -func PushCollectors(job, instance, url string, collectors ...Collector) error { - return pushCollectors(job, instance, url, "PUT", collectors...) -} - -// PushAddCollectors works like PushAdd, but it does not collect from the -// default registry. Instead, it collects from the provided collectors. It is a -// convenient way to push only a few metrics. -func PushAddCollectors(job, instance, url string, collectors ...Collector) error { - return pushCollectors(job, instance, url, "POST", collectors...) -} - -func pushCollectors(job, instance, url, method string, collectors ...Collector) error { - r := newRegistry() - for _, collector := range collectors { - if _, err := r.Register(collector); err != nil { - return err - } - } - return r.Push(job, instance, url, method) -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/registry.go b/vendor/github.com/prometheus/client_golang/prometheus/registry.go index 5970aaeeb..78d5f193c 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/registry.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/registry.go @@ -11,220 +11,236 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Copyright (c) 2013, The Prometheus Authors -// All rights reserved. -// -// Use of this source code is governed by a BSD-style license that can be found -// in the LICENSE file. - package prometheus import ( "bytes" - "compress/gzip" "errors" "fmt" - "hash/fnv" - "io" - "net/http" - "net/url" "os" "sort" - "strings" "sync" "github.com/golang/protobuf/proto" - "github.com/prometheus/common/expfmt" dto "github.com/prometheus/client_model/go" ) -var ( - defRegistry = newDefaultRegistry() - errAlreadyReg = errors.New("duplicate metrics collector registration attempted") -) - -// Constants relevant to the HTTP interface. const ( - // APIVersion is the version of the format of the exported data. This - // will match this library's version, which subscribes to the Semantic - // Versioning scheme. - APIVersion = "0.0.4" - - // DelimitedTelemetryContentType is the content type set on telemetry - // data responses in delimited protobuf format. - DelimitedTelemetryContentType = `application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited` - // TextTelemetryContentType is the content type set on telemetry data - // responses in text format. - TextTelemetryContentType = `text/plain; version=` + APIVersion - // ProtoTextTelemetryContentType is the content type set on telemetry - // data responses in protobuf text format. (Only used for debugging.) - ProtoTextTelemetryContentType = `application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=text` - // ProtoCompactTextTelemetryContentType is the content type set on - // telemetry data responses in protobuf compact text format. (Only used - // for debugging.) - ProtoCompactTextTelemetryContentType = `application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=compact-text` - - // Constants for object pools. - numBufs = 4 - numMetricFamilies = 1000 - numMetrics = 10000 - // Capacity for the channel to collect metrics and descriptors. capMetricChan = 1000 capDescChan = 10 - - contentTypeHeader = "Content-Type" - contentLengthHeader = "Content-Length" - contentEncodingHeader = "Content-Encoding" - - acceptEncodingHeader = "Accept-Encoding" - acceptHeader = "Accept" ) -// Handler returns the HTTP handler for the global Prometheus registry. It is -// already instrumented with InstrumentHandler (using "prometheus" as handler -// name). Usually the handler is used to handle the "/metrics" endpoint. -func Handler() http.Handler { - return InstrumentHandler("prometheus", defRegistry) +// DefaultRegisterer and DefaultGatherer are the implementations of the +// Registerer and Gatherer interface a number of convenience functions in this +// package act on. Initially, both variables point to the same Registry, which +// has a process collector (see NewProcessCollector) and a Go collector (see +// NewGoCollector) already registered. This approach to keep default instances +// as global state mirrors the approach of other packages in the Go standard +// library. Note that there are caveats. Change the variables with caution and +// only if you understand the consequences. Users who want to avoid global state +// altogether should not use the convenience function and act on custom +// instances instead. +var ( + defaultRegistry = NewRegistry() + DefaultRegisterer Registerer = defaultRegistry + DefaultGatherer Gatherer = defaultRegistry +) + +func init() { + MustRegister(NewProcessCollector(os.Getpid(), "")) + MustRegister(NewGoCollector()) } -// UninstrumentedHandler works in the same way as Handler, but the returned HTTP -// handler is not instrumented. This is useful if no instrumentation is desired -// (for whatever reason) or if the instrumentation has to happen with a -// different handler name (or with a different instrumentation approach -// altogether). See the InstrumentHandler example. -func UninstrumentedHandler() http.Handler { - return defRegistry -} - -// Register registers a new Collector to be included in metrics collection. It -// returns an error if the descriptors provided by the Collector are invalid or -// if they - in combination with descriptors of already registered Collectors - -// do not fulfill the consistency and uniqueness criteria described in the Desc -// documentation. -// -// Do not register the same Collector multiple times concurrently. (Registering -// the same Collector twice would result in an error anyway, but on top of that, -// it is not safe to do so concurrently.) -func Register(m Collector) error { - _, err := defRegistry.Register(m) - return err -} - -// MustRegister works like Register but panics where Register would have -// returned an error. -func MustRegister(m Collector) { - err := Register(m) - if err != nil { - panic(err) +// NewRegistry creates a new vanilla Registry without any Collectors +// pre-registered. +func NewRegistry() *Registry { + return &Registry{ + collectorsByID: map[uint64]Collector{}, + descIDs: map[uint64]struct{}{}, + dimHashesByName: map[string]uint64{}, } } -// RegisterOrGet works like Register but does not return an error if a Collector -// is registered that equals a previously registered Collector. (Two Collectors -// are considered equal if their Describe method yields the same set of -// descriptors.) Instead, the previously registered Collector is returned (which -// is helpful if the new and previously registered Collectors are equal but not -// identical, i.e. not pointers to the same object). +// NewPedanticRegistry returns a registry that checks during collection if each +// collected Metric is consistent with its reported Desc, and if the Desc has +// actually been registered with the registry. // -// As for Register, it is still not safe to call RegisterOrGet with the same -// Collector multiple times concurrently. -func RegisterOrGet(m Collector) (Collector, error) { - return defRegistry.RegisterOrGet(m) +// Usually, a Registry will be happy as long as the union of all collected +// Metrics is consistent and valid even if some metrics are not consistent with +// their own Desc or a Desc provided by their registered Collector. Well-behaved +// Collectors and Metrics will only provide consistent Descs. This Registry is +// useful to test the implementation of Collectors and Metrics. +func NewPedanticRegistry() *Registry { + r := NewRegistry() + r.pedanticChecksEnabled = true + return r } -// MustRegisterOrGet works like Register but panics where RegisterOrGet would -// have returned an error. -func MustRegisterOrGet(m Collector) Collector { - existing, err := RegisterOrGet(m) - if err != nil { - panic(err) - } - return existing +// Registerer is the interface for the part of a registry in charge of +// registering and unregistering. Users of custom registries should use +// Registerer as type for registration purposes (rather then the Registry type +// directly). In that way, they are free to use custom Registerer implementation +// (e.g. for testing purposes). +type Registerer interface { + // Register registers a new Collector to be included in metrics + // collection. It returns an error if the descriptors provided by the + // Collector are invalid or if they — in combination with descriptors of + // already registered Collectors — do not fulfill the consistency and + // uniqueness criteria described in the documentation of metric.Desc. + // + // If the provided Collector is equal to a Collector already registered + // (which includes the case of re-registering the same Collector), the + // returned error is an instance of AlreadyRegisteredError, which + // contains the previously registered Collector. + // + // It is in general not safe to register the same Collector multiple + // times concurrently. + Register(Collector) error + // MustRegister works like Register but registers any number of + // Collectors and panics upon the first registration that causes an + // error. + MustRegister(...Collector) + // Unregister unregisters the Collector that equals the Collector passed + // in as an argument. (Two Collectors are considered equal if their + // Describe method yields the same set of descriptors.) The function + // returns whether a Collector was unregistered. + // + // Note that even after unregistering, it will not be possible to + // register a new Collector that is inconsistent with the unregistered + // Collector, e.g. a Collector collecting metrics with the same name but + // a different help string. The rationale here is that the same registry + // instance must only collect consistent metrics throughout its + // lifetime. + Unregister(Collector) bool } -// Unregister unregisters the Collector that equals the Collector passed in as -// an argument. (Two Collectors are considered equal if their Describe method -// yields the same set of descriptors.) The function returns whether a Collector -// was unregistered. +// Gatherer is the interface for the part of a registry in charge of gathering +// the collected metrics into a number of MetricFamilies. The Gatherer interface +// comes with the same general implication as described for the Registerer +// interface. +type Gatherer interface { + // Gather calls the Collect method of the registered Collectors and then + // gathers the collected metrics into a lexicographically sorted slice + // of MetricFamily protobufs. Even if an error occurs, Gather attempts + // to gather as many metrics as possible. Hence, if a non-nil error is + // returned, the returned MetricFamily slice could be nil (in case of a + // fatal error that prevented any meaningful metric collection) or + // contain a number of MetricFamily protobufs, some of which might be + // incomplete, and some might be missing altogether. The returned error + // (which might be a MultiError) explains the details. In scenarios + // where complete collection is critical, the returned MetricFamily + // protobufs should be disregarded if the returned error is non-nil. + Gather() ([]*dto.MetricFamily, error) +} + +// Register registers the provided Collector with the DefaultRegisterer. +// +// Register is a shortcut for DefaultRegisterer.Register(c). See there for more +// details. +func Register(c Collector) error { + return DefaultRegisterer.Register(c) +} + +// MustRegister registers the provided Collectors with the DefaultRegisterer and +// panics if any error occurs. +// +// MustRegister is a shortcut for DefaultRegisterer.MustRegister(cs...). See +// there for more details. +func MustRegister(cs ...Collector) { + DefaultRegisterer.MustRegister(cs...) +} + +// Unregister removes the registration of the provided Collector from the +// DefaultRegisterer. +// +// Unregister is a shortcut for DefaultRegisterer.Unregister(c). See there for +// more details. func Unregister(c Collector) bool { - return defRegistry.Unregister(c) + return DefaultRegisterer.Unregister(c) } -// SetMetricFamilyInjectionHook sets a function that is called whenever metrics -// are collected. The hook function must be set before metrics collection begins -// (i.e. call SetMetricFamilyInjectionHook before setting the HTTP handler.) The -// MetricFamily protobufs returned by the hook function are merged with the -// metrics collected in the usual way. -// -// This is a way to directly inject MetricFamily protobufs managed and owned by -// the caller. The caller has full responsibility. As no registration of the -// injected metrics has happened, there is no descriptor to check against, and -// there are no registration-time checks. If collect-time checks are disabled -// (see function EnableCollectChecks), no sanity checks are performed on the -// returned protobufs at all. If collect-checks are enabled, type and uniqueness -// checks are performed, but no further consistency checks (which would require -// knowledge of a metric descriptor). -// -// Sorting concerns: The caller is responsible for sorting the label pairs in -// each metric. However, the order of metrics will be sorted by the registry as -// it is required anyway after merging with the metric families collected -// conventionally. -// -// The function must be callable at any time and concurrently. -func SetMetricFamilyInjectionHook(hook func() []*dto.MetricFamily) { - defRegistry.metricFamilyInjectionHook = hook +// GathererFunc turns a function into a Gatherer. +type GathererFunc func() ([]*dto.MetricFamily, error) + +// Gather implements Gatherer. +func (gf GathererFunc) Gather() ([]*dto.MetricFamily, error) { + return gf() } -// PanicOnCollectError sets the behavior whether a panic is caused upon an error -// while metrics are collected and served to the HTTP endpoint. By default, an -// internal server error (status code 500) is served with an error message. -func PanicOnCollectError(b bool) { - defRegistry.panicOnCollectError = b +// AlreadyRegisteredError is returned by the Register method if the Collector to +// be registered has already been registered before, or a different Collector +// that collects the same metrics has been registered before. Registration fails +// in that case, but you can detect from the kind of error what has +// happened. The error contains fields for the existing Collector and the +// (rejected) new Collector that equals the existing one. This can be used to +// find out if an equal Collector has been registered before and switch over to +// using the old one, as demonstrated in the example. +type AlreadyRegisteredError struct { + ExistingCollector, NewCollector Collector } -// EnableCollectChecks enables (or disables) additional consistency checks -// during metrics collection. These additional checks are not enabled by default -// because they inflict a performance penalty and the errors they check for can -// only happen if the used Metric and Collector types have internal programming -// errors. It can be helpful to enable these checks while working with custom -// Collectors or Metrics whose correctness is not well established yet. -func EnableCollectChecks(b bool) { - defRegistry.collectChecksEnabled = b +func (err AlreadyRegisteredError) Error() string { + return "duplicate metrics collector registration attempted" } -// encoder is a function that writes a dto.MetricFamily to an io.Writer in a -// certain encoding. It returns the number of bytes written and any error -// encountered. Note that pbutil.WriteDelimited and pbutil.MetricFamilyToText -// are encoders. -type encoder func(io.Writer, *dto.MetricFamily) (int, error) +// MultiError is a slice of errors implementing the error interface. It is used +// by a Gatherer to report multiple errors during MetricFamily gathering. +type MultiError []error -type registry struct { - mtx sync.RWMutex - collectorsByID map[uint64]Collector // ID is a hash of the descIDs. - descIDs map[uint64]struct{} - dimHashesByName map[string]uint64 - bufPool chan *bytes.Buffer - metricFamilyPool chan *dto.MetricFamily - metricPool chan *dto.Metric - metricFamilyInjectionHook func() []*dto.MetricFamily - - panicOnCollectError, collectChecksEnabled bool +func (errs MultiError) Error() string { + if len(errs) == 0 { + return "" + } + buf := &bytes.Buffer{} + fmt.Fprintf(buf, "%d error(s) occurred:", len(errs)) + for _, err := range errs { + fmt.Fprintf(buf, "\n* %s", err) + } + return buf.String() } -func (r *registry) Register(c Collector) (Collector, error) { - descChan := make(chan *Desc, capDescChan) +// MaybeUnwrap returns nil if len(errs) is 0. It returns the first and only +// contained error as error if len(errs is 1). In all other cases, it returns +// the MultiError directly. This is helpful for returning a MultiError in a way +// that only uses the MultiError if needed. +func (errs MultiError) MaybeUnwrap() error { + switch len(errs) { + case 0: + return nil + case 1: + return errs[0] + default: + return errs + } +} + +// Registry registers Prometheus collectors, collects their metrics, and gathers +// them into MetricFamilies for exposition. It implements both Registerer and +// Gatherer. The zero value is not usable. Create instances with NewRegistry or +// NewPedanticRegistry. +type Registry struct { + mtx sync.RWMutex + collectorsByID map[uint64]Collector // ID is a hash of the descIDs. + descIDs map[uint64]struct{} + dimHashesByName map[string]uint64 + pedanticChecksEnabled bool +} + +// Register implements Registerer. +func (r *Registry) Register(c Collector) error { + var ( + descChan = make(chan *Desc, capDescChan) + newDescIDs = map[uint64]struct{}{} + newDimHashesByName = map[string]uint64{} + collectorID uint64 // Just a sum of all desc IDs. + duplicateDescErr error + ) go func() { c.Describe(descChan) close(descChan) }() - - newDescIDs := map[uint64]struct{}{} - newDimHashesByName := map[string]uint64{} - var collectorID uint64 // Just a sum of all desc IDs. - var duplicateDescErr error - r.mtx.Lock() defer r.mtx.Unlock() // Coduct various tests... @@ -232,7 +248,7 @@ func (r *registry) Register(c Collector) (Collector, error) { // Is the descriptor valid at all? if desc.err != nil { - return c, fmt.Errorf("descriptor %s is invalid: %s", desc, desc.err) + return fmt.Errorf("descriptor %s is invalid: %s", desc, desc.err) } // Is the descID unique? @@ -253,13 +269,13 @@ func (r *registry) Register(c Collector) (Collector, error) { // First check existing descriptors... if dimHash, exists := r.dimHashesByName[desc.fqName]; exists { if dimHash != desc.dimHash { - return nil, fmt.Errorf("a previously registered descriptor with the same fully-qualified name as %s has different label names or a different help string", desc) + return fmt.Errorf("a previously registered descriptor with the same fully-qualified name as %s has different label names or a different help string", desc) } } else { // ...then check the new descriptors already seen. if dimHash, exists := newDimHashesByName[desc.fqName]; exists { if dimHash != desc.dimHash { - return nil, fmt.Errorf("descriptors reported by collector have inconsistent label names or help strings for the same fully-qualified name, offender is %s", desc) + return fmt.Errorf("descriptors reported by collector have inconsistent label names or help strings for the same fully-qualified name, offender is %s", desc) } } else { newDimHashesByName[desc.fqName] = desc.dimHash @@ -268,15 +284,18 @@ func (r *registry) Register(c Collector) (Collector, error) { } // Did anything happen at all? if len(newDescIDs) == 0 { - return nil, errors.New("collector has no descriptors") + return errors.New("collector has no descriptors") } if existing, exists := r.collectorsByID[collectorID]; exists { - return existing, errAlreadyReg + return AlreadyRegisteredError{ + ExistingCollector: existing, + NewCollector: c, + } } // If the collectorID is new, but at least one of the descs existed // before, we are in trouble. if duplicateDescErr != nil { - return nil, duplicateDescErr + return duplicateDescErr } // Only after all tests have passed, actually register. @@ -287,26 +306,20 @@ func (r *registry) Register(c Collector) (Collector, error) { for name, dimHash := range newDimHashesByName { r.dimHashesByName[name] = dimHash } - return c, nil + return nil } -func (r *registry) RegisterOrGet(m Collector) (Collector, error) { - existing, err := r.Register(m) - if err != nil && err != errAlreadyReg { - return nil, err - } - return existing, nil -} - -func (r *registry) Unregister(c Collector) bool { - descChan := make(chan *Desc, capDescChan) +// Unregister implements Registerer. +func (r *Registry) Unregister(c Collector) bool { + var ( + descChan = make(chan *Desc, capDescChan) + descIDs = map[uint64]struct{}{} + collectorID uint64 // Just a sum of the desc IDs. + ) go func() { c.Describe(descChan) close(descChan) }() - - descIDs := map[uint64]struct{}{} - var collectorID uint64 // Just a sum of the desc IDs. for desc := range descChan { if _, exists := descIDs[desc.id]; !exists { collectorID += desc.id @@ -333,69 +346,25 @@ func (r *registry) Unregister(c Collector) bool { return true } -func (r *registry) Push(job, instance, pushURL, method string) error { - if !strings.Contains(pushURL, "://") { - pushURL = "http://" + pushURL - } - pushURL = fmt.Sprintf("%s/metrics/jobs/%s", pushURL, url.QueryEscape(job)) - if instance != "" { - pushURL += "/instances/" + url.QueryEscape(instance) - } - buf := r.getBuf() - defer r.giveBuf(buf) - if err := r.writePB(expfmt.NewEncoder(buf, expfmt.FmtProtoDelim)); err != nil { - if r.panicOnCollectError { +// MustRegister implements Registerer. +func (r *Registry) MustRegister(cs ...Collector) { + for _, c := range cs { + if err := r.Register(c); err != nil { panic(err) } - return err } - req, err := http.NewRequest(method, pushURL, buf) - if err != nil { - return err - } - req.Header.Set(contentTypeHeader, DelimitedTelemetryContentType) - resp, err := http.DefaultClient.Do(req) - if err != nil { - return err - } - defer resp.Body.Close() - if resp.StatusCode != 202 { - return fmt.Errorf("unexpected status code %d while pushing to %s", resp.StatusCode, pushURL) - } - return nil } -func (r *registry) ServeHTTP(w http.ResponseWriter, req *http.Request) { - contentType := expfmt.Negotiate(req.Header) - buf := r.getBuf() - defer r.giveBuf(buf) - writer, encoding := decorateWriter(req, buf) - if err := r.writePB(expfmt.NewEncoder(writer, contentType)); err != nil { - if r.panicOnCollectError { - panic(err) - } - http.Error(w, "An error has occurred:\n\n"+err.Error(), http.StatusInternalServerError) - return - } - if closer, ok := writer.(io.Closer); ok { - closer.Close() - } - header := w.Header() - header.Set(contentTypeHeader, string(contentType)) - header.Set(contentLengthHeader, fmt.Sprint(buf.Len())) - if encoding != "" { - header.Set(contentEncodingHeader, encoding) - } - w.Write(buf.Bytes()) -} - -func (r *registry) writePB(encoder expfmt.Encoder) error { - var metricHashes map[uint64]struct{} - if r.collectChecksEnabled { - metricHashes = make(map[uint64]struct{}) - } - metricChan := make(chan Metric, capMetricChan) - wg := sync.WaitGroup{} +// Gather implements Gatherer. +func (r *Registry) Gather() ([]*dto.MetricFamily, error) { + var ( + metricChan = make(chan Metric, capMetricChan) + metricHashes = map[uint64]struct{}{} + dimHashes = map[string]uint64{} + wg sync.WaitGroup + errs MultiError // The collected errors to return in the end. + registeredDescIDs map[uint64]struct{} // Only used for pedantic checks + ) r.mtx.RLock() metricFamiliesByName := make(map[string]*dto.MetricFamily, len(r.dimHashesByName)) @@ -413,11 +382,21 @@ func (r *registry) writePB(encoder expfmt.Encoder) error { collector.Collect(metricChan) }(collector) } + + // In case pedantic checks are enabled, we have to copy the map before + // giving up the RLock. + if r.pedanticChecksEnabled { + registeredDescIDs = make(map[uint64]struct{}, len(r.descIDs)) + for id := range r.descIDs { + registeredDescIDs[id] = struct{}{} + } + } + r.mtx.RUnlock() // Drain metricChan in case of premature return. defer func() { - for _ = range metricChan { + for range metricChan { } }() @@ -427,94 +406,267 @@ func (r *registry) writePB(encoder expfmt.Encoder) error { // of metricFamiliesByName (and of metricHashes if checks are // enabled). Most likely not worth it. desc := metric.Desc() + dtoMetric := &dto.Metric{} + if err := metric.Write(dtoMetric); err != nil { + errs = append(errs, fmt.Errorf( + "error collecting metric %v: %s", desc, err, + )) + continue + } metricFamily, ok := metricFamiliesByName[desc.fqName] - if !ok { - metricFamily = r.getMetricFamily() - defer r.giveMetricFamily(metricFamily) + if ok { + if metricFamily.GetHelp() != desc.help { + errs = append(errs, fmt.Errorf( + "collected metric %s %s has help %q but should have %q", + desc.fqName, dtoMetric, desc.help, metricFamily.GetHelp(), + )) + continue + } + // TODO(beorn7): Simplify switch once Desc has type. + switch metricFamily.GetType() { + case dto.MetricType_COUNTER: + if dtoMetric.Counter == nil { + errs = append(errs, fmt.Errorf( + "collected metric %s %s should be a Counter", + desc.fqName, dtoMetric, + )) + continue + } + case dto.MetricType_GAUGE: + if dtoMetric.Gauge == nil { + errs = append(errs, fmt.Errorf( + "collected metric %s %s should be a Gauge", + desc.fqName, dtoMetric, + )) + continue + } + case dto.MetricType_SUMMARY: + if dtoMetric.Summary == nil { + errs = append(errs, fmt.Errorf( + "collected metric %s %s should be a Summary", + desc.fqName, dtoMetric, + )) + continue + } + case dto.MetricType_UNTYPED: + if dtoMetric.Untyped == nil { + errs = append(errs, fmt.Errorf( + "collected metric %s %s should be Untyped", + desc.fqName, dtoMetric, + )) + continue + } + case dto.MetricType_HISTOGRAM: + if dtoMetric.Histogram == nil { + errs = append(errs, fmt.Errorf( + "collected metric %s %s should be a Histogram", + desc.fqName, dtoMetric, + )) + continue + } + default: + panic("encountered MetricFamily with invalid type") + } + } else { + metricFamily = &dto.MetricFamily{} metricFamily.Name = proto.String(desc.fqName) metricFamily.Help = proto.String(desc.help) + // TODO(beorn7): Simplify switch once Desc has type. + switch { + case dtoMetric.Gauge != nil: + metricFamily.Type = dto.MetricType_GAUGE.Enum() + case dtoMetric.Counter != nil: + metricFamily.Type = dto.MetricType_COUNTER.Enum() + case dtoMetric.Summary != nil: + metricFamily.Type = dto.MetricType_SUMMARY.Enum() + case dtoMetric.Untyped != nil: + metricFamily.Type = dto.MetricType_UNTYPED.Enum() + case dtoMetric.Histogram != nil: + metricFamily.Type = dto.MetricType_HISTOGRAM.Enum() + default: + errs = append(errs, fmt.Errorf( + "empty metric collected: %s", dtoMetric, + )) + continue + } metricFamiliesByName[desc.fqName] = metricFamily } - dtoMetric := r.getMetric() - defer r.giveMetric(dtoMetric) - if err := metric.Write(dtoMetric); err != nil { - // TODO: Consider different means of error reporting so - // that a single erroneous metric could be skipped - // instead of blowing up the whole collection. - return fmt.Errorf("error collecting metric %v: %s", desc, err) + if err := checkMetricConsistency(metricFamily, dtoMetric, metricHashes, dimHashes); err != nil { + errs = append(errs, err) + continue } - switch { - case metricFamily.Type != nil: - // Type already set. We are good. - case dtoMetric.Gauge != nil: - metricFamily.Type = dto.MetricType_GAUGE.Enum() - case dtoMetric.Counter != nil: - metricFamily.Type = dto.MetricType_COUNTER.Enum() - case dtoMetric.Summary != nil: - metricFamily.Type = dto.MetricType_SUMMARY.Enum() - case dtoMetric.Untyped != nil: - metricFamily.Type = dto.MetricType_UNTYPED.Enum() - case dtoMetric.Histogram != nil: - metricFamily.Type = dto.MetricType_HISTOGRAM.Enum() - default: - return fmt.Errorf("empty metric collected: %s", dtoMetric) - } - if r.collectChecksEnabled { - if err := r.checkConsistency(metricFamily, dtoMetric, desc, metricHashes); err != nil { - return err + if r.pedanticChecksEnabled { + // Is the desc registered at all? + if _, exist := registeredDescIDs[desc.id]; !exist { + errs = append(errs, fmt.Errorf( + "collected metric %s %s with unregistered descriptor %s", + metricFamily.GetName(), dtoMetric, desc, + )) + continue + } + if err := checkDescConsistency(metricFamily, dtoMetric, desc); err != nil { + errs = append(errs, err) + continue } } metricFamily.Metric = append(metricFamily.Metric, dtoMetric) } + return normalizeMetricFamilies(metricFamiliesByName), errs.MaybeUnwrap() +} - if r.metricFamilyInjectionHook != nil { - for _, mf := range r.metricFamilyInjectionHook() { - existingMF, exists := metricFamiliesByName[mf.GetName()] - if !exists { - metricFamiliesByName[mf.GetName()] = mf - if r.collectChecksEnabled { - for _, m := range mf.Metric { - if err := r.checkConsistency(mf, m, nil, metricHashes); err != nil { - return err - } - } +// Gatherers is a slice of Gatherer instances that implements the Gatherer +// interface itself. Its Gather method calls Gather on all Gatherers in the +// slice in order and returns the merged results. Errors returned from the +// Gather calles are all returned in a flattened MultiError. Duplicate and +// inconsistent Metrics are skipped (first occurrence in slice order wins) and +// reported in the returned error. +// +// Gatherers can be used to merge the Gather results from multiple +// Registries. It also provides a way to directly inject existing MetricFamily +// protobufs into the gathering by creating a custom Gatherer with a Gather +// method that simply returns the existing MetricFamily protobufs. Note that no +// registration is involved (in contrast to Collector registration), so +// obviously registration-time checks cannot happen. Any inconsistencies between +// the gathered MetricFamilies are reported as errors by the Gather method, and +// inconsistent Metrics are dropped. Invalid parts of the MetricFamilies +// (e.g. syntactically invalid metric or label names) will go undetected. +type Gatherers []Gatherer + +// Gather implements Gatherer. +func (gs Gatherers) Gather() ([]*dto.MetricFamily, error) { + var ( + metricFamiliesByName = map[string]*dto.MetricFamily{} + metricHashes = map[uint64]struct{}{} + dimHashes = map[string]uint64{} + errs MultiError // The collected errors to return in the end. + ) + + for i, g := range gs { + mfs, err := g.Gather() + if err != nil { + if multiErr, ok := err.(MultiError); ok { + for _, err := range multiErr { + errs = append(errs, fmt.Errorf("[from Gatherer #%d] %s", i+1, err)) } - continue + } else { + errs = append(errs, fmt.Errorf("[from Gatherer #%d] %s", i+1, err)) + } + } + for _, mf := range mfs { + existingMF, exists := metricFamiliesByName[mf.GetName()] + if exists { + if existingMF.GetHelp() != mf.GetHelp() { + errs = append(errs, fmt.Errorf( + "gathered metric family %s has help %q but should have %q", + mf.GetName(), mf.GetHelp(), existingMF.GetHelp(), + )) + continue + } + if existingMF.GetType() != mf.GetType() { + errs = append(errs, fmt.Errorf( + "gathered metric family %s has type %s but should have %s", + mf.GetName(), mf.GetType(), existingMF.GetType(), + )) + continue + } + } else { + existingMF = &dto.MetricFamily{} + existingMF.Name = mf.Name + existingMF.Help = mf.Help + existingMF.Type = mf.Type + metricFamiliesByName[mf.GetName()] = existingMF } for _, m := range mf.Metric { - if r.collectChecksEnabled { - if err := r.checkConsistency(existingMF, m, nil, metricHashes); err != nil { - return err - } + if err := checkMetricConsistency(existingMF, m, metricHashes, dimHashes); err != nil { + errs = append(errs, err) + continue } existingMF.Metric = append(existingMF.Metric, m) } } } + return normalizeMetricFamilies(metricFamiliesByName), errs.MaybeUnwrap() +} - // Now that MetricFamilies are all set, sort their Metrics - // lexicographically by their label values. +// metricSorter is a sortable slice of *dto.Metric. +type metricSorter []*dto.Metric + +func (s metricSorter) Len() int { + return len(s) +} + +func (s metricSorter) Swap(i, j int) { + s[i], s[j] = s[j], s[i] +} + +func (s metricSorter) Less(i, j int) bool { + if len(s[i].Label) != len(s[j].Label) { + // This should not happen. The metrics are + // inconsistent. However, we have to deal with the fact, as + // people might use custom collectors or metric family injection + // to create inconsistent metrics. So let's simply compare the + // number of labels in this case. That will still yield + // reproducible sorting. + return len(s[i].Label) < len(s[j].Label) + } + for n, lp := range s[i].Label { + vi := lp.GetValue() + vj := s[j].Label[n].GetValue() + if vi != vj { + return vi < vj + } + } + + // We should never arrive here. Multiple metrics with the same + // label set in the same scrape will lead to undefined ingestion + // behavior. However, as above, we have to provide stable sorting + // here, even for inconsistent metrics. So sort equal metrics + // by their timestamp, with missing timestamps (implying "now") + // coming last. + if s[i].TimestampMs == nil { + return false + } + if s[j].TimestampMs == nil { + return true + } + return s[i].GetTimestampMs() < s[j].GetTimestampMs() +} + +// normalizeMetricFamilies returns a MetricFamily slice with empty +// MetricFamilies pruned and the remaining MetricFamilies sorted by name within +// the slice, with the contained Metrics sorted within each MetricFamily. +func normalizeMetricFamilies(metricFamiliesByName map[string]*dto.MetricFamily) []*dto.MetricFamily { for _, mf := range metricFamiliesByName { sort.Sort(metricSorter(mf.Metric)) } - - // Write out MetricFamilies sorted by their name. names := make([]string, 0, len(metricFamiliesByName)) - for name := range metricFamiliesByName { - names = append(names, name) - } - sort.Strings(names) - - for _, name := range names { - if err := encoder.Encode(metricFamiliesByName[name]); err != nil { - return err + for name, mf := range metricFamiliesByName { + if len(mf.Metric) > 0 { + names = append(names, name) } } - return nil + sort.Strings(names) + result := make([]*dto.MetricFamily, 0, len(names)) + for _, name := range names { + result = append(result, metricFamiliesByName[name]) + } + return result } -func (r *registry) checkConsistency(metricFamily *dto.MetricFamily, dtoMetric *dto.Metric, desc *Desc, metricHashes map[uint64]struct{}) error { - +// checkMetricConsistency checks if the provided Metric is consistent with the +// provided MetricFamily. It also hashed the Metric labels and the MetricFamily +// name. If the resulting hash is alread in the provided metricHashes, an error +// is returned. If not, it is added to metricHashes. The provided dimHashes maps +// MetricFamily names to their dimHash (hashed sorted label names). If dimHashes +// doesn't yet contain a hash for the provided MetricFamily, it is +// added. Otherwise, an error is returned if the existing dimHashes in not equal +// the calculated dimHash. +func checkMetricConsistency( + metricFamily *dto.MetricFamily, + dtoMetric *dto.Metric, + metricHashes map[uint64]struct{}, + dimHashes map[string]uint64, +) error { // Type consistency with metric family. if metricFamily.GetType() == dto.MetricType_GAUGE && dtoMetric.Gauge == nil || metricFamily.GetType() == dto.MetricType_COUNTER && dtoMetric.Counter == nil || @@ -528,42 +680,45 @@ func (r *registry) checkConsistency(metricFamily *dto.MetricFamily, dtoMetric *d } // Is the metric unique (i.e. no other metric with the same name and the same label values)? - h := fnv.New64a() - var buf bytes.Buffer - buf.WriteString(metricFamily.GetName()) - buf.WriteByte(separatorByte) - h.Write(buf.Bytes()) + h := hashNew() + h = hashAdd(h, metricFamily.GetName()) + h = hashAddByte(h, separatorByte) + dh := hashNew() // Make sure label pairs are sorted. We depend on it for the consistency - // check. Label pairs must be sorted by contract. But the point of this - // method is to check for contract violations. So we better do the sort - // now. + // check. sort.Sort(LabelPairSorter(dtoMetric.Label)) for _, lp := range dtoMetric.Label { - buf.Reset() - buf.WriteString(lp.GetValue()) - buf.WriteByte(separatorByte) - h.Write(buf.Bytes()) + h = hashAdd(h, lp.GetValue()) + h = hashAddByte(h, separatorByte) + dh = hashAdd(dh, lp.GetName()) + dh = hashAddByte(dh, separatorByte) } - metricHash := h.Sum64() - if _, exists := metricHashes[metricHash]; exists { + if _, exists := metricHashes[h]; exists { return fmt.Errorf( "collected metric %s %s was collected before with the same name and label values", metricFamily.GetName(), dtoMetric, ) } - metricHashes[metricHash] = struct{}{} - - if desc == nil { - return nil // Nothing left to check if we have no desc. + if dimHash, ok := dimHashes[metricFamily.GetName()]; ok { + if dimHash != dh { + return fmt.Errorf( + "collected metric %s %s has label dimensions inconsistent with previously collected metrics in the same metric family", + metricFamily.GetName(), dtoMetric, + ) + } + } else { + dimHashes[metricFamily.GetName()] = dh } + metricHashes[h] = struct{}{} + return nil +} - // Desc consistency with metric family. - if metricFamily.GetName() != desc.fqName { - return fmt.Errorf( - "collected metric %s %s has name %q but should have %q", - metricFamily.GetName(), dtoMetric, metricFamily.GetName(), desc.fqName, - ) - } +func checkDescConsistency( + metricFamily *dto.MetricFamily, + dtoMetric *dto.Metric, + desc *Desc, +) error { + // Desc help consistency with metric family help. if metricFamily.GetHelp() != desc.help { return fmt.Errorf( "collected metric %s %s has help %q but should have %q", @@ -596,131 +751,5 @@ func (r *registry) checkConsistency(metricFamily *dto.MetricFamily, dtoMetric *d ) } } - - r.mtx.RLock() // Remaining checks need the read lock. - defer r.mtx.RUnlock() - - // Is the desc registered? - if _, exist := r.descIDs[desc.id]; !exist { - return fmt.Errorf( - "collected metric %s %s with unregistered descriptor %s", - metricFamily.GetName(), dtoMetric, desc, - ) - } - return nil } - -func (r *registry) getBuf() *bytes.Buffer { - select { - case buf := <-r.bufPool: - return buf - default: - return &bytes.Buffer{} - } -} - -func (r *registry) giveBuf(buf *bytes.Buffer) { - buf.Reset() - select { - case r.bufPool <- buf: - default: - } -} - -func (r *registry) getMetricFamily() *dto.MetricFamily { - select { - case mf := <-r.metricFamilyPool: - return mf - default: - return &dto.MetricFamily{} - } -} - -func (r *registry) giveMetricFamily(mf *dto.MetricFamily) { - mf.Reset() - select { - case r.metricFamilyPool <- mf: - default: - } -} - -func (r *registry) getMetric() *dto.Metric { - select { - case m := <-r.metricPool: - return m - default: - return &dto.Metric{} - } -} - -func (r *registry) giveMetric(m *dto.Metric) { - m.Reset() - select { - case r.metricPool <- m: - default: - } -} - -func newRegistry() *registry { - return ®istry{ - collectorsByID: map[uint64]Collector{}, - descIDs: map[uint64]struct{}{}, - dimHashesByName: map[string]uint64{}, - bufPool: make(chan *bytes.Buffer, numBufs), - metricFamilyPool: make(chan *dto.MetricFamily, numMetricFamilies), - metricPool: make(chan *dto.Metric, numMetrics), - } -} - -func newDefaultRegistry() *registry { - r := newRegistry() - r.Register(NewProcessCollector(os.Getpid(), "")) - r.Register(NewGoCollector()) - return r -} - -// decorateWriter wraps a writer to handle gzip compression if requested. It -// returns the decorated writer and the appropriate "Content-Encoding" header -// (which is empty if no compression is enabled). -func decorateWriter(request *http.Request, writer io.Writer) (io.Writer, string) { - header := request.Header.Get(acceptEncodingHeader) - parts := strings.Split(header, ",") - for _, part := range parts { - part := strings.TrimSpace(part) - if part == "gzip" || strings.HasPrefix(part, "gzip;") { - return gzip.NewWriter(writer), "gzip" - } - } - return writer, "" -} - -type metricSorter []*dto.Metric - -func (s metricSorter) Len() int { - return len(s) -} - -func (s metricSorter) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} - -func (s metricSorter) Less(i, j int) bool { - if len(s[i].Label) != len(s[j].Label) { - // This should not happen. The metrics are - // inconsistent. However, we have to deal with the fact, as - // people might use custom collectors or metric family injection - // to create inconsistent metrics. So let's simply compare the - // number of labels in this case. That will still yield - // reproducible sorting. - return len(s[i].Label) < len(s[j].Label) - } - for n, lp := range s[i].Label { - vi := lp.GetValue() - vj := s[j].Label[n].GetValue() - if vi != vj { - return vi < vj - } - } - return true -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/summary.go b/vendor/github.com/prometheus/client_golang/prometheus/summary.go index fe81e004f..82b885019 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/summary.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/summary.go @@ -15,7 +15,6 @@ package prometheus import ( "fmt" - "hash/fnv" "math" "sort" "sync" @@ -54,8 +53,11 @@ type Summary interface { Observe(float64) } +// DefObjectives are the default Summary quantile values. +// +// Deprecated: DefObjectives will not be used as the default objectives in +// v0.10 of the library. The default Summary will have no quantiles then. var ( - // DefObjectives are the default Summary quantile values. DefObjectives = map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001} errQuantileLabelNotAllowed = fmt.Errorf( @@ -114,9 +116,15 @@ type SummaryOpts struct { ConstLabels Labels // Objectives defines the quantile rank estimates with their respective - // absolute error. If Objectives[q] = e, then the value reported - // for q will be the φ-quantile value for some φ between q-e and q+e. - // The default value is DefObjectives. + // absolute error. If Objectives[q] = e, then the value reported for q + // will be the φ-quantile value for some φ between q-e and q+e. The + // default value is DefObjectives. It is used if Objectives is left at + // its zero value (i.e. nil). To create a Summary without Objectives, + // set it to an empty map (i.e. map[float64]float64{}). + // + // Deprecated: Note that the current value of DefObjectives is + // deprecated. It will be replaced by an empty map in v0.10 of the + // library. Please explicitly set Objectives to the desired value. Objectives map[float64]float64 // MaxAge defines the duration for which an observation stays relevant @@ -140,11 +148,11 @@ type SummaryOpts struct { BufCap uint32 } -// TODO: Great fuck-up with the sliding-window decay algorithm... The Merge -// method of perk/quantile is actually not working as advertised - and it might -// be unfixable, as the underlying algorithm is apparently not capable of -// merging summaries in the first place. To avoid using Merge, we are currently -// adding observations to _each_ age bucket, i.e. the effort to add a sample is +// Great fuck-up with the sliding-window decay algorithm... The Merge method of +// perk/quantile is actually not working as advertised - and it might be +// unfixable, as the underlying algorithm is apparently not capable of merging +// summaries in the first place. To avoid using Merge, we are currently adding +// observations to _each_ age bucket, i.e. the effort to add a sample is // essentially multiplied by the number of age buckets. When rotating age // buckets, we empty the previous head stream. On scrape time, we simply take // the quantiles from the head stream (no merging required). Result: More effort @@ -184,7 +192,7 @@ func newSummary(desc *Desc, opts SummaryOpts, labelValues ...string) Summary { } } - if len(opts.Objectives) == 0 { + if opts.Objectives == nil { opts.Objectives = DefObjectives } @@ -228,12 +236,12 @@ func newSummary(desc *Desc, opts SummaryOpts, labelValues ...string) Summary { } sort.Float64s(s.sortedObjectives) - s.Init(s) // Init self-collection. + s.init(s) // Init self-collection. return s } type summary struct { - SelfCollector + selfCollector bufMtx sync.Mutex // Protects hotBuf and hotBufExpTime. mtx sync.Mutex // Protects every other moving part. @@ -391,7 +399,7 @@ func (s quantSort) Less(i, j int) bool { // (e.g. HTTP request latencies, partitioned by status code and method). Create // instances with NewSummaryVec. type SummaryVec struct { - MetricVec + *MetricVec } // NewSummaryVec creates a new SummaryVec based on the provided SummaryOpts and @@ -405,14 +413,9 @@ func NewSummaryVec(opts SummaryOpts, labelNames []string) *SummaryVec { opts.ConstLabels, ) return &SummaryVec{ - MetricVec: MetricVec{ - children: map[uint64]Metric{}, - desc: desc, - hash: fnv.New64a(), - newMetric: func(lvs ...string) Metric { - return newSummary(desc, opts, lvs...) - }, - }, + MetricVec: newMetricVec(desc, func(lvs ...string) Metric { + return newSummary(desc, opts, lvs...) + }), } } diff --git a/vendor/github.com/prometheus/client_golang/prometheus/timer.go b/vendor/github.com/prometheus/client_golang/prometheus/timer.go new file mode 100644 index 000000000..f4cac5a0a --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/timer.go @@ -0,0 +1,74 @@ +// Copyright 2016 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package prometheus + +import "time" + +// Observer is the interface that wraps the Observe method, which is used by +// Histogram and Summary to add observations. +type Observer interface { + Observe(float64) +} + +// The ObserverFunc type is an adapter to allow the use of ordinary +// functions as Observers. If f is a function with the appropriate +// signature, ObserverFunc(f) is an Observer that calls f. +// +// This adapter is usually used in connection with the Timer type, and there are +// two general use cases: +// +// The most common one is to use a Gauge as the Observer for a Timer. +// See the "Gauge" Timer example. +// +// The more advanced use case is to create a function that dynamically decides +// which Observer to use for observing the duration. See the "Complex" Timer +// example. +type ObserverFunc func(float64) + +// Observe calls f(value). It implements Observer. +func (f ObserverFunc) Observe(value float64) { + f(value) +} + +// Timer is a helper type to time functions. Use NewTimer to create new +// instances. +type Timer struct { + begin time.Time + observer Observer +} + +// NewTimer creates a new Timer. The provided Observer is used to observe a +// duration in seconds. Timer is usually used to time a function call in the +// following way: +// func TimeMe() { +// timer := NewTimer(myHistogram) +// defer timer.ObserveDuration() +// // Do actual work. +// } +func NewTimer(o Observer) *Timer { + return &Timer{ + begin: time.Now(), + observer: o, + } +} + +// ObserveDuration records the duration passed since the Timer was created with +// NewTimer. It calls the Observe method of the Observer provided during +// construction with the duration in seconds as an argument. ObserveDuration is +// usually called with a defer statement. +func (t *Timer) ObserveDuration() { + if t.observer != nil { + t.observer.Observe(time.Since(t.begin).Seconds()) + } +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/untyped.go b/vendor/github.com/prometheus/client_golang/prometheus/untyped.go index c65ab1c53..065501d38 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/untyped.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/untyped.go @@ -13,8 +13,6 @@ package prometheus -import "hash/fnv" - // Untyped is a Metric that represents a single numerical value that can // arbitrarily go up and down. // @@ -22,6 +20,11 @@ import "hash/fnv" // no type information is implied. // // To create Untyped instances, use NewUntyped. +// +// Deprecated: The Untyped type is deprecated because it doesn't make sense in +// direct instrumentation. If you need to mirror an external metric of unknown +// type (usually while writing exporters), Use MustNewConstMetric to create an +// untyped metric instance on the fly. type Untyped interface { Metric Collector @@ -58,7 +61,7 @@ func NewUntyped(opts UntypedOpts) Untyped { // labels. This is used if you want to count the same thing partitioned by // various dimensions. Create instances with NewUntypedVec. type UntypedVec struct { - MetricVec + *MetricVec } // NewUntypedVec creates a new UntypedVec based on the provided UntypedOpts and @@ -72,14 +75,9 @@ func NewUntypedVec(opts UntypedOpts, labelNames []string) *UntypedVec { opts.ConstLabels, ) return &UntypedVec{ - MetricVec: MetricVec{ - children: map[uint64]Metric{}, - desc: desc, - hash: fnv.New64a(), - newMetric: func(lvs ...string) Metric { - return newValue(desc, UntypedValue, 0, lvs...) - }, - }, + MetricVec: newMetricVec(desc, func(lvs ...string) Metric { + return newValue(desc, UntypedValue, 0, lvs...) + }), } } diff --git a/vendor/github.com/prometheus/client_golang/prometheus/value.go b/vendor/github.com/prometheus/client_golang/prometheus/value.go index b54ac11e8..7d3e8109d 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/value.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/value.go @@ -19,6 +19,7 @@ import ( "math" "sort" "sync/atomic" + "time" dto "github.com/prometheus/client_model/go" @@ -48,7 +49,7 @@ type value struct { // operations. http://golang.org/pkg/sync/atomic/#pkg-note-BUG valBits uint64 - SelfCollector + selfCollector desc *Desc valType ValueType @@ -68,7 +69,7 @@ func newValue(desc *Desc, valueType ValueType, val float64, labelValues ...strin valBits: math.Float64bits(val), labelPairs: makeLabelPairs(desc, labelValues), } - result.Init(result) + result.init(result) return result } @@ -80,6 +81,10 @@ func (v *value) Set(val float64) { atomic.StoreUint64(&v.valBits, math.Float64bits(val)) } +func (v *value) SetToCurrentTime() { + v.Set(float64(time.Now().UnixNano()) / 1e9) +} + func (v *value) Inc() { v.Add(1) } @@ -113,7 +118,7 @@ func (v *value) Write(out *dto.Metric) error { // library to back the implementations of CounterFunc, GaugeFunc, and // UntypedFunc. type valueFunc struct { - SelfCollector + selfCollector desc *Desc valType ValueType @@ -134,7 +139,7 @@ func newValueFunc(desc *Desc, valueType ValueType, function func() float64) *val function: function, labelPairs: makeLabelPairs(desc, nil), } - result.Init(result) + result.init(result) return result } diff --git a/vendor/github.com/prometheus/client_golang/prometheus/vec.go b/vendor/github.com/prometheus/client_golang/prometheus/vec.go index a1f3bdf37..7f3eef9a4 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/vec.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/vec.go @@ -14,10 +14,10 @@ package prometheus import ( - "bytes" "fmt" - "hash" "sync" + + "github.com/prometheus/common/model" ) // MetricVec is a Collector to bundle metrics of the same name that @@ -26,17 +26,32 @@ import ( // type. GaugeVec, CounterVec, SummaryVec, and UntypedVec are examples already // provided in this package. type MetricVec struct { - mtx sync.RWMutex // Protects not only children, but also hash and buf. - children map[uint64]Metric + mtx sync.RWMutex // Protects the children. + children map[uint64][]metricWithLabelValues desc *Desc - // hash is our own hash instance to avoid repeated allocations. - hash hash.Hash64 - // buf is used to copy string contents into it for hashing, - // again to avoid allocations. - buf bytes.Buffer + newMetric func(labelValues ...string) Metric + hashAdd func(h uint64, s string) uint64 // replace hash function for testing collision handling + hashAddByte func(h uint64, b byte) uint64 +} - newMetric func(labelValues ...string) Metric +// newMetricVec returns an initialized MetricVec. The concrete value is +// returned for embedding into another struct. +func newMetricVec(desc *Desc, newMetric func(lvs ...string) Metric) *MetricVec { + return &MetricVec{ + children: map[uint64][]metricWithLabelValues{}, + desc: desc, + newMetric: newMetric, + hashAdd: hashAdd, + hashAddByte: hashAddByte, + } +} + +// metricWithLabelValues provides the metric and its label values for +// disambiguation on hash collision. +type metricWithLabelValues struct { + values []string + metric Metric } // Describe implements Collector. The length of the returned slice @@ -50,8 +65,10 @@ func (m *MetricVec) Collect(ch chan<- Metric) { m.mtx.RLock() defer m.mtx.RUnlock() - for _, metric := range m.children { - ch <- metric + for _, metrics := range m.children { + for _, metric := range metrics { + ch <- metric.metric + } } } @@ -80,14 +97,12 @@ func (m *MetricVec) Collect(ch chan<- Metric) { // with a performance overhead (for creating and processing the Labels map). // See also the GaugeVec example. func (m *MetricVec) GetMetricWithLabelValues(lvs ...string) (Metric, error) { - m.mtx.Lock() - defer m.mtx.Unlock() - h, err := m.hashLabelValues(lvs) if err != nil { return nil, err } - return m.getOrCreateMetric(h, lvs...), nil + + return m.getOrCreateMetricWithLabelValues(h, lvs), nil } // GetMetricWith returns the Metric for the given Labels map (the label names @@ -103,18 +118,12 @@ func (m *MetricVec) GetMetricWithLabelValues(lvs ...string) (Metric, error) { // GetMetricWithLabelValues(...string). See there for pros and cons of the two // methods. func (m *MetricVec) GetMetricWith(labels Labels) (Metric, error) { - m.mtx.Lock() - defer m.mtx.Unlock() - h, err := m.hashLabels(labels) if err != nil { return nil, err } - lvs := make([]string, len(labels)) - for i, label := range m.desc.variableLabels { - lvs[i] = labels[label] - } - return m.getOrCreateMetric(h, lvs...), nil + + return m.getOrCreateMetricWithLabels(h, labels), nil } // WithLabelValues works as GetMetricWithLabelValues, but panics if an error @@ -162,11 +171,7 @@ func (m *MetricVec) DeleteLabelValues(lvs ...string) bool { if err != nil { return false } - if _, has := m.children[h]; !has { - return false - } - delete(m.children, h) - return true + return m.deleteByHashWithLabelValues(h, lvs) } // Delete deletes the metric where the variable labels are the same as those @@ -187,10 +192,50 @@ func (m *MetricVec) Delete(labels Labels) bool { if err != nil { return false } - if _, has := m.children[h]; !has { + + return m.deleteByHashWithLabels(h, labels) +} + +// deleteByHashWithLabelValues removes the metric from the hash bucket h. If +// there are multiple matches in the bucket, use lvs to select a metric and +// remove only that metric. +func (m *MetricVec) deleteByHashWithLabelValues(h uint64, lvs []string) bool { + metrics, ok := m.children[h] + if !ok { return false } - delete(m.children, h) + + i := m.findMetricWithLabelValues(metrics, lvs) + if i >= len(metrics) { + return false + } + + if len(metrics) > 1 { + m.children[h] = append(metrics[:i], metrics[i+1:]...) + } else { + delete(m.children, h) + } + return true +} + +// deleteByHashWithLabels removes the metric from the hash bucket h. If there +// are multiple matches in the bucket, use lvs to select a metric and remove +// only that metric. +func (m *MetricVec) deleteByHashWithLabels(h uint64, labels Labels) bool { + metrics, ok := m.children[h] + if !ok { + return false + } + i := m.findMetricWithLabels(metrics, labels) + if i >= len(metrics) { + return false + } + + if len(metrics) > 1 { + m.children[h] = append(metrics[:i], metrics[i+1:]...) + } else { + delete(m.children, h) + } return true } @@ -208,40 +253,152 @@ func (m *MetricVec) hashLabelValues(vals []string) (uint64, error) { if len(vals) != len(m.desc.variableLabels) { return 0, errInconsistentCardinality } - m.hash.Reset() + h := hashNew() for _, val := range vals { - m.buf.Reset() - m.buf.WriteString(val) - m.hash.Write(m.buf.Bytes()) + h = m.hashAdd(h, val) + h = m.hashAddByte(h, model.SeparatorByte) } - return m.hash.Sum64(), nil + return h, nil } func (m *MetricVec) hashLabels(labels Labels) (uint64, error) { if len(labels) != len(m.desc.variableLabels) { return 0, errInconsistentCardinality } - m.hash.Reset() + h := hashNew() for _, label := range m.desc.variableLabels { val, ok := labels[label] if !ok { return 0, fmt.Errorf("label name %q missing in label map", label) } - m.buf.Reset() - m.buf.WriteString(val) - m.hash.Write(m.buf.Bytes()) + h = m.hashAdd(h, val) + h = m.hashAddByte(h, model.SeparatorByte) } - return m.hash.Sum64(), nil + return h, nil } -func (m *MetricVec) getOrCreateMetric(hash uint64, labelValues ...string) Metric { - metric, ok := m.children[hash] +// getOrCreateMetricWithLabelValues retrieves the metric by hash and label value +// or creates it and returns the new one. +// +// This function holds the mutex. +func (m *MetricVec) getOrCreateMetricWithLabelValues(hash uint64, lvs []string) Metric { + m.mtx.RLock() + metric, ok := m.getMetricWithLabelValues(hash, lvs) + m.mtx.RUnlock() + if ok { + return metric + } + + m.mtx.Lock() + defer m.mtx.Unlock() + metric, ok = m.getMetricWithLabelValues(hash, lvs) if !ok { - // Copy labelValues. Otherwise, they would be allocated even if we don't go - // down this code path. - copiedLabelValues := append(make([]string, 0, len(labelValues)), labelValues...) - metric = m.newMetric(copiedLabelValues...) - m.children[hash] = metric + // Copy to avoid allocation in case wo don't go down this code path. + copiedLVs := make([]string, len(lvs)) + copy(copiedLVs, lvs) + metric = m.newMetric(copiedLVs...) + m.children[hash] = append(m.children[hash], metricWithLabelValues{values: copiedLVs, metric: metric}) } return metric } + +// getOrCreateMetricWithLabelValues retrieves the metric by hash and label value +// or creates it and returns the new one. +// +// This function holds the mutex. +func (m *MetricVec) getOrCreateMetricWithLabels(hash uint64, labels Labels) Metric { + m.mtx.RLock() + metric, ok := m.getMetricWithLabels(hash, labels) + m.mtx.RUnlock() + if ok { + return metric + } + + m.mtx.Lock() + defer m.mtx.Unlock() + metric, ok = m.getMetricWithLabels(hash, labels) + if !ok { + lvs := m.extractLabelValues(labels) + metric = m.newMetric(lvs...) + m.children[hash] = append(m.children[hash], metricWithLabelValues{values: lvs, metric: metric}) + } + return metric +} + +// getMetricWithLabelValues gets a metric while handling possible collisions in +// the hash space. Must be called while holding read mutex. +func (m *MetricVec) getMetricWithLabelValues(h uint64, lvs []string) (Metric, bool) { + metrics, ok := m.children[h] + if ok { + if i := m.findMetricWithLabelValues(metrics, lvs); i < len(metrics) { + return metrics[i].metric, true + } + } + return nil, false +} + +// getMetricWithLabels gets a metric while handling possible collisions in +// the hash space. Must be called while holding read mutex. +func (m *MetricVec) getMetricWithLabels(h uint64, labels Labels) (Metric, bool) { + metrics, ok := m.children[h] + if ok { + if i := m.findMetricWithLabels(metrics, labels); i < len(metrics) { + return metrics[i].metric, true + } + } + return nil, false +} + +// findMetricWithLabelValues returns the index of the matching metric or +// len(metrics) if not found. +func (m *MetricVec) findMetricWithLabelValues(metrics []metricWithLabelValues, lvs []string) int { + for i, metric := range metrics { + if m.matchLabelValues(metric.values, lvs) { + return i + } + } + return len(metrics) +} + +// findMetricWithLabels returns the index of the matching metric or len(metrics) +// if not found. +func (m *MetricVec) findMetricWithLabels(metrics []metricWithLabelValues, labels Labels) int { + for i, metric := range metrics { + if m.matchLabels(metric.values, labels) { + return i + } + } + return len(metrics) +} + +func (m *MetricVec) matchLabelValues(values []string, lvs []string) bool { + if len(values) != len(lvs) { + return false + } + for i, v := range values { + if v != lvs[i] { + return false + } + } + return true +} + +func (m *MetricVec) matchLabels(values []string, labels Labels) bool { + if len(labels) != len(values) { + return false + } + for i, k := range m.desc.variableLabels { + if values[i] != labels[k] { + return false + } + } + return true +} + +func (m *MetricVec) extractLabelValues(labels Labels) []string { + labelValues := make([]string, len(labels)) + for i, k := range m.desc.variableLabels { + labelValues[i] = labels[k] + } + return labelValues +} diff --git a/vendor/github.com/prometheus/common/expfmt/decode.go b/vendor/github.com/prometheus/common/expfmt/decode.go index b72c9bede..487fdc6cc 100644 --- a/vendor/github.com/prometheus/common/expfmt/decode.go +++ b/vendor/github.com/prometheus/common/expfmt/decode.go @@ -46,10 +46,7 @@ func ResponseFormat(h http.Header) Format { return FmtUnknown } - const ( - textType = "text/plain" - jsonType = "application/json" - ) + const textType = "text/plain" switch mediatype { case ProtoType: @@ -66,22 +63,6 @@ func ResponseFormat(h http.Header) Format { return FmtUnknown } return FmtText - - case jsonType: - var prometheusAPIVersion string - - if params["schema"] == "prometheus/telemetry" && params["version"] != "" { - prometheusAPIVersion = params["version"] - } else { - prometheusAPIVersion = h.Get("X-Prometheus-API-Version") - } - - switch prometheusAPIVersion { - case "0.0.2", "": - return fmtJSON2 - default: - return FmtUnknown - } } return FmtUnknown @@ -93,8 +74,6 @@ func NewDecoder(r io.Reader, format Format) Decoder { switch format { case FmtProtoDelim: return &protoDecoder{r: r} - case fmtJSON2: - return newJSON2Decoder(r) } return &textDecoder{r: r} } @@ -107,10 +86,32 @@ type protoDecoder struct { // Decode implements the Decoder interface. func (d *protoDecoder) Decode(v *dto.MetricFamily) error { _, err := pbutil.ReadDelimited(d.r, v) - return err + if err != nil { + return err + } + if !model.IsValidMetricName(model.LabelValue(v.GetName())) { + return fmt.Errorf("invalid metric name %q", v.GetName()) + } + for _, m := range v.GetMetric() { + if m == nil { + continue + } + for _, l := range m.GetLabel() { + if l == nil { + continue + } + if !model.LabelValue(l.GetValue()).IsValid() { + return fmt.Errorf("invalid label value %q", l.GetValue()) + } + if !model.LabelName(l.GetName()).IsValid() { + return fmt.Errorf("invalid label name %q", l.GetName()) + } + } + } + return nil } -// textDecoder implements the Decoder interface for the text protcol. +// textDecoder implements the Decoder interface for the text protocol. type textDecoder struct { r io.Reader p TextParser diff --git a/vendor/github.com/prometheus/common/expfmt/encode.go b/vendor/github.com/prometheus/common/expfmt/encode.go index 392ca90ee..11839ed65 100644 --- a/vendor/github.com/prometheus/common/expfmt/encode.go +++ b/vendor/github.com/prometheus/common/expfmt/encode.go @@ -18,9 +18,9 @@ import ( "io" "net/http" - "bitbucket.org/ww/goautoneg" "github.com/golang/protobuf/proto" "github.com/matttproud/golang_protobuf_extensions/pbutil" + "github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg" dto "github.com/prometheus/client_model/go" ) diff --git a/vendor/github.com/prometheus/common/expfmt/expfmt.go b/vendor/github.com/prometheus/common/expfmt/expfmt.go index 366fbde98..fae10f6eb 100644 --- a/vendor/github.com/prometheus/common/expfmt/expfmt.go +++ b/vendor/github.com/prometheus/common/expfmt/expfmt.go @@ -29,9 +29,6 @@ const ( FmtProtoDelim Format = ProtoFmt + ` encoding=delimited` FmtProtoText Format = ProtoFmt + ` encoding=text` FmtProtoCompact Format = ProtoFmt + ` encoding=compact-text` - - // fmtJSON2 is hidden as it is deprecated. - fmtJSON2 Format = `application/json; version=0.0.2` ) const ( diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz.go b/vendor/github.com/prometheus/common/expfmt/fuzz.go index 14f920146..dc2eedeef 100644 --- a/vendor/github.com/prometheus/common/expfmt/fuzz.go +++ b/vendor/github.com/prometheus/common/expfmt/fuzz.go @@ -20,8 +20,8 @@ import "bytes" // Fuzz text metric parser with with github.com/dvyukov/go-fuzz: // -// go-fuzz-build github.com/prometheus/client_golang/text -// go-fuzz -bin text-fuzz.zip -workdir fuzz +// go-fuzz-build github.com/prometheus/common/expfmt +// go-fuzz -bin expfmt-fuzz.zip -workdir fuzz // // Further input samples should go in the folder fuzz/corpus. func Fuzz(in []byte) int { diff --git a/vendor/github.com/prometheus/common/expfmt/json_decode.go b/vendor/github.com/prometheus/common/expfmt/json_decode.go deleted file mode 100644 index 67e3a0d4d..000000000 --- a/vendor/github.com/prometheus/common/expfmt/json_decode.go +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright 2015 The Prometheus Authors -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package expfmt - -import ( - "encoding/json" - "fmt" - "io" - "sort" - - "github.com/golang/protobuf/proto" - dto "github.com/prometheus/client_model/go" - - "github.com/prometheus/common/model" -) - -type json2Decoder struct { - dec *json.Decoder - fams []*dto.MetricFamily -} - -func newJSON2Decoder(r io.Reader) Decoder { - return &json2Decoder{ - dec: json.NewDecoder(r), - } -} - -type histogram002 struct { - Labels model.LabelSet `json:"labels"` - Values map[string]float64 `json:"value"` -} - -type counter002 struct { - Labels model.LabelSet `json:"labels"` - Value float64 `json:"value"` -} - -func protoLabelSet(base, ext model.LabelSet) []*dto.LabelPair { - labels := base.Clone().Merge(ext) - delete(labels, model.MetricNameLabel) - - names := make([]string, 0, len(labels)) - for ln := range labels { - names = append(names, string(ln)) - } - sort.Strings(names) - - pairs := make([]*dto.LabelPair, 0, len(labels)) - - for _, ln := range names { - lv := labels[model.LabelName(ln)] - - pairs = append(pairs, &dto.LabelPair{ - Name: proto.String(ln), - Value: proto.String(string(lv)), - }) - } - - return pairs -} - -func (d *json2Decoder) more() error { - var entities []struct { - BaseLabels model.LabelSet `json:"baseLabels"` - Docstring string `json:"docstring"` - Metric struct { - Type string `json:"type"` - Values json.RawMessage `json:"value"` - } `json:"metric"` - } - - if err := d.dec.Decode(&entities); err != nil { - return err - } - for _, e := range entities { - f := &dto.MetricFamily{ - Name: proto.String(string(e.BaseLabels[model.MetricNameLabel])), - Help: proto.String(e.Docstring), - Type: dto.MetricType_UNTYPED.Enum(), - Metric: []*dto.Metric{}, - } - - d.fams = append(d.fams, f) - - switch e.Metric.Type { - case "counter", "gauge": - var values []counter002 - - if err := json.Unmarshal(e.Metric.Values, &values); err != nil { - return fmt.Errorf("could not extract %s value: %s", e.Metric.Type, err) - } - - for _, ctr := range values { - f.Metric = append(f.Metric, &dto.Metric{ - Label: protoLabelSet(e.BaseLabels, ctr.Labels), - Untyped: &dto.Untyped{ - Value: proto.Float64(ctr.Value), - }, - }) - } - - case "histogram": - var values []histogram002 - - if err := json.Unmarshal(e.Metric.Values, &values); err != nil { - return fmt.Errorf("could not extract %s value: %s", e.Metric.Type, err) - } - - for _, hist := range values { - quants := make([]string, 0, len(values)) - for q := range hist.Values { - quants = append(quants, q) - } - - sort.Strings(quants) - - for _, q := range quants { - value := hist.Values[q] - // The correct label is "quantile" but to not break old expressions - // this remains "percentile" - hist.Labels["percentile"] = model.LabelValue(q) - - f.Metric = append(f.Metric, &dto.Metric{ - Label: protoLabelSet(e.BaseLabels, hist.Labels), - Untyped: &dto.Untyped{ - Value: proto.Float64(value), - }, - }) - } - } - - default: - return fmt.Errorf("unknown metric type %q", e.Metric.Type) - } - } - return nil -} - -// Decode implements the Decoder interface. -func (d *json2Decoder) Decode(v *dto.MetricFamily) error { - if len(d.fams) == 0 { - if err := d.more(); err != nil { - return err - } - } - - *v = *d.fams[0] - d.fams = d.fams[1:] - - return nil -} diff --git a/vendor/github.com/prometheus/common/expfmt/text_create.go b/vendor/github.com/prometheus/common/expfmt/text_create.go index 0bb9c14cc..f11321cd0 100644 --- a/vendor/github.com/prometheus/common/expfmt/text_create.go +++ b/vendor/github.com/prometheus/common/expfmt/text_create.go @@ -14,7 +14,6 @@ package expfmt import ( - "bytes" "fmt" "io" "math" @@ -26,9 +25,12 @@ import ( // MetricFamilyToText converts a MetricFamily proto message into text format and // writes the resulting lines to 'out'. It returns the number of bytes written -// and any error encountered. This function does not perform checks on the -// content of the metric and label names, i.e. invalid metric or label names +// and any error encountered. The output will have the same order as the input, +// no further sorting is performed. Furthermore, this function assumes the input +// is already sanitized and does not perform any sanity checks. If the input +// contains duplicate metrics or invalid metric or label names, the conversion // will result in invalid text format output. +// // This method fulfills the type 'prometheus.encoder'. func MetricFamilyToText(out io.Writer, in *dto.MetricFamily) (int, error) { var written int @@ -285,21 +287,17 @@ func labelPairsToText( return written, nil } +var ( + escape = strings.NewReplacer("\\", `\\`, "\n", `\n`) + escapeWithDoubleQuote = strings.NewReplacer("\\", `\\`, "\n", `\n`, "\"", `\"`) +) + // escapeString replaces '\' by '\\', new line character by '\n', and - if // includeDoubleQuote is true - '"' by '\"'. func escapeString(v string, includeDoubleQuote bool) string { - result := bytes.NewBuffer(make([]byte, 0, len(v))) - for _, c := range v { - switch { - case c == '\\': - result.WriteString(`\\`) - case includeDoubleQuote && c == '"': - result.WriteString(`\"`) - case c == '\n': - result.WriteString(`\n`) - default: - result.WriteRune(c) - } + if includeDoubleQuote { + return escapeWithDoubleQuote.Replace(v) } - return result.String() + + return escape.Replace(v) } diff --git a/vendor/github.com/prometheus/common/expfmt/text_parse.go b/vendor/github.com/prometheus/common/expfmt/text_parse.go index 84433bc4f..ef9a15077 100644 --- a/vendor/github.com/prometheus/common/expfmt/text_parse.go +++ b/vendor/github.com/prometheus/common/expfmt/text_parse.go @@ -47,7 +47,7 @@ func (e ParseError) Error() string { } // TextParser is used to parse the simple and flat text-based exchange format. Its -// nil value is ready to use. +// zero value is ready to use. type TextParser struct { metricFamiliesByName map[string]*dto.MetricFamily buf *bufio.Reader // Where the parsed input is read through. @@ -108,6 +108,13 @@ func (p *TextParser) TextToMetricFamilies(in io.Reader) (map[string]*dto.MetricF delete(p.metricFamiliesByName, k) } } + // If p.err is io.EOF now, we have run into a premature end of the input + // stream. Turn this error into something nicer and more + // meaningful. (io.EOF is often used as a signal for the legitimate end + // of an input stream.) + if p.err == io.EOF { + p.parseError("unexpected end of input stream") + } return p.metricFamiliesByName, p.err } diff --git a/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/README.txt b/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/README.txt new file mode 100644 index 000000000..7723656d5 --- /dev/null +++ b/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/README.txt @@ -0,0 +1,67 @@ +PACKAGE + +package goautoneg +import "bitbucket.org/ww/goautoneg" + +HTTP Content-Type Autonegotiation. + +The functions in this package implement the behaviour specified in +http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html + +Copyright (c) 2011, Open Knowledge Foundation Ltd. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + Neither the name of the Open Knowledge Foundation Ltd. nor the + names of its contributors may be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +FUNCTIONS + +func Negotiate(header string, alternatives []string) (content_type string) +Negotiate the most appropriate content_type given the accept header +and a list of alternatives. + +func ParseAccept(header string) (accept []Accept) +Parse an Accept Header string returning a sorted list +of clauses + + +TYPES + +type Accept struct { + Type, SubType string + Q float32 + Params map[string]string +} +Structure to represent a clause in an HTTP Accept Header + + +SUBDIRECTORIES + + .hg diff --git a/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/autoneg.go b/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/autoneg.go new file mode 100644 index 000000000..648b38cb6 --- /dev/null +++ b/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/autoneg.go @@ -0,0 +1,162 @@ +/* +HTTP Content-Type Autonegotiation. + +The functions in this package implement the behaviour specified in +http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html + +Copyright (c) 2011, Open Knowledge Foundation Ltd. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + Neither the name of the Open Knowledge Foundation Ltd. nor the + names of its contributors may be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +*/ +package goautoneg + +import ( + "sort" + "strconv" + "strings" +) + +// Structure to represent a clause in an HTTP Accept Header +type Accept struct { + Type, SubType string + Q float64 + Params map[string]string +} + +// For internal use, so that we can use the sort interface +type accept_slice []Accept + +func (accept accept_slice) Len() int { + slice := []Accept(accept) + return len(slice) +} + +func (accept accept_slice) Less(i, j int) bool { + slice := []Accept(accept) + ai, aj := slice[i], slice[j] + if ai.Q > aj.Q { + return true + } + if ai.Type != "*" && aj.Type == "*" { + return true + } + if ai.SubType != "*" && aj.SubType == "*" { + return true + } + return false +} + +func (accept accept_slice) Swap(i, j int) { + slice := []Accept(accept) + slice[i], slice[j] = slice[j], slice[i] +} + +// Parse an Accept Header string returning a sorted list +// of clauses +func ParseAccept(header string) (accept []Accept) { + parts := strings.Split(header, ",") + accept = make([]Accept, 0, len(parts)) + for _, part := range parts { + part := strings.Trim(part, " ") + + a := Accept{} + a.Params = make(map[string]string) + a.Q = 1.0 + + mrp := strings.Split(part, ";") + + media_range := mrp[0] + sp := strings.Split(media_range, "/") + a.Type = strings.Trim(sp[0], " ") + + switch { + case len(sp) == 1 && a.Type == "*": + a.SubType = "*" + case len(sp) == 2: + a.SubType = strings.Trim(sp[1], " ") + default: + continue + } + + if len(mrp) == 1 { + accept = append(accept, a) + continue + } + + for _, param := range mrp[1:] { + sp := strings.SplitN(param, "=", 2) + if len(sp) != 2 { + continue + } + token := strings.Trim(sp[0], " ") + if token == "q" { + a.Q, _ = strconv.ParseFloat(sp[1], 32) + } else { + a.Params[token] = strings.Trim(sp[1], " ") + } + } + + accept = append(accept, a) + } + + slice := accept_slice(accept) + sort.Sort(slice) + + return +} + +// Negotiate the most appropriate content_type given the accept header +// and a list of alternatives. +func Negotiate(header string, alternatives []string) (content_type string) { + asp := make([][]string, 0, len(alternatives)) + for _, ctype := range alternatives { + asp = append(asp, strings.SplitN(ctype, "/", 2)) + } + for _, clause := range ParseAccept(header) { + for i, ctsp := range asp { + if clause.Type == ctsp[0] && clause.SubType == ctsp[1] { + content_type = alternatives[i] + return + } + if clause.Type == ctsp[0] && clause.SubType == "*" { + content_type = alternatives[i] + return + } + if clause.Type == "*" && clause.SubType == "*" { + content_type = alternatives[i] + return + } + } + } + return +} diff --git a/vendor/github.com/prometheus/common/model/alert.go b/vendor/github.com/prometheus/common/model/alert.go index b027e9f3d..35e739c7a 100644 --- a/vendor/github.com/prometheus/common/model/alert.go +++ b/vendor/github.com/prometheus/common/model/alert.go @@ -35,8 +35,9 @@ type Alert struct { Annotations LabelSet `json:"annotations"` // The known time range for this alert. Both ends are optional. - StartsAt time.Time `json:"startsAt,omitempty"` - EndsAt time.Time `json:"endsAt,omitempty"` + StartsAt time.Time `json:"startsAt,omitempty"` + EndsAt time.Time `json:"endsAt,omitempty"` + GeneratorURL string `json:"generatorURL"` } // Name returns the name of the alert. It is equivalent to the "alertname" label. @@ -60,10 +61,16 @@ func (a *Alert) String() string { // Resolved returns true iff the activity interval ended in the past. func (a *Alert) Resolved() bool { + return a.ResolvedAt(time.Now()) +} + +// ResolvedAt returns true off the activity interval ended before +// the given timestamp. +func (a *Alert) ResolvedAt(ts time.Time) bool { if a.EndsAt.IsZero() { return false } - return !a.EndsAt.After(time.Now()) + return !a.EndsAt.After(ts) } // Status returns the status of the alert. @@ -74,6 +81,26 @@ func (a *Alert) Status() AlertStatus { return AlertFiring } +// Validate checks whether the alert data is inconsistent. +func (a *Alert) Validate() error { + if a.StartsAt.IsZero() { + return fmt.Errorf("start time missing") + } + if !a.EndsAt.IsZero() && a.EndsAt.Before(a.StartsAt) { + return fmt.Errorf("start time must be before end time") + } + if err := a.Labels.Validate(); err != nil { + return fmt.Errorf("invalid label set: %s", err) + } + if len(a.Labels) == 0 { + return fmt.Errorf("at least one label pair required") + } + if err := a.Annotations.Validate(); err != nil { + return fmt.Errorf("invalid annotations: %s", err) + } + return nil +} + // Alert is a list of alerts that can be sorted in chronological order. type Alerts []*Alert diff --git a/vendor/github.com/prometheus/common/model/fnv.go b/vendor/github.com/prometheus/common/model/fnv.go new file mode 100644 index 000000000..038fc1c90 --- /dev/null +++ b/vendor/github.com/prometheus/common/model/fnv.go @@ -0,0 +1,42 @@ +// Copyright 2015 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package model + +// Inline and byte-free variant of hash/fnv's fnv64a. + +const ( + offset64 = 14695981039346656037 + prime64 = 1099511628211 +) + +// hashNew initializies a new fnv64a hash value. +func hashNew() uint64 { + return offset64 +} + +// hashAdd adds a string to a fnv64a hash value, returning the updated hash. +func hashAdd(h uint64, s string) uint64 { + for i := 0; i < len(s); i++ { + h ^= uint64(s[i]) + h *= prime64 + } + return h +} + +// hashAddByte adds a byte to a fnv64a hash value, returning the updated hash. +func hashAddByte(h uint64, b byte) uint64 { + h ^= uint64(b) + h *= prime64 + return h +} diff --git a/vendor/github.com/prometheus/common/model/labels.go b/vendor/github.com/prometheus/common/model/labels.go index 6459c8f79..41051a01a 100644 --- a/vendor/github.com/prometheus/common/model/labels.go +++ b/vendor/github.com/prometheus/common/model/labels.go @@ -17,8 +17,8 @@ import ( "encoding/json" "fmt" "regexp" - "sort" "strings" + "unicode/utf8" ) const ( @@ -80,20 +80,37 @@ const ( QuantileLabel = "quantile" ) -// LabelNameRE is a regular expression matching valid label names. +// LabelNameRE is a regular expression matching valid label names. Note that the +// IsValid method of LabelName performs the same check but faster than a match +// with this regular expression. var LabelNameRE = regexp.MustCompile("^[a-zA-Z_][a-zA-Z0-9_]*$") // A LabelName is a key for a LabelSet or Metric. It has a value associated // therewith. type LabelName string +// IsValid is true iff the label name matches the pattern of LabelNameRE. This +// method, however, does not use LabelNameRE for the check but a much faster +// hardcoded implementation. +func (ln LabelName) IsValid() bool { + if len(ln) == 0 { + return false + } + for i, b := range ln { + if !((b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z') || b == '_' || (b >= '0' && b <= '9' && i > 0)) { + return false + } + } + return true +} + // UnmarshalYAML implements the yaml.Unmarshaler interface. func (ln *LabelName) UnmarshalYAML(unmarshal func(interface{}) error) error { var s string if err := unmarshal(&s); err != nil { return err } - if !LabelNameRE.MatchString(s) { + if !LabelName(s).IsValid() { return fmt.Errorf("%q is not a valid label name", s) } *ln = LabelName(s) @@ -106,7 +123,7 @@ func (ln *LabelName) UnmarshalJSON(b []byte) error { if err := json.Unmarshal(b, &s); err != nil { return err } - if !LabelNameRE.MatchString(s) { + if !LabelName(s).IsValid() { return fmt.Errorf("%q is not a valid label name", s) } *ln = LabelName(s) @@ -139,6 +156,11 @@ func (l LabelNames) String() string { // A LabelValue is an associated value for a LabelName. type LabelValue string +// IsValid returns true iff the string is a valid UTF8. +func (lv LabelValue) IsValid() bool { + return utf8.ValidString(string(lv)) +} + // LabelValues is a sortable LabelValue slice. It implements sort.Interface. type LabelValues []LabelValue @@ -147,7 +169,7 @@ func (l LabelValues) Len() int { } func (l LabelValues) Less(i, j int) bool { - return sort.StringsAreSorted([]string{string(l[i]), string(l[j])}) + return string(l[i]) < string(l[j]) } func (l LabelValues) Swap(i, j int) { diff --git a/vendor/github.com/prometheus/common/model/labelset.go b/vendor/github.com/prometheus/common/model/labelset.go index 142b9d1e2..6eda08a73 100644 --- a/vendor/github.com/prometheus/common/model/labelset.go +++ b/vendor/github.com/prometheus/common/model/labelset.go @@ -27,6 +27,21 @@ import ( // match. type LabelSet map[LabelName]LabelValue +// Validate checks whether all names and values in the label set +// are valid. +func (ls LabelSet) Validate() error { + for ln, lv := range ls { + if !ln.IsValid() { + return fmt.Errorf("invalid name %q", ln) + } + if !lv.IsValid() { + return fmt.Errorf("invalid value %q", lv) + } + } + return nil +} + +// Equal returns true iff both label sets have exactly the same key/value pairs. func (ls LabelSet) Equal(o LabelSet) bool { if len(ls) != len(o) { return false @@ -90,6 +105,7 @@ func (ls LabelSet) Before(o LabelSet) bool { return false } +// Clone returns a copy of the label set. func (ls LabelSet) Clone() LabelSet { lsn := make(LabelSet, len(ls)) for ln, lv := range ls { @@ -144,7 +160,7 @@ func (l *LabelSet) UnmarshalJSON(b []byte) error { // LabelName as a string and does not call its UnmarshalJSON method. // Thus, we have to replicate the behavior here. for ln := range m { - if !LabelNameRE.MatchString(string(ln)) { + if !ln.IsValid() { return fmt.Errorf("%q is not a valid label name", ln) } } diff --git a/vendor/github.com/prometheus/common/model/metric.go b/vendor/github.com/prometheus/common/model/metric.go index 25fc3c942..9dff899cb 100644 --- a/vendor/github.com/prometheus/common/model/metric.go +++ b/vendor/github.com/prometheus/common/model/metric.go @@ -15,11 +15,18 @@ package model import ( "fmt" + "regexp" "sort" "strings" ) -var separator = []byte{0} +var ( + separator = []byte{0} + // MetricNameRE is a regular expression matching valid metric + // names. Note that the IsValidMetricName function performs the same + // check but faster than a match with this regular expression. + MetricNameRE = regexp.MustCompile(`^[a-zA-Z_:][a-zA-Z0-9_:]*$`) +) // A Metric is similar to a LabelSet, but the key difference is that a Metric is // a singleton and refers to one and only one stream of samples. @@ -79,3 +86,18 @@ func (m Metric) Fingerprint() Fingerprint { func (m Metric) FastFingerprint() Fingerprint { return LabelSet(m).FastFingerprint() } + +// IsValidMetricName returns true iff name matches the pattern of MetricNameRE. +// This function, however, does not use MetricNameRE for the check but a much +// faster hardcoded implementation. +func IsValidMetricName(n LabelValue) bool { + if len(n) == 0 { + return false + } + for i, b := range n { + if !((b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z') || b == '_' || b == ':' || (b >= '0' && b <= '9' && i > 0)) { + return false + } + } + return true +} diff --git a/vendor/github.com/prometheus/common/model/model.go b/vendor/github.com/prometheus/common/model/model.go index 88f013a47..a7b969170 100644 --- a/vendor/github.com/prometheus/common/model/model.go +++ b/vendor/github.com/prometheus/common/model/model.go @@ -12,5 +12,5 @@ // limitations under the License. // Package model contains common data structures that are shared across -// Prometheus componenets and libraries. +// Prometheus components and libraries. package model diff --git a/vendor/github.com/prometheus/common/model/signature.go b/vendor/github.com/prometheus/common/model/signature.go index 28f370065..8762b13c6 100644 --- a/vendor/github.com/prometheus/common/model/signature.go +++ b/vendor/github.com/prometheus/common/model/signature.go @@ -14,11 +14,7 @@ package model import ( - "bytes" - "hash" - "hash/fnv" "sort" - "sync" ) // SeparatorByte is a byte that cannot occur in valid UTF-8 sequences and is @@ -28,30 +24,9 @@ const SeparatorByte byte = 255 var ( // cache the signature of an empty label set. - emptyLabelSignature = fnv.New64a().Sum64() - - hashAndBufPool sync.Pool + emptyLabelSignature = hashNew() ) -type hashAndBuf struct { - h hash.Hash64 - b bytes.Buffer -} - -func getHashAndBuf() *hashAndBuf { - hb := hashAndBufPool.Get() - if hb == nil { - return &hashAndBuf{h: fnv.New64a()} - } - return hb.(*hashAndBuf) -} - -func putHashAndBuf(hb *hashAndBuf) { - hb.h.Reset() - hb.b.Reset() - hashAndBufPool.Put(hb) -} - // LabelsToSignature returns a quasi-unique signature (i.e., fingerprint) for a // given label set. (Collisions are possible but unlikely if the number of label // sets the function is applied to is small.) @@ -66,18 +41,14 @@ func LabelsToSignature(labels map[string]string) uint64 { } sort.Strings(labelNames) - hb := getHashAndBuf() - defer putHashAndBuf(hb) - + sum := hashNew() for _, labelName := range labelNames { - hb.b.WriteString(labelName) - hb.b.WriteByte(SeparatorByte) - hb.b.WriteString(labels[labelName]) - hb.b.WriteByte(SeparatorByte) - hb.h.Write(hb.b.Bytes()) - hb.b.Reset() + sum = hashAdd(sum, labelName) + sum = hashAddByte(sum, SeparatorByte) + sum = hashAdd(sum, labels[labelName]) + sum = hashAddByte(sum, SeparatorByte) } - return hb.h.Sum64() + return sum } // labelSetToFingerprint works exactly as LabelsToSignature but takes a LabelSet as @@ -93,18 +64,14 @@ func labelSetToFingerprint(ls LabelSet) Fingerprint { } sort.Sort(labelNames) - hb := getHashAndBuf() - defer putHashAndBuf(hb) - + sum := hashNew() for _, labelName := range labelNames { - hb.b.WriteString(string(labelName)) - hb.b.WriteByte(SeparatorByte) - hb.b.WriteString(string(ls[labelName])) - hb.b.WriteByte(SeparatorByte) - hb.h.Write(hb.b.Bytes()) - hb.b.Reset() + sum = hashAdd(sum, string(labelName)) + sum = hashAddByte(sum, SeparatorByte) + sum = hashAdd(sum, string(ls[labelName])) + sum = hashAddByte(sum, SeparatorByte) } - return Fingerprint(hb.h.Sum64()) + return Fingerprint(sum) } // labelSetToFastFingerprint works similar to labelSetToFingerprint but uses a @@ -116,17 +83,12 @@ func labelSetToFastFingerprint(ls LabelSet) Fingerprint { } var result uint64 - hb := getHashAndBuf() - defer putHashAndBuf(hb) - for labelName, labelValue := range ls { - hb.b.WriteString(string(labelName)) - hb.b.WriteByte(SeparatorByte) - hb.b.WriteString(string(labelValue)) - hb.h.Write(hb.b.Bytes()) - result ^= hb.h.Sum64() - hb.h.Reset() - hb.b.Reset() + sum := hashNew() + sum = hashAdd(sum, string(labelName)) + sum = hashAddByte(sum, SeparatorByte) + sum = hashAdd(sum, string(labelValue)) + result ^= sum } return Fingerprint(result) } @@ -136,24 +98,20 @@ func labelSetToFastFingerprint(ls LabelSet) Fingerprint { // specified LabelNames into the signature calculation. The labels passed in // will be sorted by this function. func SignatureForLabels(m Metric, labels ...LabelName) uint64 { - if len(m) == 0 || len(labels) == 0 { + if len(labels) == 0 { return emptyLabelSignature } sort.Sort(LabelNames(labels)) - hb := getHashAndBuf() - defer putHashAndBuf(hb) - + sum := hashNew() for _, label := range labels { - hb.b.WriteString(string(label)) - hb.b.WriteByte(SeparatorByte) - hb.b.WriteString(string(m[label])) - hb.b.WriteByte(SeparatorByte) - hb.h.Write(hb.b.Bytes()) - hb.b.Reset() + sum = hashAdd(sum, string(label)) + sum = hashAddByte(sum, SeparatorByte) + sum = hashAdd(sum, string(m[label])) + sum = hashAddByte(sum, SeparatorByte) } - return hb.h.Sum64() + return sum } // SignatureWithoutLabels works like LabelsToSignature but takes a Metric as @@ -175,16 +133,12 @@ func SignatureWithoutLabels(m Metric, labels map[LabelName]struct{}) uint64 { } sort.Sort(labelNames) - hb := getHashAndBuf() - defer putHashAndBuf(hb) - + sum := hashNew() for _, labelName := range labelNames { - hb.b.WriteString(string(labelName)) - hb.b.WriteByte(SeparatorByte) - hb.b.WriteString(string(m[labelName])) - hb.b.WriteByte(SeparatorByte) - hb.h.Write(hb.b.Bytes()) - hb.b.Reset() + sum = hashAdd(sum, string(labelName)) + sum = hashAddByte(sum, SeparatorByte) + sum = hashAdd(sum, string(m[labelName])) + sum = hashAddByte(sum, SeparatorByte) } - return hb.h.Sum64() + return sum } diff --git a/vendor/github.com/prometheus/common/model/silence.go b/vendor/github.com/prometheus/common/model/silence.go index b4b96eae9..7538e2997 100644 --- a/vendor/github.com/prometheus/common/model/silence.go +++ b/vendor/github.com/prometheus/common/model/silence.go @@ -44,6 +44,21 @@ func (m *Matcher) UnmarshalJSON(b []byte) error { return nil } +// Validate returns true iff all fields of the matcher have valid values. +func (m *Matcher) Validate() error { + if !m.Name.IsValid() { + return fmt.Errorf("invalid name %q", m.Name) + } + if m.IsRegex { + if _, err := regexp.Compile(m.Value); err != nil { + return fmt.Errorf("invalid regular expression %q", m.Value) + } + } else if !LabelValue(m.Value).IsValid() || len(m.Value) == 0 { + return fmt.Errorf("invalid value %q", m.Value) + } + return nil +} + // Silence defines the representation of a silence definiton // in the Prometheus eco-system. type Silence struct { @@ -58,3 +73,34 @@ type Silence struct { CreatedBy string `json:"createdBy"` Comment string `json:"comment,omitempty"` } + +// Validate returns true iff all fields of the silence have valid values. +func (s *Silence) Validate() error { + if len(s.Matchers) == 0 { + return fmt.Errorf("at least one matcher required") + } + for _, m := range s.Matchers { + if err := m.Validate(); err != nil { + return fmt.Errorf("invalid matcher: %s", err) + } + } + if s.StartsAt.IsZero() { + return fmt.Errorf("start time missing") + } + if s.EndsAt.IsZero() { + return fmt.Errorf("end time missing") + } + if s.EndsAt.Before(s.StartsAt) { + return fmt.Errorf("start time must be before end time") + } + if s.CreatedBy == "" { + return fmt.Errorf("creator information missing") + } + if s.Comment == "" { + return fmt.Errorf("comment missing") + } + if s.CreatedAt.IsZero() { + return fmt.Errorf("creation timestamp missing") + } + return nil +} diff --git a/vendor/github.com/prometheus/common/model/time.go b/vendor/github.com/prometheus/common/model/time.go index ebc8bf6cc..548968aeb 100644 --- a/vendor/github.com/prometheus/common/model/time.go +++ b/vendor/github.com/prometheus/common/model/time.go @@ -163,51 +163,70 @@ func (t *Time) UnmarshalJSON(b []byte) error { // This type should not propagate beyond the scope of input/output processing. type Duration time.Duration +var durationRE = regexp.MustCompile("^([0-9]+)(y|w|d|h|m|s|ms)$") + // StringToDuration parses a string into a time.Duration, assuming that a year -// a day always has 24h. +// always has 365d, a week always has 7d, and a day always has 24h. func ParseDuration(durationStr string) (Duration, error) { matches := durationRE.FindStringSubmatch(durationStr) if len(matches) != 3 { return 0, fmt.Errorf("not a valid duration string: %q", durationStr) } - durSeconds, _ := strconv.Atoi(matches[1]) - dur := time.Duration(durSeconds) * time.Second - unit := matches[2] - switch unit { + var ( + n, _ = strconv.Atoi(matches[1]) + dur = time.Duration(n) * time.Millisecond + ) + switch unit := matches[2]; unit { + case "y": + dur *= 1000 * 60 * 60 * 24 * 365 + case "w": + dur *= 1000 * 60 * 60 * 24 * 7 case "d": - dur *= 60 * 60 * 24 + dur *= 1000 * 60 * 60 * 24 case "h": - dur *= 60 * 60 + dur *= 1000 * 60 * 60 case "m": - dur *= 60 + dur *= 1000 * 60 case "s": - dur *= 1 + dur *= 1000 + case "ms": + // Value already correct default: return 0, fmt.Errorf("invalid time unit in duration string: %q", unit) } return Duration(dur), nil } -var durationRE = regexp.MustCompile("^([0-9]+)([ywdhms]+)$") - func (d Duration) String() string { - seconds := int64(time.Duration(d) / time.Second) + var ( + ms = int64(time.Duration(d) / time.Millisecond) + unit = "ms" + ) factors := map[string]int64{ - "d": 60 * 60 * 24, - "h": 60 * 60, - "m": 60, - "s": 1, + "y": 1000 * 60 * 60 * 24 * 365, + "w": 1000 * 60 * 60 * 24 * 7, + "d": 1000 * 60 * 60 * 24, + "h": 1000 * 60 * 60, + "m": 1000 * 60, + "s": 1000, + "ms": 1, } - unit := "s" + switch int64(0) { - case seconds % factors["d"]: + case ms % factors["y"]: + unit = "y" + case ms % factors["w"]: + unit = "w" + case ms % factors["d"]: unit = "d" - case seconds % factors["h"]: + case ms % factors["h"]: unit = "h" - case seconds % factors["m"]: + case ms % factors["m"]: unit = "m" + case ms % factors["s"]: + unit = "s" } - return fmt.Sprintf("%v%v", seconds/factors[unit], unit) + return fmt.Sprintf("%v%v", ms/factors[unit], unit) } // MarshalYAML implements the yaml.Marshaler interface. diff --git a/vendor/github.com/prometheus/common/model/value.go b/vendor/github.com/prometheus/common/model/value.go index 10ffb0bd6..7728abaee 100644 --- a/vendor/github.com/prometheus/common/model/value.go +++ b/vendor/github.com/prometheus/common/model/value.go @@ -16,11 +16,28 @@ package model import ( "encoding/json" "fmt" + "math" "sort" "strconv" "strings" ) +var ( + // ZeroSamplePair is the pseudo zero-value of SamplePair used to signal a + // non-existing sample pair. It is a SamplePair with timestamp Earliest and + // value 0.0. Note that the natural zero value of SamplePair has a timestamp + // of 0, which is possible to appear in a real SamplePair and thus not + // suitable to signal a non-existing SamplePair. + ZeroSamplePair = SamplePair{Timestamp: Earliest} + + // ZeroSample is the pseudo zero-value of Sample used to signal a + // non-existing sample. It is a Sample with timestamp Earliest, value 0.0, + // and metric nil. Note that the natural zero value of Sample has a timestamp + // of 0, which is possible to appear in a real Sample and thus not suitable + // to signal a non-existing Sample. + ZeroSample = Sample{Timestamp: Earliest} +) + // A SampleValue is a representation of a value for a given sample at a given // time. type SampleValue float64 @@ -43,8 +60,14 @@ func (v *SampleValue) UnmarshalJSON(b []byte) error { return nil } +// Equal returns true if the value of v and o is equal or if both are NaN. Note +// that v==o is false if both are NaN. If you want the conventional float +// behavior, use == to compare two SampleValues. func (v SampleValue) Equal(o SampleValue) bool { - return v == o + if v == o { + return true + } + return math.IsNaN(float64(v)) && math.IsNaN(float64(o)) } func (v SampleValue) String() string { @@ -77,9 +100,9 @@ func (s *SamplePair) UnmarshalJSON(b []byte) error { } // Equal returns true if this SamplePair and o have equal Values and equal -// Timestamps. +// Timestamps. The sematics of Value equality is defined by SampleValue.Equal. func (s *SamplePair) Equal(o *SamplePair) bool { - return s == o || (s.Value == o.Value && s.Timestamp.Equal(o.Timestamp)) + return s == o || (s.Value.Equal(o.Value) && s.Timestamp.Equal(o.Timestamp)) } func (s SamplePair) String() string { @@ -93,7 +116,8 @@ type Sample struct { Timestamp Time `json:"timestamp"` } -// Equal compares first the metrics, then the timestamp, then the value. +// Equal compares first the metrics, then the timestamp, then the value. The +// sematics of value equality is defined by SampleValue.Equal. func (s *Sample) Equal(o *Sample) bool { if s == o { return true @@ -105,7 +129,7 @@ func (s *Sample) Equal(o *Sample) bool { if !s.Timestamp.Equal(o.Timestamp) { return false } - if s.Value != o.Value { + if s.Value.Equal(o.Value) { return false } diff --git a/vendor/github.com/prometheus/procfs/.travis.yml b/vendor/github.com/prometheus/procfs/.travis.yml index 25e169dd0..2b4554da5 100644 --- a/vendor/github.com/prometheus/procfs/.travis.yml +++ b/vendor/github.com/prometheus/procfs/.travis.yml @@ -1,7 +1,5 @@ sudo: false language: go go: - - 1.3 - - 1.4 - 1.5 - - tip + - 1.6 diff --git a/vendor/github.com/prometheus/procfs/AUTHORS.md b/vendor/github.com/prometheus/procfs/AUTHORS.md index f1c27ccb0..0c802dd87 100644 --- a/vendor/github.com/prometheus/procfs/AUTHORS.md +++ b/vendor/github.com/prometheus/procfs/AUTHORS.md @@ -13,7 +13,7 @@ The following individuals have contributed code to this repository * David Cournapeau * Ji-Hoon, Seol * Jonas Große Sundrup -* Julius Volz +* Julius Volz * Matthias Rampke * Nicky Gerritsen * Rémi Audebert diff --git a/vendor/github.com/prometheus/procfs/Makefile b/vendor/github.com/prometheus/procfs/Makefile index e8acbbc5e..c264a49d1 100644 --- a/vendor/github.com/prometheus/procfs/Makefile +++ b/vendor/github.com/prometheus/procfs/Makefile @@ -1,5 +1,5 @@ ci: - go fmt + ! gofmt -l *.go | read nothing go vet go test -v ./... go get github.com/golang/lint/golint diff --git a/vendor/github.com/prometheus/procfs/fs.go b/vendor/github.com/prometheus/procfs/fs.go index 6a8d97b11..49aaab050 100644 --- a/vendor/github.com/prometheus/procfs/fs.go +++ b/vendor/github.com/prometheus/procfs/fs.go @@ -27,14 +27,7 @@ func NewFS(mountPoint string) (FS, error) { return FS(mountPoint), nil } -func (fs FS) stat(p string) (os.FileInfo, error) { - return os.Stat(path.Join(string(fs), p)) -} - -func (fs FS) open(p string) (*os.File, error) { - return os.Open(path.Join(string(fs), p)) -} - -func (fs FS) readlink(p string) (string, error) { - return os.Readlink(path.Join(string(fs), p)) +// Path returns the path of the given subsystem relative to the procfs root. +func (fs FS) Path(p ...string) string { + return path.Join(append([]string{string(fs)}, p...)...) } diff --git a/vendor/github.com/prometheus/procfs/ipvs.go b/vendor/github.com/prometheus/procfs/ipvs.go index 26da5000e..e7012f732 100644 --- a/vendor/github.com/prometheus/procfs/ipvs.go +++ b/vendor/github.com/prometheus/procfs/ipvs.go @@ -8,6 +8,7 @@ import ( "io" "io/ioutil" "net" + "os" "strconv" "strings" ) @@ -58,7 +59,7 @@ func NewIPVSStats() (IPVSStats, error) { // NewIPVSStats reads the IPVS statistics from the specified `proc` filesystem. func (fs FS) NewIPVSStats() (IPVSStats, error) { - file, err := fs.open("net/ip_vs_stats") + file, err := os.Open(fs.Path("net/ip_vs_stats")) if err != nil { return IPVSStats{}, err } @@ -127,7 +128,7 @@ func NewIPVSBackendStatus() ([]IPVSBackendStatus, error) { // NewIPVSBackendStatus reads and returns the status of all (virtual,real) server pairs from the specified `proc` filesystem. func (fs FS) NewIPVSBackendStatus() ([]IPVSBackendStatus, error) { - file, err := fs.open("net/ip_vs") + file, err := os.Open(fs.Path("net/ip_vs")) if err != nil { return nil, err } diff --git a/vendor/github.com/prometheus/procfs/mdstat.go b/vendor/github.com/prometheus/procfs/mdstat.go index 09ed6b5eb..d7a248c0d 100644 --- a/vendor/github.com/prometheus/procfs/mdstat.go +++ b/vendor/github.com/prometheus/procfs/mdstat.go @@ -3,7 +3,6 @@ package procfs import ( "fmt" "io/ioutil" - "path" "regexp" "strconv" "strings" @@ -32,36 +31,22 @@ type MDStat struct { // ParseMDStat parses an mdstat-file and returns a struct with the relevant infos. func (fs FS) ParseMDStat() (mdstates []MDStat, err error) { - mdStatusFilePath := path.Join(string(fs), "mdstat") + mdStatusFilePath := fs.Path("mdstat") content, err := ioutil.ReadFile(mdStatusFilePath) if err != nil { return []MDStat{}, fmt.Errorf("error parsing %s: %s", mdStatusFilePath, err) } - mdStatusFile := string(content) - - lines := strings.Split(mdStatusFile, "\n") - var currentMD string - - // Each md has at least the deviceline, statusline and one empty line afterwards - // so we will have probably something of the order len(lines)/3 devices - // so we use that for preallocation. - estimateMDs := len(lines) / 3 - mdStates := make([]MDStat, 0, estimateMDs) - + mdStates := []MDStat{} + lines := strings.Split(string(content), "\n") for i, l := range lines { if l == "" { - // Skip entirely empty lines. continue } - if l[0] == ' ' { - // Those lines are not the beginning of a md-section. continue } - if strings.HasPrefix(l, "Personalities") || strings.HasPrefix(l, "unused") { - // We aren't interested in lines with general info. continue } @@ -69,32 +54,30 @@ func (fs FS) ParseMDStat() (mdstates []MDStat, err error) { if len(mainLine) < 3 { return mdStates, fmt.Errorf("error parsing mdline: %s", l) } - currentMD = mainLine[0] // name of md-device - activityState := mainLine[2] // activity status of said md-device + mdName := mainLine[0] + activityState := mainLine[2] if len(lines) <= i+3 { - return mdStates, fmt.Errorf("error parsing %s: entry for %s has fewer lines than expected", mdStatusFilePath, currentMD) + return mdStates, fmt.Errorf( + "error parsing %s: too few lines for md device %s", + mdStatusFilePath, + mdName, + ) } - active, total, size, err := evalStatusline(lines[i+1]) // parse statusline, always present + active, total, size, err := evalStatusline(lines[i+1]) if err != nil { return mdStates, fmt.Errorf("error parsing %s: %s", mdStatusFilePath, err) } - // - // Now get the number of synced blocks. - // - - // Get the line number of the syncing-line. - var j int - if strings.Contains(lines[i+2], "bitmap") { // then skip the bitmap line + // j is the line number of the syncing-line. + j := i + 2 + if strings.Contains(lines[i+2], "bitmap") { // skip bitmap line j = i + 3 - } else { - j = i + 2 } - // If device is syncing at the moment, get the number of currently synced bytes, - // otherwise that number equals the size of the device. + // If device is syncing at the moment, get the number of currently + // synced bytes, otherwise that number equals the size of the device. syncedBlocks := size if strings.Contains(lines[j], "recovery") || strings.Contains(lines[j], "resync") { syncedBlocks, err = evalBuildline(lines[j]) @@ -103,8 +86,14 @@ func (fs FS) ParseMDStat() (mdstates []MDStat, err error) { } } - mdStates = append(mdStates, MDStat{currentMD, activityState, active, total, size, syncedBlocks}) - + mdStates = append(mdStates, MDStat{ + Name: mdName, + ActivityState: activityState, + DisksActive: active, + DisksTotal: total, + BlocksTotal: size, + BlocksSynced: syncedBlocks, + }) } return mdStates, nil @@ -112,47 +101,38 @@ func (fs FS) ParseMDStat() (mdstates []MDStat, err error) { func evalStatusline(statusline string) (active, total, size int64, err error) { matches := statuslineRE.FindStringSubmatch(statusline) - - // +1 to make it more obvious that the whole string containing the info is also returned as matches[0]. - if len(matches) != 3+1 { - return 0, 0, 0, fmt.Errorf("unexpected number matches found in statusline: %s", statusline) + if len(matches) != 4 { + return 0, 0, 0, fmt.Errorf("unexpected statusline: %s", statusline) } size, err = strconv.ParseInt(matches[1], 10, 64) if err != nil { - return 0, 0, 0, fmt.Errorf("%s in statusline: %s", err, statusline) + return 0, 0, 0, fmt.Errorf("unexpected statusline %s: %s", statusline, err) } total, err = strconv.ParseInt(matches[2], 10, 64) if err != nil { - return 0, 0, 0, fmt.Errorf("%s in statusline: %s", err, statusline) + return 0, 0, 0, fmt.Errorf("unexpected statusline %s: %s", statusline, err) } active, err = strconv.ParseInt(matches[3], 10, 64) if err != nil { - return 0, 0, 0, fmt.Errorf("%s in statusline: %s", err, statusline) + return 0, 0, 0, fmt.Errorf("unexpected statusline %s: %s", statusline, err) } return active, total, size, nil } -// Gets the size that has already been synced out of the sync-line. -func evalBuildline(buildline string) (int64, error) { +func evalBuildline(buildline string) (syncedBlocks int64, err error) { matches := buildlineRE.FindStringSubmatch(buildline) - - // +1 to make it more obvious that the whole string containing the info is also returned as matches[0]. - if len(matches) < 1+1 { - return 0, fmt.Errorf("too few matches found in buildline: %s", buildline) + if len(matches) != 2 { + return 0, fmt.Errorf("unexpected buildline: %s", buildline) } - if len(matches) > 1+1 { - return 0, fmt.Errorf("too many matches found in buildline: %s", buildline) - } - - syncedSize, err := strconv.ParseInt(matches[1], 10, 64) + syncedBlocks, err = strconv.ParseInt(matches[1], 10, 64) if err != nil { return 0, fmt.Errorf("%s in buildline: %s", err, buildline) } - return syncedSize, nil + return syncedBlocks, nil } diff --git a/vendor/github.com/prometheus/procfs/proc.go b/vendor/github.com/prometheus/procfs/proc.go index efc850278..0d0a6a90f 100644 --- a/vendor/github.com/prometheus/procfs/proc.go +++ b/vendor/github.com/prometheus/procfs/proc.go @@ -4,7 +4,6 @@ import ( "fmt" "io/ioutil" "os" - "path" "strconv" "strings" ) @@ -42,7 +41,7 @@ func NewProc(pid int) (Proc, error) { return fs.NewProc(pid) } -// AllProcs returns a list of all currently avaible processes under /proc. +// AllProcs returns a list of all currently available processes under /proc. func AllProcs() (Procs, error) { fs, err := NewFS(DefaultMountPoint) if err != nil { @@ -53,7 +52,7 @@ func AllProcs() (Procs, error) { // Self returns a process for the current process. func (fs FS) Self() (Proc, error) { - p, err := fs.readlink("self") + p, err := os.Readlink(fs.Path("self")) if err != nil { return Proc{}, err } @@ -66,15 +65,15 @@ func (fs FS) Self() (Proc, error) { // NewProc returns a process for the given pid. func (fs FS) NewProc(pid int) (Proc, error) { - if _, err := fs.stat(strconv.Itoa(pid)); err != nil { + if _, err := os.Stat(fs.Path(strconv.Itoa(pid))); err != nil { return Proc{}, err } return Proc{PID: pid, fs: fs}, nil } -// AllProcs returns a list of all currently avaible processes. +// AllProcs returns a list of all currently available processes. func (fs FS) AllProcs() (Procs, error) { - d, err := fs.open("") + d, err := os.Open(fs.Path()) if err != nil { return Procs{}, err } @@ -99,7 +98,7 @@ func (fs FS) AllProcs() (Procs, error) { // CmdLine returns the command line of a process. func (p Proc) CmdLine() ([]string, error) { - f, err := p.open("cmdline") + f, err := os.Open(p.path("cmdline")) if err != nil { return nil, err } @@ -117,10 +116,25 @@ func (p Proc) CmdLine() ([]string, error) { return strings.Split(string(data[:len(data)-1]), string(byte(0))), nil } +// Comm returns the command name of a process. +func (p Proc) Comm() (string, error) { + f, err := os.Open(p.path("comm")) + if err != nil { + return "", err + } + defer f.Close() + + data, err := ioutil.ReadAll(f) + if err != nil { + return "", err + } + + return strings.TrimSpace(string(data)), nil +} + // Executable returns the absolute path of the executable command of a process. func (p Proc) Executable() (string, error) { - exe, err := p.readlink("exe") - + exe, err := os.Readlink(p.path("exe")) if os.IsNotExist(err) { return "", nil } @@ -158,7 +172,7 @@ func (p Proc) FileDescriptorTargets() ([]string, error) { targets := make([]string, len(names)) for i, name := range names { - target, err := p.readlink("fd/" + name) + target, err := os.Readlink(p.path("fd", name)) if err == nil { targets[i] = target } @@ -179,7 +193,7 @@ func (p Proc) FileDescriptorsLen() (int, error) { } func (p Proc) fileDescriptors() ([]string, error) { - d, err := p.open("fd") + d, err := os.Open(p.path("fd")) if err != nil { return nil, err } @@ -193,10 +207,6 @@ func (p Proc) fileDescriptors() ([]string, error) { return names, nil } -func (p Proc) open(pa string) (*os.File, error) { - return p.fs.open(path.Join(strconv.Itoa(p.PID), pa)) -} - -func (p Proc) readlink(pa string) (string, error) { - return p.fs.readlink(path.Join(strconv.Itoa(p.PID), pa)) +func (p Proc) path(pa ...string) string { + return p.fs.Path(append([]string{strconv.Itoa(p.PID)}, pa...)...) } diff --git a/vendor/github.com/prometheus/procfs/proc_io.go b/vendor/github.com/prometheus/procfs/proc_io.go index 7c6dc8697..b4e31d7ba 100644 --- a/vendor/github.com/prometheus/procfs/proc_io.go +++ b/vendor/github.com/prometheus/procfs/proc_io.go @@ -3,6 +3,7 @@ package procfs import ( "fmt" "io/ioutil" + "os" ) // ProcIO models the content of /proc//io. @@ -29,7 +30,7 @@ type ProcIO struct { func (p Proc) NewIO() (ProcIO, error) { pio := ProcIO{} - f, err := p.open("io") + f, err := os.Open(p.path("io")) if err != nil { return pio, err } diff --git a/vendor/github.com/prometheus/procfs/proc_limits.go b/vendor/github.com/prometheus/procfs/proc_limits.go index 9f080b9f6..2df997ce1 100644 --- a/vendor/github.com/prometheus/procfs/proc_limits.go +++ b/vendor/github.com/prometheus/procfs/proc_limits.go @@ -3,29 +3,56 @@ package procfs import ( "bufio" "fmt" + "os" "regexp" "strconv" ) // ProcLimits represents the soft limits for each of the process's resource -// limits. +// limits. For more information see getrlimit(2): +// http://man7.org/linux/man-pages/man2/getrlimit.2.html. type ProcLimits struct { - CPUTime int - FileSize int - DataSize int - StackSize int - CoreFileSize int - ResidentSet int - Processes int - OpenFiles int - LockedMemory int - AddressSpace int - FileLocks int - PendingSignals int - MsqqueueSize int - NicePriority int + // CPU time limit in seconds. + CPUTime int + // Maximum size of files that the process may create. + FileSize int + // Maximum size of the process's data segment (initialized data, + // uninitialized data, and heap). + DataSize int + // Maximum size of the process stack in bytes. + StackSize int + // Maximum size of a core file. + CoreFileSize int + // Limit of the process's resident set in pages. + ResidentSet int + // Maximum number of processes that can be created for the real user ID of + // the calling process. + Processes int + // Value one greater than the maximum file descriptor number that can be + // opened by this process. + OpenFiles int + // Maximum number of bytes of memory that may be locked into RAM. + LockedMemory int + // Maximum size of the process's virtual memory address space in bytes. + AddressSpace int + // Limit on the combined number of flock(2) locks and fcntl(2) leases that + // this process may establish. + FileLocks int + // Limit of signals that may be queued for the real user ID of the calling + // process. + PendingSignals int + // Limit on the number of bytes that can be allocated for POSIX message + // queues for the real user ID of the calling process. + MsqqueueSize int + // Limit of the nice priority set using setpriority(2) or nice(2). + NicePriority int + // Limit of the real-time priority set using sched_setscheduler(2) or + // sched_setparam(2). RealtimePriority int - RealtimeTimeout int + // Limit (in microseconds) on the amount of CPU time that a process + // scheduled under a real-time scheduling policy may consume without making + // a blocking system call. + RealtimeTimeout int } const ( @@ -39,7 +66,7 @@ var ( // NewLimits returns the current soft limits of the process. func (p Proc) NewLimits() (ProcLimits, error) { - f, err := p.open("limits") + f, err := os.Open(p.path("limits")) if err != nil { return ProcLimits{}, err } @@ -60,7 +87,7 @@ func (p Proc) NewLimits() (ProcLimits, error) { case "Max cpu time": l.CPUTime, err = parseInt(fields[1]) case "Max file size": - l.FileLocks, err = parseInt(fields[1]) + l.FileSize, err = parseInt(fields[1]) case "Max data size": l.DataSize, err = parseInt(fields[1]) case "Max stack size": @@ -90,7 +117,6 @@ func (p Proc) NewLimits() (ProcLimits, error) { case "Max realtime timeout": l.RealtimeTimeout, err = parseInt(fields[1]) } - if err != nil { return ProcLimits{}, err } diff --git a/vendor/github.com/prometheus/procfs/proc_stat.go b/vendor/github.com/prometheus/procfs/proc_stat.go index 30a403b6c..724e271b9 100644 --- a/vendor/github.com/prometheus/procfs/proc_stat.go +++ b/vendor/github.com/prometheus/procfs/proc_stat.go @@ -7,15 +7,15 @@ import ( "os" ) -// Originally, this USER_HZ value was dynamically retrieved via a sysconf call which -// required cgo. However, that caused a lot of problems regarding +// Originally, this USER_HZ value was dynamically retrieved via a sysconf call +// which required cgo. However, that caused a lot of problems regarding // cross-compilation. Alternatives such as running a binary to determine the -// value, or trying to derive it in some other way were all problematic. -// After much research it was determined that USER_HZ is actually hardcoded to -// 100 on all Go-supported platforms as of the time of this writing. This is -// why we decided to hardcode it here as well. It is not impossible that there -// could be systems with exceptions, but they should be very exotic edge cases, -// and in that case, the worst outcome will be two misreported metrics. +// value, or trying to derive it in some other way were all problematic. After +// much research it was determined that USER_HZ is actually hardcoded to 100 on +// all Go-supported platforms as of the time of this writing. This is why we +// decided to hardcode it here as well. It is not impossible that there could +// be systems with exceptions, but they should be very exotic edge cases, and +// in that case, the worst outcome will be two misreported metrics. // // See also the following discussions: // @@ -91,7 +91,7 @@ type ProcStat struct { // NewStat returns the current status information of the process. func (p Proc) NewStat() (ProcStat, error) { - f, err := p.open("stat") + f, err := os.Open(p.path("stat")) if err != nil { return ProcStat{}, err } diff --git a/vendor/github.com/prometheus/procfs/stat.go b/vendor/github.com/prometheus/procfs/stat.go index 26fefb0fa..1ca217e8c 100644 --- a/vendor/github.com/prometheus/procfs/stat.go +++ b/vendor/github.com/prometheus/procfs/stat.go @@ -3,6 +3,7 @@ package procfs import ( "bufio" "fmt" + "os" "strconv" "strings" ) @@ -25,7 +26,7 @@ func NewStat() (Stat, error) { // NewStat returns an information about current kernel/system statistics. func (fs FS) NewStat() (Stat, error) { - f, err := fs.open("stat") + f, err := os.Open(fs.Path("stat")) if err != nil { return Stat{}, err } diff --git a/vendor/k8s.io/kubernetes/federation/apis/federation/types.go b/vendor/k8s.io/kubernetes/federation/apis/federation/types.go index 273f0f945..ebd44bc10 100644 --- a/vendor/k8s.io/kubernetes/federation/apis/federation/types.go +++ b/vendor/k8s.io/kubernetes/federation/apis/federation/types.go @@ -133,7 +133,7 @@ type FederatedReplicaSetPreferences struct { // +optional Rebalance bool `json:"rebalance,omitempty"` - // A mapping between cluser names and preferences regarding local replicasets in these clusters. + // A mapping between cluster names and preferences regarding local ReplicaSet in these clusters. // "*" (if provided) applies to all clusters if an explicit mapping is not provided. If there is no // "*" that clusters without explicit preferences should not have any replicas scheduled. // +optional diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/generated.proto b/vendor/k8s.io/kubernetes/pkg/api/v1/generated.proto index 0599bb1ec..f6fa8a4a1 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/v1/generated.proto +++ b/vendor/k8s.io/kubernetes/pkg/api/v1/generated.proto @@ -1514,7 +1514,7 @@ message NodeSpec { optional string providerID = 3; // Unschedulable controls node schedulability of new pods. By default, node is schedulable. - // More info: http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration"` + // More info: http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration" // +optional optional bool unschedulable = 4; } diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/types.go b/vendor/k8s.io/kubernetes/pkg/api/v1/types.go index 4d729bd9e..cc8abfa95 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/v1/types.go +++ b/vendor/k8s.io/kubernetes/pkg/api/v1/types.go @@ -2818,7 +2818,7 @@ type NodeSpec struct { // +optional ProviderID string `json:"providerID,omitempty" protobuf:"bytes,3,opt,name=providerID"` // Unschedulable controls node schedulability of new pods. By default, node is schedulable. - // More info: http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration"` + // More info: http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration" // +optional Unschedulable bool `json:"unschedulable,omitempty" protobuf:"varint,4,opt,name=unschedulable"` } diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/pkg/api/v1/types_swagger_doc_generated.go index 5620489b3..7322cea87 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/api/v1/types_swagger_doc_generated.go @@ -901,7 +901,7 @@ var map_NodeSpec = map[string]string{ "podCIDR": "PodCIDR represents the pod IP range assigned to the node.", "externalID": "External ID of the node assigned by some machine database (e.g. a cloud provider). Deprecated.", "providerID": "ID of the node assigned by the cloud provider in the format: ://", - "unschedulable": "Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration\"`", + "unschedulable": "Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration\"", } func (NodeSpec) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/kubernetes/pkg/api/validation/validation.go b/vendor/k8s.io/kubernetes/pkg/api/validation/validation.go index ea84cb1b0..b3ca343fe 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/validation/validation.go +++ b/vendor/k8s.io/kubernetes/pkg/api/validation/validation.go @@ -2666,7 +2666,13 @@ func ValidateServiceUpdate(service, oldService *api.Service) field.ErrorList { } // TODO(freehan): allow user to update loadbalancerSourceRanges - allErrs = append(allErrs, ValidateImmutableField(service.Spec.LoadBalancerSourceRanges, oldService.Spec.LoadBalancerSourceRanges, field.NewPath("spec", "loadBalancerSourceRanges"))...) + // Only allow removing LoadBalancerSourceRanges when change service type from LoadBalancer + // to non-LoadBalancer or adding LoadBalancerSourceRanges when change service type from + // non-LoadBalancer to LoadBalancer. + if service.Spec.Type != api.ServiceTypeLoadBalancer && oldService.Spec.Type != api.ServiceTypeLoadBalancer || + service.Spec.Type == api.ServiceTypeLoadBalancer && oldService.Spec.Type == api.ServiceTypeLoadBalancer { + allErrs = append(allErrs, ValidateImmutableField(service.Spec.LoadBalancerSourceRanges, oldService.Spec.LoadBalancerSourceRanges, field.NewPath("spec", "loadBalancerSourceRanges"))...) + } allErrs = append(allErrs, validateServiceFields(service)...) allErrs = append(allErrs, validateServiceAnnotations(service, oldService)...) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/register.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/register.go index 0eed5d2c3..0319dad2e 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/register.go @@ -50,6 +50,7 @@ func addKnownTypes(scheme *runtime.Scheme) error { &HorizontalPodAutoscaler{}, &HorizontalPodAutoscalerList{}, &api.ListOptions{}, + &api.DeleteOptions{}, ) return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/BUILD index baad5554d..04ef35ab6 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/BUILD @@ -37,3 +37,16 @@ go_library( "//vendor:github.com/ugorji/go/codec", ], ) + +go_test( + name = "go_default_xtest", + srcs = ["defaults_test.go"], + tags = ["automanaged"], + deps = [ + "//pkg/api:go_default_library", + "//pkg/api/install:go_default_library", + "//pkg/apis/autoscaling/install:go_default_library", + "//pkg/apis/autoscaling/v1:go_default_library", + "//pkg/runtime:go_default_library", + ], +) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/register.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/register.go index 3654268f3..56cc0ec99 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/register.go @@ -52,6 +52,7 @@ func addKnownTypes(scheme *runtime.Scheme) error { &CronJob{}, &CronJobList{}, &api.ListOptions{}, + &api.DeleteOptions{}, ) scheme.AddKnownTypeWithName(SchemeGroupVersion.WithKind("ScheduledJob"), &CronJob{}) scheme.AddKnownTypeWithName(SchemeGroupVersion.WithKind("ScheduledJobList"), &CronJobList{}) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/types.generated.go index 9163b46ea..e11812acc 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/types.generated.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/types.generated.go @@ -1393,7 +1393,7 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep153 := !z.EncBinary() yy2arr153 := z.EncBasicHandle().StructToArray - var yyq153 [112]bool + var yyq153 [113]bool _, _, _ = yysep153, yyq153, yy2arr153 const yyr153 bool = false yyq153[0] = x.Kind != "" @@ -1401,7 +1401,7 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { yyq153[55] = x.CloudProvider != "" yyq153[56] = x.CloudConfigFile != "" yyq153[57] = x.KubeletCgroups != "" - yyq153[58] = x.CgroupsPerQOS != false + yyq153[58] = x.ExperimentalCgroupsPerQOS != false yyq153[59] = x.CgroupDriver != "" yyq153[60] = x.RuntimeCgroups != "" yyq153[61] = x.SystemCgroups != "" @@ -1422,9 +1422,10 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { yyq153[108] = len(x.AllowedUnsafeSysctls) != 0 yyq153[110] = x.EnableCRI != false yyq153[111] = x.ExperimentalFailSwapOn != false + yyq153[112] = x.ExperimentalCheckNodeCapabilitiesBeforeMount != false var yynn153 int if yyr153 || yy2arr153 { - r.EncodeArrayStart(112) + r.EncodeArrayStart(113) } else { yynn153 = 86 for _, b := range yyq153 { @@ -2646,7 +2647,7 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym345 if false { } else { - r.EncodeBool(bool(x.CgroupsPerQOS)) + r.EncodeBool(bool(x.ExperimentalCgroupsPerQOS)) } } else { r.EncodeBool(false) @@ -2654,13 +2655,13 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } else { if yyq153[58] { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("cgroupsPerQOS")) + r.EncodeString(codecSelferC_UTF81234, string("experimentalCgroupsPerQOS")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yym346 := z.EncBinary() _ = yym346 if false { } else { - r.EncodeBool(bool(x.CgroupsPerQOS)) + r.EncodeBool(bool(x.ExperimentalCgroupsPerQOS)) } } } @@ -3851,6 +3852,31 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } } } + if yyr153 || yy2arr153 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq153[112] { + yym513 := z.EncBinary() + _ = yym513 + if false { + } else { + r.EncodeBool(bool(x.ExperimentalCheckNodeCapabilitiesBeforeMount)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq153[112] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("ExperimentalCheckNodeCapabilitiesBeforeMount")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym514 := z.EncBinary() + _ = yym514 + if false { + } else { + r.EncodeBool(bool(x.ExperimentalCheckNodeCapabilitiesBeforeMount)) + } + } + } if yyr153 || yy2arr153 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { @@ -3864,25 +3890,25 @@ func (x *KubeletConfiguration) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym512 := z.DecBinary() - _ = yym512 + yym515 := z.DecBinary() + _ = yym515 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct513 := r.ContainerType() - if yyct513 == codecSelferValueTypeMap1234 { - yyl513 := r.ReadMapStart() - if yyl513 == 0 { + yyct516 := r.ContainerType() + if yyct516 == codecSelferValueTypeMap1234 { + yyl516 := r.ReadMapStart() + if yyl516 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl513, d) + x.codecDecodeSelfFromMap(yyl516, d) } - } else if yyct513 == codecSelferValueTypeArray1234 { - yyl513 := r.ReadArrayStart() - if yyl513 == 0 { + } else if yyct516 == codecSelferValueTypeArray1234 { + yyl516 := r.ReadArrayStart() + if yyl516 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl513, d) + x.codecDecodeSelfFromArray(yyl516, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -3894,12 +3920,12 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys514Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys514Slc - var yyhl514 bool = l >= 0 - for yyj514 := 0; ; yyj514++ { - if yyhl514 { - if yyj514 >= l { + var yys517Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys517Slc + var yyhl517 bool = l >= 0 + for yyj517 := 0; ; yyj517++ { + if yyhl517 { + if yyj517 >= l { break } } else { @@ -3908,10 +3934,10 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys514Slc = r.DecodeBytes(yys514Slc, true, true) - yys514 := string(yys514Slc) + yys517Slc = r.DecodeBytes(yys517Slc, true, true) + yys517 := string(yys517Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys514 { + switch yys517 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -3934,45 +3960,45 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.SyncFrequency = pkg1_unversioned.Duration{} } else { - yyv518 := &x.SyncFrequency - yym519 := z.DecBinary() - _ = yym519 + yyv521 := &x.SyncFrequency + yym522 := z.DecBinary() + _ = yym522 if false { - } else if z.HasExtensions() && z.DecExt(yyv518) { - } else if !yym519 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv518) + } else if z.HasExtensions() && z.DecExt(yyv521) { + } else if !yym522 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv521) } else { - z.DecFallback(yyv518, false) + z.DecFallback(yyv521, false) } } case "fileCheckFrequency": if r.TryDecodeAsNil() { x.FileCheckFrequency = pkg1_unversioned.Duration{} } else { - yyv520 := &x.FileCheckFrequency - yym521 := z.DecBinary() - _ = yym521 + yyv523 := &x.FileCheckFrequency + yym524 := z.DecBinary() + _ = yym524 if false { - } else if z.HasExtensions() && z.DecExt(yyv520) { - } else if !yym521 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv520) + } else if z.HasExtensions() && z.DecExt(yyv523) { + } else if !yym524 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv523) } else { - z.DecFallback(yyv520, false) + z.DecFallback(yyv523, false) } } case "httpCheckFrequency": if r.TryDecodeAsNil() { x.HTTPCheckFrequency = pkg1_unversioned.Duration{} } else { - yyv522 := &x.HTTPCheckFrequency - yym523 := z.DecBinary() - _ = yym523 + yyv525 := &x.HTTPCheckFrequency + yym526 := z.DecBinary() + _ = yym526 if false { - } else if z.HasExtensions() && z.DecExt(yyv522) { - } else if !yym523 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv522) + } else if z.HasExtensions() && z.DecExt(yyv525) { + } else if !yym526 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv525) } else { - z.DecFallback(yyv522, false) + z.DecFallback(yyv525, false) } } case "manifestURL": @@ -4033,15 +4059,15 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Authentication = KubeletAuthentication{} } else { - yyv533 := &x.Authentication - yyv533.CodecDecodeSelf(d) + yyv536 := &x.Authentication + yyv536.CodecDecodeSelf(d) } case "authorization": if r.TryDecodeAsNil() { x.Authorization = KubeletAuthorization{} } else { - yyv534 := &x.Authorization - yyv534.CodecDecodeSelf(d) + yyv537 := &x.Authorization + yyv537.CodecDecodeSelf(d) } case "hostnameOverride": if r.TryDecodeAsNil() { @@ -4083,36 +4109,36 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.HostNetworkSources = nil } else { - yyv541 := &x.HostNetworkSources - yym542 := z.DecBinary() - _ = yym542 + yyv544 := &x.HostNetworkSources + yym545 := z.DecBinary() + _ = yym545 if false { } else { - z.F.DecSliceStringX(yyv541, false, d) + z.F.DecSliceStringX(yyv544, false, d) } } case "hostPIDSources": if r.TryDecodeAsNil() { x.HostPIDSources = nil } else { - yyv543 := &x.HostPIDSources - yym544 := z.DecBinary() - _ = yym544 + yyv546 := &x.HostPIDSources + yym547 := z.DecBinary() + _ = yym547 if false { } else { - z.F.DecSliceStringX(yyv543, false, d) + z.F.DecSliceStringX(yyv546, false, d) } } case "hostIPCSources": if r.TryDecodeAsNil() { x.HostIPCSources = nil } else { - yyv545 := &x.HostIPCSources - yym546 := z.DecBinary() - _ = yym546 + yyv548 := &x.HostIPCSources + yym549 := z.DecBinary() + _ = yym549 if false { } else { - z.F.DecSliceStringX(yyv545, false, d) + z.F.DecSliceStringX(yyv548, false, d) } } case "registryPullQPS": @@ -4149,15 +4175,15 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.MinimumGCAge = pkg1_unversioned.Duration{} } else { - yyv552 := &x.MinimumGCAge - yym553 := z.DecBinary() - _ = yym553 + yyv555 := &x.MinimumGCAge + yym556 := z.DecBinary() + _ = yym556 if false { - } else if z.HasExtensions() && z.DecExt(yyv552) { - } else if !yym553 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv552) + } else if z.HasExtensions() && z.DecExt(yyv555) { + } else if !yym556 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv555) } else { - z.DecFallback(yyv552, false) + z.DecFallback(yyv555, false) } } case "maxPerPodContainerCount": @@ -4224,45 +4250,45 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.StreamingConnectionIdleTimeout = pkg1_unversioned.Duration{} } else { - yyv564 := &x.StreamingConnectionIdleTimeout - yym565 := z.DecBinary() - _ = yym565 + yyv567 := &x.StreamingConnectionIdleTimeout + yym568 := z.DecBinary() + _ = yym568 if false { - } else if z.HasExtensions() && z.DecExt(yyv564) { - } else if !yym565 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv564) + } else if z.HasExtensions() && z.DecExt(yyv567) { + } else if !yym568 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv567) } else { - z.DecFallback(yyv564, false) + z.DecFallback(yyv567, false) } } case "nodeStatusUpdateFrequency": if r.TryDecodeAsNil() { x.NodeStatusUpdateFrequency = pkg1_unversioned.Duration{} } else { - yyv566 := &x.NodeStatusUpdateFrequency - yym567 := z.DecBinary() - _ = yym567 + yyv569 := &x.NodeStatusUpdateFrequency + yym570 := z.DecBinary() + _ = yym570 if false { - } else if z.HasExtensions() && z.DecExt(yyv566) { - } else if !yym567 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv566) + } else if z.HasExtensions() && z.DecExt(yyv569) { + } else if !yym570 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv569) } else { - z.DecFallback(yyv566, false) + z.DecFallback(yyv569, false) } } case "imageMinimumGCAge": if r.TryDecodeAsNil() { x.ImageMinimumGCAge = pkg1_unversioned.Duration{} } else { - yyv568 := &x.ImageMinimumGCAge - yym569 := z.DecBinary() - _ = yym569 + yyv571 := &x.ImageMinimumGCAge + yym572 := z.DecBinary() + _ = yym572 if false { - } else if z.HasExtensions() && z.DecExt(yyv568) { - } else if !yym569 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv568) + } else if z.HasExtensions() && z.DecExt(yyv571) { + } else if !yym572 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv571) } else { - z.DecFallback(yyv568, false) + z.DecFallback(yyv571, false) } } case "imageGCHighThresholdPercent": @@ -4287,15 +4313,15 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.VolumeStatsAggPeriod = pkg1_unversioned.Duration{} } else { - yyv573 := &x.VolumeStatsAggPeriod - yym574 := z.DecBinary() - _ = yym574 + yyv576 := &x.VolumeStatsAggPeriod + yym577 := z.DecBinary() + _ = yym577 if false { - } else if z.HasExtensions() && z.DecExt(yyv573) { - } else if !yym574 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv573) + } else if z.HasExtensions() && z.DecExt(yyv576) { + } else if !yym577 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv576) } else { - z.DecFallback(yyv573, false) + z.DecFallback(yyv576, false) } } case "networkPluginName": @@ -4352,11 +4378,11 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode } else { x.KubeletCgroups = string(r.DecodeString()) } - case "cgroupsPerQOS": + case "experimentalCgroupsPerQOS": if r.TryDecodeAsNil() { - x.CgroupsPerQOS = false + x.ExperimentalCgroupsPerQOS = false } else { - x.CgroupsPerQOS = bool(r.DecodeBool()) + x.ExperimentalCgroupsPerQOS = bool(r.DecodeBool()) } case "cgroupDriver": if r.TryDecodeAsNil() { @@ -4404,15 +4430,15 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.RuntimeRequestTimeout = pkg1_unversioned.Duration{} } else { - yyv592 := &x.RuntimeRequestTimeout - yym593 := z.DecBinary() - _ = yym593 + yyv595 := &x.RuntimeRequestTimeout + yym596 := z.DecBinary() + _ = yym596 if false { - } else if z.HasExtensions() && z.DecExt(yyv592) { - } else if !yym593 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv592) + } else if z.HasExtensions() && z.DecExt(yyv595) { + } else if !yym596 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv595) } else { - z.DecFallback(yyv592, false) + z.DecFallback(yyv595, false) } } case "rktPath": @@ -4551,15 +4577,15 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.OutOfDiskTransitionFrequency = pkg1_unversioned.Duration{} } else { - yyv616 := &x.OutOfDiskTransitionFrequency - yym617 := z.DecBinary() - _ = yym617 + yyv619 := &x.OutOfDiskTransitionFrequency + yym620 := z.DecBinary() + _ = yym620 if false { - } else if z.HasExtensions() && z.DecExt(yyv616) { - } else if !yym617 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv616) + } else if z.HasExtensions() && z.DecExt(yyv619) { + } else if !yym620 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv619) } else { - z.DecFallback(yyv616, false) + z.DecFallback(yyv619, false) } } case "nodeIP": @@ -4572,12 +4598,12 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.NodeLabels = nil } else { - yyv619 := &x.NodeLabels - yym620 := z.DecBinary() - _ = yym620 + yyv622 := &x.NodeLabels + yym623 := z.DecBinary() + _ = yym623 if false { } else { - z.F.DecMapStringStringX(yyv619, false, d) + z.F.DecMapStringStringX(yyv622, false, d) } } case "nonMasqueradeCIDR": @@ -4614,15 +4640,15 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.EvictionPressureTransitionPeriod = pkg1_unversioned.Duration{} } else { - yyv626 := &x.EvictionPressureTransitionPeriod - yym627 := z.DecBinary() - _ = yym627 + yyv629 := &x.EvictionPressureTransitionPeriod + yym630 := z.DecBinary() + _ = yym630 if false { - } else if z.HasExtensions() && z.DecExt(yyv626) { - } else if !yym627 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv626) + } else if z.HasExtensions() && z.DecExt(yyv629) { + } else if !yym630 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv629) } else { - z.DecFallback(yyv626, false) + z.DecFallback(yyv629, false) } } case "evictionMaxPodGracePeriod": @@ -4653,26 +4679,26 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.SystemReserved = nil } else { - yyv632 := &x.SystemReserved - yym633 := z.DecBinary() - _ = yym633 + yyv635 := &x.SystemReserved + yym636 := z.DecBinary() + _ = yym636 if false { - } else if z.HasExtensions() && z.DecExt(yyv632) { + } else if z.HasExtensions() && z.DecExt(yyv635) { } else { - h.decconfig_ConfigurationMap((*pkg2_config.ConfigurationMap)(yyv632), d) + h.decconfig_ConfigurationMap((*pkg2_config.ConfigurationMap)(yyv635), d) } } case "kubeReserved": if r.TryDecodeAsNil() { x.KubeReserved = nil } else { - yyv634 := &x.KubeReserved - yym635 := z.DecBinary() - _ = yym635 + yyv637 := &x.KubeReserved + yym638 := z.DecBinary() + _ = yym638 if false { - } else if z.HasExtensions() && z.DecExt(yyv634) { + } else if z.HasExtensions() && z.DecExt(yyv637) { } else { - h.decconfig_ConfigurationMap((*pkg2_config.ConfigurationMap)(yyv634), d) + h.decconfig_ConfigurationMap((*pkg2_config.ConfigurationMap)(yyv637), d) } } case "protectKernelDefaults": @@ -4703,12 +4729,12 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.AllowedUnsafeSysctls = nil } else { - yyv640 := &x.AllowedUnsafeSysctls - yym641 := z.DecBinary() - _ = yym641 + yyv643 := &x.AllowedUnsafeSysctls + yym644 := z.DecBinary() + _ = yym644 if false { } else { - z.F.DecSliceStringX(yyv640, false, d) + z.F.DecSliceStringX(yyv643, false, d) } } case "featureGates": @@ -4729,10 +4755,16 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode } else { x.ExperimentalFailSwapOn = bool(r.DecodeBool()) } + case "ExperimentalCheckNodeCapabilitiesBeforeMount": + if r.TryDecodeAsNil() { + x.ExperimentalCheckNodeCapabilitiesBeforeMount = false + } else { + x.ExperimentalCheckNodeCapabilitiesBeforeMount = bool(r.DecodeBool()) + } default: - z.DecStructFieldNotFound(-1, yys514) - } // end switch yys514 - } // end for yyj514 + z.DecStructFieldNotFound(-1, yys517) + } // end switch yys517 + } // end for yyj517 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -4740,16 +4772,16 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj645 int - var yyb645 bool - var yyhl645 bool = l >= 0 - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + var yyj649 int + var yyb649 bool + var yyhl649 bool = l >= 0 + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4759,13 +4791,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.Kind = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4775,13 +4807,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.APIVersion = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4791,13 +4823,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.PodManifestPath = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4805,57 +4837,7 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.SyncFrequency = pkg1_unversioned.Duration{} } else { - yyv649 := &x.SyncFrequency - yym650 := z.DecBinary() - _ = yym650 - if false { - } else if z.HasExtensions() && z.DecExt(yyv649) { - } else if !yym650 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv649) - } else { - z.DecFallback(yyv649, false) - } - } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l - } else { - yyb645 = r.CheckBreak() - } - if yyb645 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.FileCheckFrequency = pkg1_unversioned.Duration{} - } else { - yyv651 := &x.FileCheckFrequency - yym652 := z.DecBinary() - _ = yym652 - if false { - } else if z.HasExtensions() && z.DecExt(yyv651) { - } else if !yym652 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv651) - } else { - z.DecFallback(yyv651, false) - } - } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l - } else { - yyb645 = r.CheckBreak() - } - if yyb645 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HTTPCheckFrequency = pkg1_unversioned.Duration{} - } else { - yyv653 := &x.HTTPCheckFrequency + yyv653 := &x.SyncFrequency yym654 := z.DecBinary() _ = yym654 if false { @@ -4866,13 +4848,63 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco z.DecFallback(yyv653, false) } } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.FileCheckFrequency = pkg1_unversioned.Duration{} + } else { + yyv655 := &x.FileCheckFrequency + yym656 := z.DecBinary() + _ = yym656 + if false { + } else if z.HasExtensions() && z.DecExt(yyv655) { + } else if !yym656 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv655) + } else { + z.DecFallback(yyv655, false) + } + } + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l + } else { + yyb649 = r.CheckBreak() + } + if yyb649 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HTTPCheckFrequency = pkg1_unversioned.Duration{} + } else { + yyv657 := &x.HTTPCheckFrequency + yym658 := z.DecBinary() + _ = yym658 + if false { + } else if z.HasExtensions() && z.DecExt(yyv657) { + } else if !yym658 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv657) + } else { + z.DecFallback(yyv657, false) + } + } + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l + } else { + yyb649 = r.CheckBreak() + } + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4882,13 +4914,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ManifestURL = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4898,13 +4930,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ManifestURLHeader = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4914,13 +4946,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EnableServer = bool(r.DecodeBool()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4930,13 +4962,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.Address = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4946,13 +4978,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.Port = int32(r.DecodeInt(32)) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4962,13 +4994,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ReadOnlyPort = int32(r.DecodeInt(32)) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4978,13 +5010,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.TLSCertFile = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4994,13 +5026,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.TLSPrivateKeyFile = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5010,13 +5042,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CertDirectory = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5024,16 +5056,16 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.Authentication = KubeletAuthentication{} } else { - yyv664 := &x.Authentication - yyv664.CodecDecodeSelf(d) + yyv668 := &x.Authentication + yyv668.CodecDecodeSelf(d) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5041,16 +5073,16 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.Authorization = KubeletAuthorization{} } else { - yyv665 := &x.Authorization - yyv665.CodecDecodeSelf(d) + yyv669 := &x.Authorization + yyv669.CodecDecodeSelf(d) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5060,13 +5092,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.HostnameOverride = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5076,13 +5108,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.PodInfraContainerImage = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5092,13 +5124,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.DockerEndpoint = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5108,13 +5140,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RootDirectory = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5124,13 +5156,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.SeccompProfileRoot = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5140,13 +5172,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.AllowPrivileged = bool(r.DecodeBool()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5154,51 +5186,7 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.HostNetworkSources = nil } else { - yyv672 := &x.HostNetworkSources - yym673 := z.DecBinary() - _ = yym673 - if false { - } else { - z.F.DecSliceStringX(yyv672, false, d) - } - } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l - } else { - yyb645 = r.CheckBreak() - } - if yyb645 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HostPIDSources = nil - } else { - yyv674 := &x.HostPIDSources - yym675 := z.DecBinary() - _ = yym675 - if false { - } else { - z.F.DecSliceStringX(yyv674, false, d) - } - } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l - } else { - yyb645 = r.CheckBreak() - } - if yyb645 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HostIPCSources = nil - } else { - yyv676 := &x.HostIPCSources + yyv676 := &x.HostNetworkSources yym677 := z.DecBinary() _ = yym677 if false { @@ -5206,13 +5194,57 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco z.F.DecSliceStringX(yyv676, false, d) } } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HostPIDSources = nil + } else { + yyv678 := &x.HostPIDSources + yym679 := z.DecBinary() + _ = yym679 + if false { + } else { + z.F.DecSliceStringX(yyv678, false, d) + } + } + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l + } else { + yyb649 = r.CheckBreak() + } + if yyb649 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HostIPCSources = nil + } else { + yyv680 := &x.HostIPCSources + yym681 := z.DecBinary() + _ = yym681 + if false { + } else { + z.F.DecSliceStringX(yyv680, false, d) + } + } + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l + } else { + yyb649 = r.CheckBreak() + } + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5222,13 +5254,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RegistryPullQPS = int32(r.DecodeInt(32)) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5238,13 +5270,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RegistryBurst = int32(r.DecodeInt(32)) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5254,13 +5286,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EventRecordQPS = int32(r.DecodeInt(32)) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5270,13 +5302,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EventBurst = int32(r.DecodeInt(32)) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5286,13 +5318,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EnableDebuggingHandlers = bool(r.DecodeBool()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5300,24 +5332,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.MinimumGCAge = pkg1_unversioned.Duration{} } else { - yyv683 := &x.MinimumGCAge - yym684 := z.DecBinary() - _ = yym684 + yyv687 := &x.MinimumGCAge + yym688 := z.DecBinary() + _ = yym688 if false { - } else if z.HasExtensions() && z.DecExt(yyv683) { - } else if !yym684 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv683) + } else if z.HasExtensions() && z.DecExt(yyv687) { + } else if !yym688 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv687) } else { - z.DecFallback(yyv683, false) + z.DecFallback(yyv687, false) } } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5327,13 +5359,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.MaxPerPodContainerCount = int32(r.DecodeInt(32)) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5343,13 +5375,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.MaxContainerCount = int32(r.DecodeInt(32)) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5359,13 +5391,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CAdvisorPort = int32(r.DecodeInt(32)) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5375,13 +5407,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.HealthzPort = int32(r.DecodeInt(32)) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5391,13 +5423,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.HealthzBindAddress = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5407,13 +5439,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.OOMScoreAdj = int32(r.DecodeInt(32)) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5423,13 +5455,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RegisterNode = bool(r.DecodeBool()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5439,13 +5471,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ClusterDomain = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5455,13 +5487,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.MasterServiceNamespace = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5471,13 +5503,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ClusterDNS = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5485,57 +5517,7 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.StreamingConnectionIdleTimeout = pkg1_unversioned.Duration{} } else { - yyv695 := &x.StreamingConnectionIdleTimeout - yym696 := z.DecBinary() - _ = yym696 - if false { - } else if z.HasExtensions() && z.DecExt(yyv695) { - } else if !yym696 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv695) - } else { - z.DecFallback(yyv695, false) - } - } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l - } else { - yyb645 = r.CheckBreak() - } - if yyb645 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.NodeStatusUpdateFrequency = pkg1_unversioned.Duration{} - } else { - yyv697 := &x.NodeStatusUpdateFrequency - yym698 := z.DecBinary() - _ = yym698 - if false { - } else if z.HasExtensions() && z.DecExt(yyv697) { - } else if !yym698 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv697) - } else { - z.DecFallback(yyv697, false) - } - } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l - } else { - yyb645 = r.CheckBreak() - } - if yyb645 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ImageMinimumGCAge = pkg1_unversioned.Duration{} - } else { - yyv699 := &x.ImageMinimumGCAge + yyv699 := &x.StreamingConnectionIdleTimeout yym700 := z.DecBinary() _ = yym700 if false { @@ -5546,13 +5528,63 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco z.DecFallback(yyv699, false) } } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.NodeStatusUpdateFrequency = pkg1_unversioned.Duration{} + } else { + yyv701 := &x.NodeStatusUpdateFrequency + yym702 := z.DecBinary() + _ = yym702 + if false { + } else if z.HasExtensions() && z.DecExt(yyv701) { + } else if !yym702 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv701) + } else { + z.DecFallback(yyv701, false) + } + } + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l + } else { + yyb649 = r.CheckBreak() + } + if yyb649 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ImageMinimumGCAge = pkg1_unversioned.Duration{} + } else { + yyv703 := &x.ImageMinimumGCAge + yym704 := z.DecBinary() + _ = yym704 + if false { + } else if z.HasExtensions() && z.DecExt(yyv703) { + } else if !yym704 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv703) + } else { + z.DecFallback(yyv703, false) + } + } + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l + } else { + yyb649 = r.CheckBreak() + } + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5562,13 +5594,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ImageGCHighThresholdPercent = int32(r.DecodeInt(32)) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5578,13 +5610,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ImageGCLowThresholdPercent = int32(r.DecodeInt(32)) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5594,13 +5626,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.LowDiskSpaceThresholdMB = int32(r.DecodeInt(32)) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5608,24 +5640,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.VolumeStatsAggPeriod = pkg1_unversioned.Duration{} } else { - yyv704 := &x.VolumeStatsAggPeriod - yym705 := z.DecBinary() - _ = yym705 + yyv708 := &x.VolumeStatsAggPeriod + yym709 := z.DecBinary() + _ = yym709 if false { - } else if z.HasExtensions() && z.DecExt(yyv704) { - } else if !yym705 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv704) + } else if z.HasExtensions() && z.DecExt(yyv708) { + } else if !yym709 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv708) } else { - z.DecFallback(yyv704, false) + z.DecFallback(yyv708, false) } } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5635,13 +5667,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.NetworkPluginName = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5651,13 +5683,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.NetworkPluginMTU = int32(r.DecodeInt(32)) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5667,13 +5699,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.NetworkPluginDir = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5683,13 +5715,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CNIConfDir = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5699,13 +5731,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CNIBinDir = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5715,13 +5747,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.VolumePluginDir = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5731,13 +5763,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CloudProvider = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5747,13 +5779,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CloudConfigFile = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5763,29 +5795,29 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.KubeletCgroups = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.CgroupsPerQOS = false + x.ExperimentalCgroupsPerQOS = false } else { - x.CgroupsPerQOS = bool(r.DecodeBool()) + x.ExperimentalCgroupsPerQOS = bool(r.DecodeBool()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5795,13 +5827,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CgroupDriver = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5811,13 +5843,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RuntimeCgroups = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5827,13 +5859,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.SystemCgroups = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5843,13 +5875,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CgroupRoot = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5859,13 +5891,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ContainerRuntime = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5875,13 +5907,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RemoteRuntimeEndpoint = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5891,13 +5923,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RemoteImageEndpoint = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5905,24 +5937,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.RuntimeRequestTimeout = pkg1_unversioned.Duration{} } else { - yyv723 := &x.RuntimeRequestTimeout - yym724 := z.DecBinary() - _ = yym724 + yyv727 := &x.RuntimeRequestTimeout + yym728 := z.DecBinary() + _ = yym728 if false { - } else if z.HasExtensions() && z.DecExt(yyv723) { - } else if !yym724 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv723) + } else if z.HasExtensions() && z.DecExt(yyv727) { + } else if !yym728 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv727) } else { - z.DecFallback(yyv723, false) + z.DecFallback(yyv727, false) } } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5932,13 +5964,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RktPath = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5948,13 +5980,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ExperimentalMounterPath = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5964,13 +5996,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RktAPIEndpoint = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5980,13 +6012,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RktStage1Image = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5996,13 +6028,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.LockFilePath = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6012,13 +6044,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ExitOnLockContention = bool(r.DecodeBool()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6028,13 +6060,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.HairpinMode = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6044,13 +6076,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.BabysitDaemons = bool(r.DecodeBool()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6060,13 +6092,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.MaxPods = int32(r.DecodeInt(32)) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6076,13 +6108,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.NvidiaGPUs = int32(r.DecodeInt(32)) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6092,13 +6124,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.DockerExecHandlerName = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6108,13 +6140,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.PodCIDR = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6124,13 +6156,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ResolverConfig = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6140,13 +6172,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CPUCFSQuota = bool(r.DecodeBool()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6156,13 +6188,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.Containerized = bool(r.DecodeBool()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6172,13 +6204,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.MaxOpenFiles = int64(r.DecodeInt(64)) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6188,13 +6220,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ReconcileCIDR = bool(r.DecodeBool()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6204,13 +6236,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RegisterSchedulable = bool(r.DecodeBool()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6220,13 +6252,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ContentType = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6236,13 +6268,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.KubeAPIQPS = int32(r.DecodeInt(32)) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6252,13 +6284,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.KubeAPIBurst = int32(r.DecodeInt(32)) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6268,13 +6300,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.SerializeImagePulls = bool(r.DecodeBool()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6282,24 +6314,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.OutOfDiskTransitionFrequency = pkg1_unversioned.Duration{} } else { - yyv747 := &x.OutOfDiskTransitionFrequency - yym748 := z.DecBinary() - _ = yym748 + yyv751 := &x.OutOfDiskTransitionFrequency + yym752 := z.DecBinary() + _ = yym752 if false { - } else if z.HasExtensions() && z.DecExt(yyv747) { - } else if !yym748 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv747) + } else if z.HasExtensions() && z.DecExt(yyv751) { + } else if !yym752 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv751) } else { - z.DecFallback(yyv747, false) + z.DecFallback(yyv751, false) } } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6309,13 +6341,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.NodeIP = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6323,21 +6355,21 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.NodeLabels = nil } else { - yyv750 := &x.NodeLabels - yym751 := z.DecBinary() - _ = yym751 + yyv754 := &x.NodeLabels + yym755 := z.DecBinary() + _ = yym755 if false { } else { - z.F.DecMapStringStringX(yyv750, false, d) + z.F.DecMapStringStringX(yyv754, false, d) } } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6347,13 +6379,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.NonMasqueradeCIDR = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6363,13 +6395,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EnableCustomMetrics = bool(r.DecodeBool()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6379,13 +6411,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EvictionHard = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6395,13 +6427,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EvictionSoft = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6411,13 +6443,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EvictionSoftGracePeriod = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6425,24 +6457,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.EvictionPressureTransitionPeriod = pkg1_unversioned.Duration{} } else { - yyv757 := &x.EvictionPressureTransitionPeriod - yym758 := z.DecBinary() - _ = yym758 + yyv761 := &x.EvictionPressureTransitionPeriod + yym762 := z.DecBinary() + _ = yym762 if false { - } else if z.HasExtensions() && z.DecExt(yyv757) { - } else if !yym758 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv757) + } else if z.HasExtensions() && z.DecExt(yyv761) { + } else if !yym762 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv761) } else { - z.DecFallback(yyv757, false) + z.DecFallback(yyv761, false) } } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6452,13 +6484,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EvictionMaxPodGracePeriod = int32(r.DecodeInt(32)) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6468,13 +6500,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EvictionMinimumReclaim = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6484,13 +6516,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.PodsPerCore = int32(r.DecodeInt(32)) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6500,13 +6532,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EnableControllerAttachDetach = bool(r.DecodeBool()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6514,22 +6546,22 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.SystemReserved = nil } else { - yyv763 := &x.SystemReserved - yym764 := z.DecBinary() - _ = yym764 + yyv767 := &x.SystemReserved + yym768 := z.DecBinary() + _ = yym768 if false { - } else if z.HasExtensions() && z.DecExt(yyv763) { + } else if z.HasExtensions() && z.DecExt(yyv767) { } else { - h.decconfig_ConfigurationMap((*pkg2_config.ConfigurationMap)(yyv763), d) + h.decconfig_ConfigurationMap((*pkg2_config.ConfigurationMap)(yyv767), d) } } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6537,22 +6569,22 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.KubeReserved = nil } else { - yyv765 := &x.KubeReserved - yym766 := z.DecBinary() - _ = yym766 + yyv769 := &x.KubeReserved + yym770 := z.DecBinary() + _ = yym770 if false { - } else if z.HasExtensions() && z.DecExt(yyv765) { + } else if z.HasExtensions() && z.DecExt(yyv769) { } else { - h.decconfig_ConfigurationMap((*pkg2_config.ConfigurationMap)(yyv765), d) + h.decconfig_ConfigurationMap((*pkg2_config.ConfigurationMap)(yyv769), d) } } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6562,13 +6594,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ProtectKernelDefaults = bool(r.DecodeBool()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6578,13 +6610,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.MakeIPTablesUtilChains = bool(r.DecodeBool()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6594,13 +6626,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.IPTablesMasqueradeBit = int32(r.DecodeInt(32)) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6610,13 +6642,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.IPTablesDropBit = int32(r.DecodeInt(32)) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6624,21 +6656,21 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.AllowedUnsafeSysctls = nil } else { - yyv771 := &x.AllowedUnsafeSysctls - yym772 := z.DecBinary() - _ = yym772 + yyv775 := &x.AllowedUnsafeSysctls + yym776 := z.DecBinary() + _ = yym776 if false { } else { - z.F.DecSliceStringX(yyv771, false, d) + z.F.DecSliceStringX(yyv775, false, d) } } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6648,13 +6680,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.FeatureGates = string(r.DecodeString()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6664,13 +6696,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EnableCRI = bool(r.DecodeBool()) } - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6680,18 +6712,34 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ExperimentalFailSwapOn = bool(r.DecodeBool()) } + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l + } else { + yyb649 = r.CheckBreak() + } + if yyb649 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ExperimentalCheckNodeCapabilitiesBeforeMount = false + } else { + x.ExperimentalCheckNodeCapabilitiesBeforeMount = bool(r.DecodeBool()) + } for { - yyj645++ - if yyhl645 { - yyb645 = yyj645 > l + yyj649++ + if yyhl649 { + yyb649 = yyj649 > l } else { - yyb645 = r.CheckBreak() + yyb649 = r.CheckBreak() } - if yyb645 { + if yyb649 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj645-1, "") + z.DecStructFieldNotFound(yyj649-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -6700,8 +6748,8 @@ func (x KubeletAuthorizationMode) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym776 := z.EncBinary() - _ = yym776 + yym781 := z.EncBinary() + _ = yym781 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -6713,8 +6761,8 @@ func (x *KubeletAuthorizationMode) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym777 := z.DecBinary() - _ = yym777 + yym782 := z.DecBinary() + _ = yym782 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -6729,30 +6777,30 @@ func (x *KubeletAuthorization) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym778 := z.EncBinary() - _ = yym778 + yym783 := z.EncBinary() + _ = yym783 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep779 := !z.EncBinary() - yy2arr779 := z.EncBasicHandle().StructToArray - var yyq779 [2]bool - _, _, _ = yysep779, yyq779, yy2arr779 - const yyr779 bool = false - var yynn779 int - if yyr779 || yy2arr779 { + yysep784 := !z.EncBinary() + yy2arr784 := z.EncBasicHandle().StructToArray + var yyq784 [2]bool + _, _, _ = yysep784, yyq784, yy2arr784 + const yyr784 bool = false + var yynn784 int + if yyr784 || yy2arr784 { r.EncodeArrayStart(2) } else { - yynn779 = 2 - for _, b := range yyq779 { + yynn784 = 2 + for _, b := range yyq784 { if b { - yynn779++ + yynn784++ } } - r.EncodeMapStart(yynn779) - yynn779 = 0 + r.EncodeMapStart(yynn784) + yynn784 = 0 } - if yyr779 || yy2arr779 { + if yyr784 || yy2arr784 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Mode.CodecEncodeSelf(e) } else { @@ -6761,18 +6809,18 @@ func (x *KubeletAuthorization) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Mode.CodecEncodeSelf(e) } - if yyr779 || yy2arr779 { + if yyr784 || yy2arr784 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy782 := &x.Webhook - yy782.CodecEncodeSelf(e) + yy787 := &x.Webhook + yy787.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("webhook")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy783 := &x.Webhook - yy783.CodecEncodeSelf(e) + yy788 := &x.Webhook + yy788.CodecEncodeSelf(e) } - if yyr779 || yy2arr779 { + if yyr784 || yy2arr784 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -6785,25 +6833,25 @@ func (x *KubeletAuthorization) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym784 := z.DecBinary() - _ = yym784 + yym789 := z.DecBinary() + _ = yym789 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct785 := r.ContainerType() - if yyct785 == codecSelferValueTypeMap1234 { - yyl785 := r.ReadMapStart() - if yyl785 == 0 { + yyct790 := r.ContainerType() + if yyct790 == codecSelferValueTypeMap1234 { + yyl790 := r.ReadMapStart() + if yyl790 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl785, d) + x.codecDecodeSelfFromMap(yyl790, d) } - } else if yyct785 == codecSelferValueTypeArray1234 { - yyl785 := r.ReadArrayStart() - if yyl785 == 0 { + } else if yyct790 == codecSelferValueTypeArray1234 { + yyl790 := r.ReadArrayStart() + if yyl790 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl785, d) + x.codecDecodeSelfFromArray(yyl790, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -6815,12 +6863,12 @@ func (x *KubeletAuthorization) codecDecodeSelfFromMap(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys786Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys786Slc - var yyhl786 bool = l >= 0 - for yyj786 := 0; ; yyj786++ { - if yyhl786 { - if yyj786 >= l { + var yys791Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys791Slc + var yyhl791 bool = l >= 0 + for yyj791 := 0; ; yyj791++ { + if yyhl791 { + if yyj791 >= l { break } } else { @@ -6829,10 +6877,10 @@ func (x *KubeletAuthorization) codecDecodeSelfFromMap(l int, d *codec1978.Decode } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys786Slc = r.DecodeBytes(yys786Slc, true, true) - yys786 := string(yys786Slc) + yys791Slc = r.DecodeBytes(yys791Slc, true, true) + yys791 := string(yys791Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys786 { + switch yys791 { case "mode": if r.TryDecodeAsNil() { x.Mode = "" @@ -6843,13 +6891,13 @@ func (x *KubeletAuthorization) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Webhook = KubeletWebhookAuthorization{} } else { - yyv788 := &x.Webhook - yyv788.CodecDecodeSelf(d) + yyv793 := &x.Webhook + yyv793.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys786) - } // end switch yys786 - } // end for yyj786 + z.DecStructFieldNotFound(-1, yys791) + } // end switch yys791 + } // end for yyj791 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -6857,16 +6905,16 @@ func (x *KubeletAuthorization) codecDecodeSelfFromArray(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj789 int - var yyb789 bool - var yyhl789 bool = l >= 0 - yyj789++ - if yyhl789 { - yyb789 = yyj789 > l + var yyj794 int + var yyb794 bool + var yyhl794 bool = l >= 0 + yyj794++ + if yyhl794 { + yyb794 = yyj794 > l } else { - yyb789 = r.CheckBreak() + yyb794 = r.CheckBreak() } - if yyb789 { + if yyb794 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6876,13 +6924,13 @@ func (x *KubeletAuthorization) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.Mode = KubeletAuthorizationMode(r.DecodeString()) } - yyj789++ - if yyhl789 { - yyb789 = yyj789 > l + yyj794++ + if yyhl794 { + yyb794 = yyj794 > l } else { - yyb789 = r.CheckBreak() + yyb794 = r.CheckBreak() } - if yyb789 { + if yyb794 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6890,21 +6938,21 @@ func (x *KubeletAuthorization) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.Webhook = KubeletWebhookAuthorization{} } else { - yyv791 := &x.Webhook - yyv791.CodecDecodeSelf(d) + yyv796 := &x.Webhook + yyv796.CodecDecodeSelf(d) } for { - yyj789++ - if yyhl789 { - yyb789 = yyj789 > l + yyj794++ + if yyhl794 { + yyb794 = yyj794 > l } else { - yyb789 = r.CheckBreak() + yyb794 = r.CheckBreak() } - if yyb789 { + if yyb794 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj789-1, "") + z.DecStructFieldNotFound(yyj794-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -6916,59 +6964,32 @@ func (x *KubeletWebhookAuthorization) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym792 := z.EncBinary() - _ = yym792 + yym797 := z.EncBinary() + _ = yym797 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep793 := !z.EncBinary() - yy2arr793 := z.EncBasicHandle().StructToArray - var yyq793 [2]bool - _, _, _ = yysep793, yyq793, yy2arr793 - const yyr793 bool = false - var yynn793 int - if yyr793 || yy2arr793 { + yysep798 := !z.EncBinary() + yy2arr798 := z.EncBasicHandle().StructToArray + var yyq798 [2]bool + _, _, _ = yysep798, yyq798, yy2arr798 + const yyr798 bool = false + var yynn798 int + if yyr798 || yy2arr798 { r.EncodeArrayStart(2) } else { - yynn793 = 2 - for _, b := range yyq793 { + yynn798 = 2 + for _, b := range yyq798 { if b { - yynn793++ + yynn798++ } } - r.EncodeMapStart(yynn793) - yynn793 = 0 + r.EncodeMapStart(yynn798) + yynn798 = 0 } - if yyr793 || yy2arr793 { + if yyr798 || yy2arr798 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy795 := &x.CacheAuthorizedTTL - yym796 := z.EncBinary() - _ = yym796 - if false { - } else if z.HasExtensions() && z.EncExt(yy795) { - } else if !yym796 && z.IsJSONHandle() { - z.EncJSONMarshal(yy795) - } else { - z.EncFallback(yy795) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("cacheAuthorizedTTL")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy797 := &x.CacheAuthorizedTTL - yym798 := z.EncBinary() - _ = yym798 - if false { - } else if z.HasExtensions() && z.EncExt(yy797) { - } else if !yym798 && z.IsJSONHandle() { - z.EncJSONMarshal(yy797) - } else { - z.EncFallback(yy797) - } - } - if yyr793 || yy2arr793 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy800 := &x.CacheUnauthorizedTTL + yy800 := &x.CacheAuthorizedTTL yym801 := z.EncBinary() _ = yym801 if false { @@ -6980,9 +7001,9 @@ func (x *KubeletWebhookAuthorization) CodecEncodeSelf(e *codec1978.Encoder) { } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("cacheUnauthorizedTTL")) + r.EncodeString(codecSelferC_UTF81234, string("cacheAuthorizedTTL")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy802 := &x.CacheUnauthorizedTTL + yy802 := &x.CacheAuthorizedTTL yym803 := z.EncBinary() _ = yym803 if false { @@ -6993,7 +7014,34 @@ func (x *KubeletWebhookAuthorization) CodecEncodeSelf(e *codec1978.Encoder) { z.EncFallback(yy802) } } - if yyr793 || yy2arr793 { + if yyr798 || yy2arr798 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy805 := &x.CacheUnauthorizedTTL + yym806 := z.EncBinary() + _ = yym806 + if false { + } else if z.HasExtensions() && z.EncExt(yy805) { + } else if !yym806 && z.IsJSONHandle() { + z.EncJSONMarshal(yy805) + } else { + z.EncFallback(yy805) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("cacheUnauthorizedTTL")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy807 := &x.CacheUnauthorizedTTL + yym808 := z.EncBinary() + _ = yym808 + if false { + } else if z.HasExtensions() && z.EncExt(yy807) { + } else if !yym808 && z.IsJSONHandle() { + z.EncJSONMarshal(yy807) + } else { + z.EncFallback(yy807) + } + } + if yyr798 || yy2arr798 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -7006,25 +7054,25 @@ func (x *KubeletWebhookAuthorization) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym804 := z.DecBinary() - _ = yym804 + yym809 := z.DecBinary() + _ = yym809 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct805 := r.ContainerType() - if yyct805 == codecSelferValueTypeMap1234 { - yyl805 := r.ReadMapStart() - if yyl805 == 0 { + yyct810 := r.ContainerType() + if yyct810 == codecSelferValueTypeMap1234 { + yyl810 := r.ReadMapStart() + if yyl810 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl805, d) + x.codecDecodeSelfFromMap(yyl810, d) } - } else if yyct805 == codecSelferValueTypeArray1234 { - yyl805 := r.ReadArrayStart() - if yyl805 == 0 { + } else if yyct810 == codecSelferValueTypeArray1234 { + yyl810 := r.ReadArrayStart() + if yyl810 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl805, d) + x.codecDecodeSelfFromArray(yyl810, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -7036,12 +7084,12 @@ func (x *KubeletWebhookAuthorization) codecDecodeSelfFromMap(l int, d *codec1978 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys806Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys806Slc - var yyhl806 bool = l >= 0 - for yyj806 := 0; ; yyj806++ { - if yyhl806 { - if yyj806 >= l { + var yys811Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys811Slc + var yyhl811 bool = l >= 0 + for yyj811 := 0; ; yyj811++ { + if yyhl811 { + if yyj811 >= l { break } } else { @@ -7050,44 +7098,44 @@ func (x *KubeletWebhookAuthorization) codecDecodeSelfFromMap(l int, d *codec1978 } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys806Slc = r.DecodeBytes(yys806Slc, true, true) - yys806 := string(yys806Slc) + yys811Slc = r.DecodeBytes(yys811Slc, true, true) + yys811 := string(yys811Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys806 { + switch yys811 { case "cacheAuthorizedTTL": if r.TryDecodeAsNil() { x.CacheAuthorizedTTL = pkg1_unversioned.Duration{} } else { - yyv807 := &x.CacheAuthorizedTTL - yym808 := z.DecBinary() - _ = yym808 + yyv812 := &x.CacheAuthorizedTTL + yym813 := z.DecBinary() + _ = yym813 if false { - } else if z.HasExtensions() && z.DecExt(yyv807) { - } else if !yym808 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv807) + } else if z.HasExtensions() && z.DecExt(yyv812) { + } else if !yym813 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv812) } else { - z.DecFallback(yyv807, false) + z.DecFallback(yyv812, false) } } case "cacheUnauthorizedTTL": if r.TryDecodeAsNil() { x.CacheUnauthorizedTTL = pkg1_unversioned.Duration{} } else { - yyv809 := &x.CacheUnauthorizedTTL - yym810 := z.DecBinary() - _ = yym810 + yyv814 := &x.CacheUnauthorizedTTL + yym815 := z.DecBinary() + _ = yym815 if false { - } else if z.HasExtensions() && z.DecExt(yyv809) { - } else if !yym810 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv809) + } else if z.HasExtensions() && z.DecExt(yyv814) { + } else if !yym815 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv814) } else { - z.DecFallback(yyv809, false) + z.DecFallback(yyv814, false) } } default: - z.DecStructFieldNotFound(-1, yys806) - } // end switch yys806 - } // end for yyj806 + z.DecStructFieldNotFound(-1, yys811) + } // end switch yys811 + } // end for yyj811 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -7095,16 +7143,16 @@ func (x *KubeletWebhookAuthorization) codecDecodeSelfFromArray(l int, d *codec19 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj811 int - var yyb811 bool - var yyhl811 bool = l >= 0 - yyj811++ - if yyhl811 { - yyb811 = yyj811 > l + var yyj816 int + var yyb816 bool + var yyhl816 bool = l >= 0 + yyj816++ + if yyhl816 { + yyb816 = yyj816 > l } else { - yyb811 = r.CheckBreak() + yyb816 = r.CheckBreak() } - if yyb811 { + if yyb816 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7112,24 +7160,24 @@ func (x *KubeletWebhookAuthorization) codecDecodeSelfFromArray(l int, d *codec19 if r.TryDecodeAsNil() { x.CacheAuthorizedTTL = pkg1_unversioned.Duration{} } else { - yyv812 := &x.CacheAuthorizedTTL - yym813 := z.DecBinary() - _ = yym813 + yyv817 := &x.CacheAuthorizedTTL + yym818 := z.DecBinary() + _ = yym818 if false { - } else if z.HasExtensions() && z.DecExt(yyv812) { - } else if !yym813 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv812) + } else if z.HasExtensions() && z.DecExt(yyv817) { + } else if !yym818 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv817) } else { - z.DecFallback(yyv812, false) + z.DecFallback(yyv817, false) } } - yyj811++ - if yyhl811 { - yyb811 = yyj811 > l + yyj816++ + if yyhl816 { + yyb816 = yyj816 > l } else { - yyb811 = r.CheckBreak() + yyb816 = r.CheckBreak() } - if yyb811 { + if yyb816 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7137,29 +7185,29 @@ func (x *KubeletWebhookAuthorization) codecDecodeSelfFromArray(l int, d *codec19 if r.TryDecodeAsNil() { x.CacheUnauthorizedTTL = pkg1_unversioned.Duration{} } else { - yyv814 := &x.CacheUnauthorizedTTL - yym815 := z.DecBinary() - _ = yym815 + yyv819 := &x.CacheUnauthorizedTTL + yym820 := z.DecBinary() + _ = yym820 if false { - } else if z.HasExtensions() && z.DecExt(yyv814) { - } else if !yym815 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv814) + } else if z.HasExtensions() && z.DecExt(yyv819) { + } else if !yym820 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv819) } else { - z.DecFallback(yyv814, false) + z.DecFallback(yyv819, false) } } for { - yyj811++ - if yyhl811 { - yyb811 = yyj811 > l + yyj816++ + if yyhl816 { + yyb816 = yyj816 > l } else { - yyb811 = r.CheckBreak() + yyb816 = r.CheckBreak() } - if yyb811 { + if yyb816 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj811-1, "") + z.DecStructFieldNotFound(yyj816-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -7171,63 +7219,63 @@ func (x *KubeletAuthentication) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym816 := z.EncBinary() - _ = yym816 + yym821 := z.EncBinary() + _ = yym821 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep817 := !z.EncBinary() - yy2arr817 := z.EncBasicHandle().StructToArray - var yyq817 [3]bool - _, _, _ = yysep817, yyq817, yy2arr817 - const yyr817 bool = false - var yynn817 int - if yyr817 || yy2arr817 { + yysep822 := !z.EncBinary() + yy2arr822 := z.EncBasicHandle().StructToArray + var yyq822 [3]bool + _, _, _ = yysep822, yyq822, yy2arr822 + const yyr822 bool = false + var yynn822 int + if yyr822 || yy2arr822 { r.EncodeArrayStart(3) } else { - yynn817 = 3 - for _, b := range yyq817 { + yynn822 = 3 + for _, b := range yyq822 { if b { - yynn817++ + yynn822++ } } - r.EncodeMapStart(yynn817) - yynn817 = 0 + r.EncodeMapStart(yynn822) + yynn822 = 0 } - if yyr817 || yy2arr817 { + if yyr822 || yy2arr822 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy819 := &x.X509 - yy819.CodecEncodeSelf(e) + yy824 := &x.X509 + yy824.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("x509")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy820 := &x.X509 - yy820.CodecEncodeSelf(e) + yy825 := &x.X509 + yy825.CodecEncodeSelf(e) } - if yyr817 || yy2arr817 { + if yyr822 || yy2arr822 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy822 := &x.Webhook - yy822.CodecEncodeSelf(e) + yy827 := &x.Webhook + yy827.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("webhook")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy823 := &x.Webhook - yy823.CodecEncodeSelf(e) + yy828 := &x.Webhook + yy828.CodecEncodeSelf(e) } - if yyr817 || yy2arr817 { + if yyr822 || yy2arr822 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy825 := &x.Anonymous - yy825.CodecEncodeSelf(e) + yy830 := &x.Anonymous + yy830.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("anonymous")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy826 := &x.Anonymous - yy826.CodecEncodeSelf(e) + yy831 := &x.Anonymous + yy831.CodecEncodeSelf(e) } - if yyr817 || yy2arr817 { + if yyr822 || yy2arr822 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -7240,25 +7288,25 @@ func (x *KubeletAuthentication) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym827 := z.DecBinary() - _ = yym827 + yym832 := z.DecBinary() + _ = yym832 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct828 := r.ContainerType() - if yyct828 == codecSelferValueTypeMap1234 { - yyl828 := r.ReadMapStart() - if yyl828 == 0 { + yyct833 := r.ContainerType() + if yyct833 == codecSelferValueTypeMap1234 { + yyl833 := r.ReadMapStart() + if yyl833 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl828, d) + x.codecDecodeSelfFromMap(yyl833, d) } - } else if yyct828 == codecSelferValueTypeArray1234 { - yyl828 := r.ReadArrayStart() - if yyl828 == 0 { + } else if yyct833 == codecSelferValueTypeArray1234 { + yyl833 := r.ReadArrayStart() + if yyl833 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl828, d) + x.codecDecodeSelfFromArray(yyl833, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -7270,12 +7318,12 @@ func (x *KubeletAuthentication) codecDecodeSelfFromMap(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys829Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys829Slc - var yyhl829 bool = l >= 0 - for yyj829 := 0; ; yyj829++ { - if yyhl829 { - if yyj829 >= l { + var yys834Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys834Slc + var yyhl834 bool = l >= 0 + for yyj834 := 0; ; yyj834++ { + if yyhl834 { + if yyj834 >= l { break } } else { @@ -7284,35 +7332,35 @@ func (x *KubeletAuthentication) codecDecodeSelfFromMap(l int, d *codec1978.Decod } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys829Slc = r.DecodeBytes(yys829Slc, true, true) - yys829 := string(yys829Slc) + yys834Slc = r.DecodeBytes(yys834Slc, true, true) + yys834 := string(yys834Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys829 { + switch yys834 { case "x509": if r.TryDecodeAsNil() { x.X509 = KubeletX509Authentication{} } else { - yyv830 := &x.X509 - yyv830.CodecDecodeSelf(d) + yyv835 := &x.X509 + yyv835.CodecDecodeSelf(d) } case "webhook": if r.TryDecodeAsNil() { x.Webhook = KubeletWebhookAuthentication{} } else { - yyv831 := &x.Webhook - yyv831.CodecDecodeSelf(d) + yyv836 := &x.Webhook + yyv836.CodecDecodeSelf(d) } case "anonymous": if r.TryDecodeAsNil() { x.Anonymous = KubeletAnonymousAuthentication{} } else { - yyv832 := &x.Anonymous - yyv832.CodecDecodeSelf(d) + yyv837 := &x.Anonymous + yyv837.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys829) - } // end switch yys829 - } // end for yyj829 + z.DecStructFieldNotFound(-1, yys834) + } // end switch yys834 + } // end for yyj834 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -7320,16 +7368,16 @@ func (x *KubeletAuthentication) codecDecodeSelfFromArray(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj833 int - var yyb833 bool - var yyhl833 bool = l >= 0 - yyj833++ - if yyhl833 { - yyb833 = yyj833 > l + var yyj838 int + var yyb838 bool + var yyhl838 bool = l >= 0 + yyj838++ + if yyhl838 { + yyb838 = yyj838 > l } else { - yyb833 = r.CheckBreak() + yyb838 = r.CheckBreak() } - if yyb833 { + if yyb838 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7337,16 +7385,16 @@ func (x *KubeletAuthentication) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.X509 = KubeletX509Authentication{} } else { - yyv834 := &x.X509 - yyv834.CodecDecodeSelf(d) + yyv839 := &x.X509 + yyv839.CodecDecodeSelf(d) } - yyj833++ - if yyhl833 { - yyb833 = yyj833 > l + yyj838++ + if yyhl838 { + yyb838 = yyj838 > l } else { - yyb833 = r.CheckBreak() + yyb838 = r.CheckBreak() } - if yyb833 { + if yyb838 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7354,16 +7402,16 @@ func (x *KubeletAuthentication) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Webhook = KubeletWebhookAuthentication{} } else { - yyv835 := &x.Webhook - yyv835.CodecDecodeSelf(d) + yyv840 := &x.Webhook + yyv840.CodecDecodeSelf(d) } - yyj833++ - if yyhl833 { - yyb833 = yyj833 > l + yyj838++ + if yyhl838 { + yyb838 = yyj838 > l } else { - yyb833 = r.CheckBreak() + yyb838 = r.CheckBreak() } - if yyb833 { + if yyb838 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7371,21 +7419,21 @@ func (x *KubeletAuthentication) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Anonymous = KubeletAnonymousAuthentication{} } else { - yyv836 := &x.Anonymous - yyv836.CodecDecodeSelf(d) + yyv841 := &x.Anonymous + yyv841.CodecDecodeSelf(d) } for { - yyj833++ - if yyhl833 { - yyb833 = yyj833 > l + yyj838++ + if yyhl838 { + yyb838 = yyj838 > l } else { - yyb833 = r.CheckBreak() + yyb838 = r.CheckBreak() } - if yyb833 { + if yyb838 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj833-1, "") + z.DecStructFieldNotFound(yyj838-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -7397,33 +7445,33 @@ func (x *KubeletX509Authentication) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym837 := z.EncBinary() - _ = yym837 + yym842 := z.EncBinary() + _ = yym842 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep838 := !z.EncBinary() - yy2arr838 := z.EncBasicHandle().StructToArray - var yyq838 [1]bool - _, _, _ = yysep838, yyq838, yy2arr838 - const yyr838 bool = false - var yynn838 int - if yyr838 || yy2arr838 { + yysep843 := !z.EncBinary() + yy2arr843 := z.EncBasicHandle().StructToArray + var yyq843 [1]bool + _, _, _ = yysep843, yyq843, yy2arr843 + const yyr843 bool = false + var yynn843 int + if yyr843 || yy2arr843 { r.EncodeArrayStart(1) } else { - yynn838 = 1 - for _, b := range yyq838 { + yynn843 = 1 + for _, b := range yyq843 { if b { - yynn838++ + yynn843++ } } - r.EncodeMapStart(yynn838) - yynn838 = 0 + r.EncodeMapStart(yynn843) + yynn843 = 0 } - if yyr838 || yy2arr838 { + if yyr843 || yy2arr843 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym840 := z.EncBinary() - _ = yym840 + yym845 := z.EncBinary() + _ = yym845 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ClientCAFile)) @@ -7432,14 +7480,14 @@ func (x *KubeletX509Authentication) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("clientCAFile")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym841 := z.EncBinary() - _ = yym841 + yym846 := z.EncBinary() + _ = yym846 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ClientCAFile)) } } - if yyr838 || yy2arr838 { + if yyr843 || yy2arr843 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -7452,25 +7500,25 @@ func (x *KubeletX509Authentication) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym842 := z.DecBinary() - _ = yym842 + yym847 := z.DecBinary() + _ = yym847 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct843 := r.ContainerType() - if yyct843 == codecSelferValueTypeMap1234 { - yyl843 := r.ReadMapStart() - if yyl843 == 0 { + yyct848 := r.ContainerType() + if yyct848 == codecSelferValueTypeMap1234 { + yyl848 := r.ReadMapStart() + if yyl848 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl843, d) + x.codecDecodeSelfFromMap(yyl848, d) } - } else if yyct843 == codecSelferValueTypeArray1234 { - yyl843 := r.ReadArrayStart() - if yyl843 == 0 { + } else if yyct848 == codecSelferValueTypeArray1234 { + yyl848 := r.ReadArrayStart() + if yyl848 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl843, d) + x.codecDecodeSelfFromArray(yyl848, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -7482,12 +7530,12 @@ func (x *KubeletX509Authentication) codecDecodeSelfFromMap(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys844Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys844Slc - var yyhl844 bool = l >= 0 - for yyj844 := 0; ; yyj844++ { - if yyhl844 { - if yyj844 >= l { + var yys849Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys849Slc + var yyhl849 bool = l >= 0 + for yyj849 := 0; ; yyj849++ { + if yyhl849 { + if yyj849 >= l { break } } else { @@ -7496,10 +7544,10 @@ func (x *KubeletX509Authentication) codecDecodeSelfFromMap(l int, d *codec1978.D } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys844Slc = r.DecodeBytes(yys844Slc, true, true) - yys844 := string(yys844Slc) + yys849Slc = r.DecodeBytes(yys849Slc, true, true) + yys849 := string(yys849Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys844 { + switch yys849 { case "clientCAFile": if r.TryDecodeAsNil() { x.ClientCAFile = "" @@ -7507,9 +7555,9 @@ func (x *KubeletX509Authentication) codecDecodeSelfFromMap(l int, d *codec1978.D x.ClientCAFile = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys844) - } // end switch yys844 - } // end for yyj844 + z.DecStructFieldNotFound(-1, yys849) + } // end switch yys849 + } // end for yyj849 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -7517,16 +7565,16 @@ func (x *KubeletX509Authentication) codecDecodeSelfFromArray(l int, d *codec1978 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj846 int - var yyb846 bool - var yyhl846 bool = l >= 0 - yyj846++ - if yyhl846 { - yyb846 = yyj846 > l + var yyj851 int + var yyb851 bool + var yyhl851 bool = l >= 0 + yyj851++ + if yyhl851 { + yyb851 = yyj851 > l } else { - yyb846 = r.CheckBreak() + yyb851 = r.CheckBreak() } - if yyb846 { + if yyb851 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7537,17 +7585,17 @@ func (x *KubeletX509Authentication) codecDecodeSelfFromArray(l int, d *codec1978 x.ClientCAFile = string(r.DecodeString()) } for { - yyj846++ - if yyhl846 { - yyb846 = yyj846 > l + yyj851++ + if yyhl851 { + yyb851 = yyj851 > l } else { - yyb846 = r.CheckBreak() + yyb851 = r.CheckBreak() } - if yyb846 { + if yyb851 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj846-1, "") + z.DecStructFieldNotFound(yyj851-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -7559,33 +7607,33 @@ func (x *KubeletWebhookAuthentication) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym848 := z.EncBinary() - _ = yym848 + yym853 := z.EncBinary() + _ = yym853 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep849 := !z.EncBinary() - yy2arr849 := z.EncBasicHandle().StructToArray - var yyq849 [2]bool - _, _, _ = yysep849, yyq849, yy2arr849 - const yyr849 bool = false - var yynn849 int - if yyr849 || yy2arr849 { + yysep854 := !z.EncBinary() + yy2arr854 := z.EncBasicHandle().StructToArray + var yyq854 [2]bool + _, _, _ = yysep854, yyq854, yy2arr854 + const yyr854 bool = false + var yynn854 int + if yyr854 || yy2arr854 { r.EncodeArrayStart(2) } else { - yynn849 = 2 - for _, b := range yyq849 { + yynn854 = 2 + for _, b := range yyq854 { if b { - yynn849++ + yynn854++ } } - r.EncodeMapStart(yynn849) - yynn849 = 0 + r.EncodeMapStart(yynn854) + yynn854 = 0 } - if yyr849 || yy2arr849 { + if yyr854 || yy2arr854 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym851 := z.EncBinary() - _ = yym851 + yym856 := z.EncBinary() + _ = yym856 if false { } else { r.EncodeBool(bool(x.Enabled)) @@ -7594,41 +7642,41 @@ func (x *KubeletWebhookAuthentication) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("enabled")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym852 := z.EncBinary() - _ = yym852 + yym857 := z.EncBinary() + _ = yym857 if false { } else { r.EncodeBool(bool(x.Enabled)) } } - if yyr849 || yy2arr849 { + if yyr854 || yy2arr854 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy854 := &x.CacheTTL - yym855 := z.EncBinary() - _ = yym855 + yy859 := &x.CacheTTL + yym860 := z.EncBinary() + _ = yym860 if false { - } else if z.HasExtensions() && z.EncExt(yy854) { - } else if !yym855 && z.IsJSONHandle() { - z.EncJSONMarshal(yy854) + } else if z.HasExtensions() && z.EncExt(yy859) { + } else if !yym860 && z.IsJSONHandle() { + z.EncJSONMarshal(yy859) } else { - z.EncFallback(yy854) + z.EncFallback(yy859) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("cacheTTL")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy856 := &x.CacheTTL - yym857 := z.EncBinary() - _ = yym857 + yy861 := &x.CacheTTL + yym862 := z.EncBinary() + _ = yym862 if false { - } else if z.HasExtensions() && z.EncExt(yy856) { - } else if !yym857 && z.IsJSONHandle() { - z.EncJSONMarshal(yy856) + } else if z.HasExtensions() && z.EncExt(yy861) { + } else if !yym862 && z.IsJSONHandle() { + z.EncJSONMarshal(yy861) } else { - z.EncFallback(yy856) + z.EncFallback(yy861) } } - if yyr849 || yy2arr849 { + if yyr854 || yy2arr854 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -7641,25 +7689,25 @@ func (x *KubeletWebhookAuthentication) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym858 := z.DecBinary() - _ = yym858 + yym863 := z.DecBinary() + _ = yym863 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct859 := r.ContainerType() - if yyct859 == codecSelferValueTypeMap1234 { - yyl859 := r.ReadMapStart() - if yyl859 == 0 { + yyct864 := r.ContainerType() + if yyct864 == codecSelferValueTypeMap1234 { + yyl864 := r.ReadMapStart() + if yyl864 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl859, d) + x.codecDecodeSelfFromMap(yyl864, d) } - } else if yyct859 == codecSelferValueTypeArray1234 { - yyl859 := r.ReadArrayStart() - if yyl859 == 0 { + } else if yyct864 == codecSelferValueTypeArray1234 { + yyl864 := r.ReadArrayStart() + if yyl864 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl859, d) + x.codecDecodeSelfFromArray(yyl864, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -7671,12 +7719,12 @@ func (x *KubeletWebhookAuthentication) codecDecodeSelfFromMap(l int, d *codec197 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys860Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys860Slc - var yyhl860 bool = l >= 0 - for yyj860 := 0; ; yyj860++ { - if yyhl860 { - if yyj860 >= l { + var yys865Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys865Slc + var yyhl865 bool = l >= 0 + for yyj865 := 0; ; yyj865++ { + if yyhl865 { + if yyj865 >= l { break } } else { @@ -7685,10 +7733,10 @@ func (x *KubeletWebhookAuthentication) codecDecodeSelfFromMap(l int, d *codec197 } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys860Slc = r.DecodeBytes(yys860Slc, true, true) - yys860 := string(yys860Slc) + yys865Slc = r.DecodeBytes(yys865Slc, true, true) + yys865 := string(yys865Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys860 { + switch yys865 { case "enabled": if r.TryDecodeAsNil() { x.Enabled = false @@ -7699,21 +7747,21 @@ func (x *KubeletWebhookAuthentication) codecDecodeSelfFromMap(l int, d *codec197 if r.TryDecodeAsNil() { x.CacheTTL = pkg1_unversioned.Duration{} } else { - yyv862 := &x.CacheTTL - yym863 := z.DecBinary() - _ = yym863 + yyv867 := &x.CacheTTL + yym868 := z.DecBinary() + _ = yym868 if false { - } else if z.HasExtensions() && z.DecExt(yyv862) { - } else if !yym863 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv862) + } else if z.HasExtensions() && z.DecExt(yyv867) { + } else if !yym868 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv867) } else { - z.DecFallback(yyv862, false) + z.DecFallback(yyv867, false) } } default: - z.DecStructFieldNotFound(-1, yys860) - } // end switch yys860 - } // end for yyj860 + z.DecStructFieldNotFound(-1, yys865) + } // end switch yys865 + } // end for yyj865 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -7721,16 +7769,16 @@ func (x *KubeletWebhookAuthentication) codecDecodeSelfFromArray(l int, d *codec1 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj864 int - var yyb864 bool - var yyhl864 bool = l >= 0 - yyj864++ - if yyhl864 { - yyb864 = yyj864 > l + var yyj869 int + var yyb869 bool + var yyhl869 bool = l >= 0 + yyj869++ + if yyhl869 { + yyb869 = yyj869 > l } else { - yyb864 = r.CheckBreak() + yyb869 = r.CheckBreak() } - if yyb864 { + if yyb869 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7740,13 +7788,13 @@ func (x *KubeletWebhookAuthentication) codecDecodeSelfFromArray(l int, d *codec1 } else { x.Enabled = bool(r.DecodeBool()) } - yyj864++ - if yyhl864 { - yyb864 = yyj864 > l + yyj869++ + if yyhl869 { + yyb869 = yyj869 > l } else { - yyb864 = r.CheckBreak() + yyb869 = r.CheckBreak() } - if yyb864 { + if yyb869 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7754,29 +7802,29 @@ func (x *KubeletWebhookAuthentication) codecDecodeSelfFromArray(l int, d *codec1 if r.TryDecodeAsNil() { x.CacheTTL = pkg1_unversioned.Duration{} } else { - yyv866 := &x.CacheTTL - yym867 := z.DecBinary() - _ = yym867 + yyv871 := &x.CacheTTL + yym872 := z.DecBinary() + _ = yym872 if false { - } else if z.HasExtensions() && z.DecExt(yyv866) { - } else if !yym867 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv866) + } else if z.HasExtensions() && z.DecExt(yyv871) { + } else if !yym872 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv871) } else { - z.DecFallback(yyv866, false) + z.DecFallback(yyv871, false) } } for { - yyj864++ - if yyhl864 { - yyb864 = yyj864 > l + yyj869++ + if yyhl869 { + yyb869 = yyj869 > l } else { - yyb864 = r.CheckBreak() + yyb869 = r.CheckBreak() } - if yyb864 { + if yyb869 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj864-1, "") + z.DecStructFieldNotFound(yyj869-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -7788,33 +7836,33 @@ func (x *KubeletAnonymousAuthentication) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym868 := z.EncBinary() - _ = yym868 + yym873 := z.EncBinary() + _ = yym873 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep869 := !z.EncBinary() - yy2arr869 := z.EncBasicHandle().StructToArray - var yyq869 [1]bool - _, _, _ = yysep869, yyq869, yy2arr869 - const yyr869 bool = false - var yynn869 int - if yyr869 || yy2arr869 { + yysep874 := !z.EncBinary() + yy2arr874 := z.EncBasicHandle().StructToArray + var yyq874 [1]bool + _, _, _ = yysep874, yyq874, yy2arr874 + const yyr874 bool = false + var yynn874 int + if yyr874 || yy2arr874 { r.EncodeArrayStart(1) } else { - yynn869 = 1 - for _, b := range yyq869 { + yynn874 = 1 + for _, b := range yyq874 { if b { - yynn869++ + yynn874++ } } - r.EncodeMapStart(yynn869) - yynn869 = 0 + r.EncodeMapStart(yynn874) + yynn874 = 0 } - if yyr869 || yy2arr869 { + if yyr874 || yy2arr874 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym871 := z.EncBinary() - _ = yym871 + yym876 := z.EncBinary() + _ = yym876 if false { } else { r.EncodeBool(bool(x.Enabled)) @@ -7823,14 +7871,14 @@ func (x *KubeletAnonymousAuthentication) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("enabled")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym872 := z.EncBinary() - _ = yym872 + yym877 := z.EncBinary() + _ = yym877 if false { } else { r.EncodeBool(bool(x.Enabled)) } } - if yyr869 || yy2arr869 { + if yyr874 || yy2arr874 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -7843,25 +7891,25 @@ func (x *KubeletAnonymousAuthentication) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym873 := z.DecBinary() - _ = yym873 + yym878 := z.DecBinary() + _ = yym878 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct874 := r.ContainerType() - if yyct874 == codecSelferValueTypeMap1234 { - yyl874 := r.ReadMapStart() - if yyl874 == 0 { + yyct879 := r.ContainerType() + if yyct879 == codecSelferValueTypeMap1234 { + yyl879 := r.ReadMapStart() + if yyl879 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl874, d) + x.codecDecodeSelfFromMap(yyl879, d) } - } else if yyct874 == codecSelferValueTypeArray1234 { - yyl874 := r.ReadArrayStart() - if yyl874 == 0 { + } else if yyct879 == codecSelferValueTypeArray1234 { + yyl879 := r.ReadArrayStart() + if yyl879 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl874, d) + x.codecDecodeSelfFromArray(yyl879, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -7873,12 +7921,12 @@ func (x *KubeletAnonymousAuthentication) codecDecodeSelfFromMap(l int, d *codec1 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys875Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys875Slc - var yyhl875 bool = l >= 0 - for yyj875 := 0; ; yyj875++ { - if yyhl875 { - if yyj875 >= l { + var yys880Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys880Slc + var yyhl880 bool = l >= 0 + for yyj880 := 0; ; yyj880++ { + if yyhl880 { + if yyj880 >= l { break } } else { @@ -7887,10 +7935,10 @@ func (x *KubeletAnonymousAuthentication) codecDecodeSelfFromMap(l int, d *codec1 } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys875Slc = r.DecodeBytes(yys875Slc, true, true) - yys875 := string(yys875Slc) + yys880Slc = r.DecodeBytes(yys880Slc, true, true) + yys880 := string(yys880Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys875 { + switch yys880 { case "enabled": if r.TryDecodeAsNil() { x.Enabled = false @@ -7898,9 +7946,9 @@ func (x *KubeletAnonymousAuthentication) codecDecodeSelfFromMap(l int, d *codec1 x.Enabled = bool(r.DecodeBool()) } default: - z.DecStructFieldNotFound(-1, yys875) - } // end switch yys875 - } // end for yyj875 + z.DecStructFieldNotFound(-1, yys880) + } // end switch yys880 + } // end for yyj880 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -7908,16 +7956,16 @@ func (x *KubeletAnonymousAuthentication) codecDecodeSelfFromArray(l int, d *code var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj877 int - var yyb877 bool - var yyhl877 bool = l >= 0 - yyj877++ - if yyhl877 { - yyb877 = yyj877 > l + var yyj882 int + var yyb882 bool + var yyhl882 bool = l >= 0 + yyj882++ + if yyhl882 { + yyb882 = yyj882 > l } else { - yyb877 = r.CheckBreak() + yyb882 = r.CheckBreak() } - if yyb877 { + if yyb882 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7928,17 +7976,17 @@ func (x *KubeletAnonymousAuthentication) codecDecodeSelfFromArray(l int, d *code x.Enabled = bool(r.DecodeBool()) } for { - yyj877++ - if yyhl877 { - yyb877 = yyj877 > l + yyj882++ + if yyhl882 { + yyb882 = yyj882 > l } else { - yyb877 = r.CheckBreak() + yyb882 = r.CheckBreak() } - if yyb877 { + if yyb882 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj877-1, "") + z.DecStructFieldNotFound(yyj882-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -7950,36 +7998,36 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym879 := z.EncBinary() - _ = yym879 + yym884 := z.EncBinary() + _ = yym884 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep880 := !z.EncBinary() - yy2arr880 := z.EncBasicHandle().StructToArray - var yyq880 [14]bool - _, _, _ = yysep880, yyq880, yy2arr880 - const yyr880 bool = false - yyq880[0] = x.Kind != "" - yyq880[1] = x.APIVersion != "" - var yynn880 int - if yyr880 || yy2arr880 { + yysep885 := !z.EncBinary() + yy2arr885 := z.EncBasicHandle().StructToArray + var yyq885 [14]bool + _, _, _ = yysep885, yyq885, yy2arr885 + const yyr885 bool = false + yyq885[0] = x.Kind != "" + yyq885[1] = x.APIVersion != "" + var yynn885 int + if yyr885 || yy2arr885 { r.EncodeArrayStart(14) } else { - yynn880 = 12 - for _, b := range yyq880 { + yynn885 = 12 + for _, b := range yyq885 { if b { - yynn880++ + yynn885++ } } - r.EncodeMapStart(yynn880) - yynn880 = 0 + r.EncodeMapStart(yynn885) + yynn885 = 0 } - if yyr880 || yy2arr880 { + if yyr885 || yy2arr885 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq880[0] { - yym882 := z.EncBinary() - _ = yym882 + if yyq885[0] { + yym887 := z.EncBinary() + _ = yym887 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -7988,23 +8036,23 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq880[0] { + if yyq885[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym883 := z.EncBinary() - _ = yym883 + yym888 := z.EncBinary() + _ = yym888 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr880 || yy2arr880 { + if yyr885 || yy2arr885 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq880[1] { - yym885 := z.EncBinary() - _ = yym885 + if yyq885[1] { + yym890 := z.EncBinary() + _ = yym890 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -8013,22 +8061,22 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq880[1] { + if yyq885[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym886 := z.EncBinary() - _ = yym886 + yym891 := z.EncBinary() + _ = yym891 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr880 || yy2arr880 { + if yyr885 || yy2arr885 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym888 := z.EncBinary() - _ = yym888 + yym893 := z.EncBinary() + _ = yym893 if false { } else { r.EncodeInt(int64(x.Port)) @@ -8037,17 +8085,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("port")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym889 := z.EncBinary() - _ = yym889 + yym894 := z.EncBinary() + _ = yym894 if false { } else { r.EncodeInt(int64(x.Port)) } } - if yyr880 || yy2arr880 { + if yyr885 || yy2arr885 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym891 := z.EncBinary() - _ = yym891 + yym896 := z.EncBinary() + _ = yym896 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Address)) @@ -8056,17 +8104,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("address")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym892 := z.EncBinary() - _ = yym892 + yym897 := z.EncBinary() + _ = yym897 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Address)) } } - if yyr880 || yy2arr880 { + if yyr885 || yy2arr885 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym894 := z.EncBinary() - _ = yym894 + yym899 := z.EncBinary() + _ = yym899 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.AlgorithmProvider)) @@ -8075,17 +8123,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("algorithmProvider")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym895 := z.EncBinary() - _ = yym895 + yym900 := z.EncBinary() + _ = yym900 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.AlgorithmProvider)) } } - if yyr880 || yy2arr880 { + if yyr885 || yy2arr885 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym897 := z.EncBinary() - _ = yym897 + yym902 := z.EncBinary() + _ = yym902 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PolicyConfigFile)) @@ -8094,17 +8142,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("policyConfigFile")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym898 := z.EncBinary() - _ = yym898 + yym903 := z.EncBinary() + _ = yym903 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PolicyConfigFile)) } } - if yyr880 || yy2arr880 { + if yyr885 || yy2arr885 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym900 := z.EncBinary() - _ = yym900 + yym905 := z.EncBinary() + _ = yym905 if false { } else { r.EncodeBool(bool(x.EnableProfiling)) @@ -8113,17 +8161,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("enableProfiling")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym901 := z.EncBinary() - _ = yym901 + yym906 := z.EncBinary() + _ = yym906 if false { } else { r.EncodeBool(bool(x.EnableProfiling)) } } - if yyr880 || yy2arr880 { + if yyr885 || yy2arr885 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym903 := z.EncBinary() - _ = yym903 + yym908 := z.EncBinary() + _ = yym908 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ContentType)) @@ -8132,17 +8180,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("contentType")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym904 := z.EncBinary() - _ = yym904 + yym909 := z.EncBinary() + _ = yym909 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ContentType)) } } - if yyr880 || yy2arr880 { + if yyr885 || yy2arr885 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym906 := z.EncBinary() - _ = yym906 + yym911 := z.EncBinary() + _ = yym911 if false { } else { r.EncodeFloat32(float32(x.KubeAPIQPS)) @@ -8151,17 +8199,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeAPIQPS")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym907 := z.EncBinary() - _ = yym907 + yym912 := z.EncBinary() + _ = yym912 if false { } else { r.EncodeFloat32(float32(x.KubeAPIQPS)) } } - if yyr880 || yy2arr880 { + if yyr885 || yy2arr885 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym909 := z.EncBinary() - _ = yym909 + yym914 := z.EncBinary() + _ = yym914 if false { } else { r.EncodeInt(int64(x.KubeAPIBurst)) @@ -8170,17 +8218,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeAPIBurst")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym910 := z.EncBinary() - _ = yym910 + yym915 := z.EncBinary() + _ = yym915 if false { } else { r.EncodeInt(int64(x.KubeAPIBurst)) } } - if yyr880 || yy2arr880 { + if yyr885 || yy2arr885 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym912 := z.EncBinary() - _ = yym912 + yym917 := z.EncBinary() + _ = yym917 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName)) @@ -8189,17 +8237,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("schedulerName")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym913 := z.EncBinary() - _ = yym913 + yym918 := z.EncBinary() + _ = yym918 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName)) } } - if yyr880 || yy2arr880 { + if yyr885 || yy2arr885 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym915 := z.EncBinary() - _ = yym915 + yym920 := z.EncBinary() + _ = yym920 if false { } else { r.EncodeInt(int64(x.HardPodAffinitySymmetricWeight)) @@ -8208,17 +8256,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hardPodAffinitySymmetricWeight")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym916 := z.EncBinary() - _ = yym916 + yym921 := z.EncBinary() + _ = yym921 if false { } else { r.EncodeInt(int64(x.HardPodAffinitySymmetricWeight)) } } - if yyr880 || yy2arr880 { + if yyr885 || yy2arr885 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym918 := z.EncBinary() - _ = yym918 + yym923 := z.EncBinary() + _ = yym923 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FailureDomains)) @@ -8227,25 +8275,25 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("failureDomains")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym919 := z.EncBinary() - _ = yym919 + yym924 := z.EncBinary() + _ = yym924 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FailureDomains)) } } - if yyr880 || yy2arr880 { + if yyr885 || yy2arr885 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy921 := &x.LeaderElection - yy921.CodecEncodeSelf(e) + yy926 := &x.LeaderElection + yy926.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("leaderElection")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy922 := &x.LeaderElection - yy922.CodecEncodeSelf(e) + yy927 := &x.LeaderElection + yy927.CodecEncodeSelf(e) } - if yyr880 || yy2arr880 { + if yyr885 || yy2arr885 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -8258,25 +8306,25 @@ func (x *KubeSchedulerConfiguration) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym923 := z.DecBinary() - _ = yym923 + yym928 := z.DecBinary() + _ = yym928 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct924 := r.ContainerType() - if yyct924 == codecSelferValueTypeMap1234 { - yyl924 := r.ReadMapStart() - if yyl924 == 0 { + yyct929 := r.ContainerType() + if yyct929 == codecSelferValueTypeMap1234 { + yyl929 := r.ReadMapStart() + if yyl929 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl924, d) + x.codecDecodeSelfFromMap(yyl929, d) } - } else if yyct924 == codecSelferValueTypeArray1234 { - yyl924 := r.ReadArrayStart() - if yyl924 == 0 { + } else if yyct929 == codecSelferValueTypeArray1234 { + yyl929 := r.ReadArrayStart() + if yyl929 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl924, d) + x.codecDecodeSelfFromArray(yyl929, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -8288,12 +8336,12 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromMap(l int, d *codec1978. var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys925Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys925Slc - var yyhl925 bool = l >= 0 - for yyj925 := 0; ; yyj925++ { - if yyhl925 { - if yyj925 >= l { + var yys930Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys930Slc + var yyhl930 bool = l >= 0 + for yyj930 := 0; ; yyj930++ { + if yyhl930 { + if yyj930 >= l { break } } else { @@ -8302,10 +8350,10 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromMap(l int, d *codec1978. } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys925Slc = r.DecodeBytes(yys925Slc, true, true) - yys925 := string(yys925Slc) + yys930Slc = r.DecodeBytes(yys930Slc, true, true) + yys930 := string(yys930Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys925 { + switch yys930 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -8388,13 +8436,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromMap(l int, d *codec1978. if r.TryDecodeAsNil() { x.LeaderElection = LeaderElectionConfiguration{} } else { - yyv939 := &x.LeaderElection - yyv939.CodecDecodeSelf(d) + yyv944 := &x.LeaderElection + yyv944.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys925) - } // end switch yys925 - } // end for yyj925 + z.DecStructFieldNotFound(-1, yys930) + } // end switch yys930 + } // end for yyj930 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -8402,16 +8450,16 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj940 int - var yyb940 bool - var yyhl940 bool = l >= 0 - yyj940++ - if yyhl940 { - yyb940 = yyj940 > l + var yyj945 int + var yyb945 bool + var yyhl945 bool = l >= 0 + yyj945++ + if yyhl945 { + yyb945 = yyj945 > l } else { - yyb940 = r.CheckBreak() + yyb945 = r.CheckBreak() } - if yyb940 { + if yyb945 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8421,13 +8469,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.Kind = string(r.DecodeString()) } - yyj940++ - if yyhl940 { - yyb940 = yyj940 > l + yyj945++ + if yyhl945 { + yyb945 = yyj945 > l } else { - yyb940 = r.CheckBreak() + yyb945 = r.CheckBreak() } - if yyb940 { + if yyb945 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8437,13 +8485,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.APIVersion = string(r.DecodeString()) } - yyj940++ - if yyhl940 { - yyb940 = yyj940 > l + yyj945++ + if yyhl945 { + yyb945 = yyj945 > l } else { - yyb940 = r.CheckBreak() + yyb945 = r.CheckBreak() } - if yyb940 { + if yyb945 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8453,13 +8501,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.Port = int32(r.DecodeInt(32)) } - yyj940++ - if yyhl940 { - yyb940 = yyj940 > l + yyj945++ + if yyhl945 { + yyb945 = yyj945 > l } else { - yyb940 = r.CheckBreak() + yyb945 = r.CheckBreak() } - if yyb940 { + if yyb945 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8469,13 +8517,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.Address = string(r.DecodeString()) } - yyj940++ - if yyhl940 { - yyb940 = yyj940 > l + yyj945++ + if yyhl945 { + yyb945 = yyj945 > l } else { - yyb940 = r.CheckBreak() + yyb945 = r.CheckBreak() } - if yyb940 { + if yyb945 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8485,13 +8533,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.AlgorithmProvider = string(r.DecodeString()) } - yyj940++ - if yyhl940 { - yyb940 = yyj940 > l + yyj945++ + if yyhl945 { + yyb945 = yyj945 > l } else { - yyb940 = r.CheckBreak() + yyb945 = r.CheckBreak() } - if yyb940 { + if yyb945 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8501,13 +8549,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.PolicyConfigFile = string(r.DecodeString()) } - yyj940++ - if yyhl940 { - yyb940 = yyj940 > l + yyj945++ + if yyhl945 { + yyb945 = yyj945 > l } else { - yyb940 = r.CheckBreak() + yyb945 = r.CheckBreak() } - if yyb940 { + if yyb945 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8517,13 +8565,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.EnableProfiling = bool(r.DecodeBool()) } - yyj940++ - if yyhl940 { - yyb940 = yyj940 > l + yyj945++ + if yyhl945 { + yyb945 = yyj945 > l } else { - yyb940 = r.CheckBreak() + yyb945 = r.CheckBreak() } - if yyb940 { + if yyb945 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8533,13 +8581,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.ContentType = string(r.DecodeString()) } - yyj940++ - if yyhl940 { - yyb940 = yyj940 > l + yyj945++ + if yyhl945 { + yyb945 = yyj945 > l } else { - yyb940 = r.CheckBreak() + yyb945 = r.CheckBreak() } - if yyb940 { + if yyb945 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8549,13 +8597,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.KubeAPIQPS = float32(r.DecodeFloat(true)) } - yyj940++ - if yyhl940 { - yyb940 = yyj940 > l + yyj945++ + if yyhl945 { + yyb945 = yyj945 > l } else { - yyb940 = r.CheckBreak() + yyb945 = r.CheckBreak() } - if yyb940 { + if yyb945 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8565,13 +8613,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.KubeAPIBurst = int32(r.DecodeInt(32)) } - yyj940++ - if yyhl940 { - yyb940 = yyj940 > l + yyj945++ + if yyhl945 { + yyb945 = yyj945 > l } else { - yyb940 = r.CheckBreak() + yyb945 = r.CheckBreak() } - if yyb940 { + if yyb945 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8581,13 +8629,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.SchedulerName = string(r.DecodeString()) } - yyj940++ - if yyhl940 { - yyb940 = yyj940 > l + yyj945++ + if yyhl945 { + yyb945 = yyj945 > l } else { - yyb940 = r.CheckBreak() + yyb945 = r.CheckBreak() } - if yyb940 { + if yyb945 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8597,13 +8645,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.HardPodAffinitySymmetricWeight = int(r.DecodeInt(codecSelferBitsize1234)) } - yyj940++ - if yyhl940 { - yyb940 = yyj940 > l + yyj945++ + if yyhl945 { + yyb945 = yyj945 > l } else { - yyb940 = r.CheckBreak() + yyb945 = r.CheckBreak() } - if yyb940 { + if yyb945 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8613,13 +8661,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.FailureDomains = string(r.DecodeString()) } - yyj940++ - if yyhl940 { - yyb940 = yyj940 > l + yyj945++ + if yyhl945 { + yyb945 = yyj945 > l } else { - yyb940 = r.CheckBreak() + yyb945 = r.CheckBreak() } - if yyb940 { + if yyb945 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8627,21 +8675,21 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 if r.TryDecodeAsNil() { x.LeaderElection = LeaderElectionConfiguration{} } else { - yyv954 := &x.LeaderElection - yyv954.CodecDecodeSelf(d) + yyv959 := &x.LeaderElection + yyv959.CodecDecodeSelf(d) } for { - yyj940++ - if yyhl940 { - yyb940 = yyj940 > l + yyj945++ + if yyhl945 { + yyb945 = yyj945 > l } else { - yyb940 = r.CheckBreak() + yyb945 = r.CheckBreak() } - if yyb940 { + if yyb945 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj940-1, "") + z.DecStructFieldNotFound(yyj945-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -8653,33 +8701,33 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym955 := z.EncBinary() - _ = yym955 + yym960 := z.EncBinary() + _ = yym960 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep956 := !z.EncBinary() - yy2arr956 := z.EncBasicHandle().StructToArray - var yyq956 [4]bool - _, _, _ = yysep956, yyq956, yy2arr956 - const yyr956 bool = false - var yynn956 int - if yyr956 || yy2arr956 { + yysep961 := !z.EncBinary() + yy2arr961 := z.EncBasicHandle().StructToArray + var yyq961 [4]bool + _, _, _ = yysep961, yyq961, yy2arr961 + const yyr961 bool = false + var yynn961 int + if yyr961 || yy2arr961 { r.EncodeArrayStart(4) } else { - yynn956 = 4 - for _, b := range yyq956 { + yynn961 = 4 + for _, b := range yyq961 { if b { - yynn956++ + yynn961++ } } - r.EncodeMapStart(yynn956) - yynn956 = 0 + r.EncodeMapStart(yynn961) + yynn961 = 0 } - if yyr956 || yy2arr956 { + if yyr961 || yy2arr961 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym958 := z.EncBinary() - _ = yym958 + yym963 := z.EncBinary() + _ = yym963 if false { } else { r.EncodeBool(bool(x.LeaderElect)) @@ -8688,43 +8736,16 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("leaderElect")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym959 := z.EncBinary() - _ = yym959 + yym964 := z.EncBinary() + _ = yym964 if false { } else { r.EncodeBool(bool(x.LeaderElect)) } } - if yyr956 || yy2arr956 { + if yyr961 || yy2arr961 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy961 := &x.LeaseDuration - yym962 := z.EncBinary() - _ = yym962 - if false { - } else if z.HasExtensions() && z.EncExt(yy961) { - } else if !yym962 && z.IsJSONHandle() { - z.EncJSONMarshal(yy961) - } else { - z.EncFallback(yy961) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("leaseDuration")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy963 := &x.LeaseDuration - yym964 := z.EncBinary() - _ = yym964 - if false { - } else if z.HasExtensions() && z.EncExt(yy963) { - } else if !yym964 && z.IsJSONHandle() { - z.EncJSONMarshal(yy963) - } else { - z.EncFallback(yy963) - } - } - if yyr956 || yy2arr956 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy966 := &x.RenewDeadline + yy966 := &x.LeaseDuration yym967 := z.EncBinary() _ = yym967 if false { @@ -8736,9 +8757,9 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("renewDeadline")) + r.EncodeString(codecSelferC_UTF81234, string("leaseDuration")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy968 := &x.RenewDeadline + yy968 := &x.LeaseDuration yym969 := z.EncBinary() _ = yym969 if false { @@ -8749,9 +8770,9 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncFallback(yy968) } } - if yyr956 || yy2arr956 { + if yyr961 || yy2arr961 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy971 := &x.RetryPeriod + yy971 := &x.RenewDeadline yym972 := z.EncBinary() _ = yym972 if false { @@ -8763,9 +8784,9 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("retryPeriod")) + r.EncodeString(codecSelferC_UTF81234, string("renewDeadline")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy973 := &x.RetryPeriod + yy973 := &x.RenewDeadline yym974 := z.EncBinary() _ = yym974 if false { @@ -8776,7 +8797,34 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncFallback(yy973) } } - if yyr956 || yy2arr956 { + if yyr961 || yy2arr961 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy976 := &x.RetryPeriod + yym977 := z.EncBinary() + _ = yym977 + if false { + } else if z.HasExtensions() && z.EncExt(yy976) { + } else if !yym977 && z.IsJSONHandle() { + z.EncJSONMarshal(yy976) + } else { + z.EncFallback(yy976) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("retryPeriod")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy978 := &x.RetryPeriod + yym979 := z.EncBinary() + _ = yym979 + if false { + } else if z.HasExtensions() && z.EncExt(yy978) { + } else if !yym979 && z.IsJSONHandle() { + z.EncJSONMarshal(yy978) + } else { + z.EncFallback(yy978) + } + } + if yyr961 || yy2arr961 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -8789,25 +8837,25 @@ func (x *LeaderElectionConfiguration) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym975 := z.DecBinary() - _ = yym975 + yym980 := z.DecBinary() + _ = yym980 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct976 := r.ContainerType() - if yyct976 == codecSelferValueTypeMap1234 { - yyl976 := r.ReadMapStart() - if yyl976 == 0 { + yyct981 := r.ContainerType() + if yyct981 == codecSelferValueTypeMap1234 { + yyl981 := r.ReadMapStart() + if yyl981 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl976, d) + x.codecDecodeSelfFromMap(yyl981, d) } - } else if yyct976 == codecSelferValueTypeArray1234 { - yyl976 := r.ReadArrayStart() - if yyl976 == 0 { + } else if yyct981 == codecSelferValueTypeArray1234 { + yyl981 := r.ReadArrayStart() + if yyl981 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl976, d) + x.codecDecodeSelfFromArray(yyl981, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -8819,12 +8867,12 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromMap(l int, d *codec1978 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys977Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys977Slc - var yyhl977 bool = l >= 0 - for yyj977 := 0; ; yyj977++ { - if yyhl977 { - if yyj977 >= l { + var yys982Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys982Slc + var yyhl982 bool = l >= 0 + for yyj982 := 0; ; yyj982++ { + if yyhl982 { + if yyj982 >= l { break } } else { @@ -8833,10 +8881,10 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromMap(l int, d *codec1978 } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys977Slc = r.DecodeBytes(yys977Slc, true, true) - yys977 := string(yys977Slc) + yys982Slc = r.DecodeBytes(yys982Slc, true, true) + yys982 := string(yys982Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys977 { + switch yys982 { case "leaderElect": if r.TryDecodeAsNil() { x.LeaderElect = false @@ -8847,51 +8895,51 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromMap(l int, d *codec1978 if r.TryDecodeAsNil() { x.LeaseDuration = pkg1_unversioned.Duration{} } else { - yyv979 := &x.LeaseDuration - yym980 := z.DecBinary() - _ = yym980 + yyv984 := &x.LeaseDuration + yym985 := z.DecBinary() + _ = yym985 if false { - } else if z.HasExtensions() && z.DecExt(yyv979) { - } else if !yym980 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv979) + } else if z.HasExtensions() && z.DecExt(yyv984) { + } else if !yym985 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv984) } else { - z.DecFallback(yyv979, false) + z.DecFallback(yyv984, false) } } case "renewDeadline": if r.TryDecodeAsNil() { x.RenewDeadline = pkg1_unversioned.Duration{} } else { - yyv981 := &x.RenewDeadline - yym982 := z.DecBinary() - _ = yym982 + yyv986 := &x.RenewDeadline + yym987 := z.DecBinary() + _ = yym987 if false { - } else if z.HasExtensions() && z.DecExt(yyv981) { - } else if !yym982 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv981) + } else if z.HasExtensions() && z.DecExt(yyv986) { + } else if !yym987 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv986) } else { - z.DecFallback(yyv981, false) + z.DecFallback(yyv986, false) } } case "retryPeriod": if r.TryDecodeAsNil() { x.RetryPeriod = pkg1_unversioned.Duration{} } else { - yyv983 := &x.RetryPeriod - yym984 := z.DecBinary() - _ = yym984 + yyv988 := &x.RetryPeriod + yym989 := z.DecBinary() + _ = yym989 if false { - } else if z.HasExtensions() && z.DecExt(yyv983) { - } else if !yym984 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv983) + } else if z.HasExtensions() && z.DecExt(yyv988) { + } else if !yym989 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv988) } else { - z.DecFallback(yyv983, false) + z.DecFallback(yyv988, false) } } default: - z.DecStructFieldNotFound(-1, yys977) - } // end switch yys977 - } // end for yyj977 + z.DecStructFieldNotFound(-1, yys982) + } // end switch yys982 + } // end for yyj982 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -8899,16 +8947,16 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj985 int - var yyb985 bool - var yyhl985 bool = l >= 0 - yyj985++ - if yyhl985 { - yyb985 = yyj985 > l + var yyj990 int + var yyb990 bool + var yyhl990 bool = l >= 0 + yyj990++ + if yyhl990 { + yyb990 = yyj990 > l } else { - yyb985 = r.CheckBreak() + yyb990 = r.CheckBreak() } - if yyb985 { + if yyb990 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8918,13 +8966,13 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19 } else { x.LeaderElect = bool(r.DecodeBool()) } - yyj985++ - if yyhl985 { - yyb985 = yyj985 > l + yyj990++ + if yyhl990 { + yyb990 = yyj990 > l } else { - yyb985 = r.CheckBreak() + yyb990 = r.CheckBreak() } - if yyb985 { + if yyb990 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8932,24 +8980,24 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19 if r.TryDecodeAsNil() { x.LeaseDuration = pkg1_unversioned.Duration{} } else { - yyv987 := &x.LeaseDuration - yym988 := z.DecBinary() - _ = yym988 + yyv992 := &x.LeaseDuration + yym993 := z.DecBinary() + _ = yym993 if false { - } else if z.HasExtensions() && z.DecExt(yyv987) { - } else if !yym988 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv987) + } else if z.HasExtensions() && z.DecExt(yyv992) { + } else if !yym993 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv992) } else { - z.DecFallback(yyv987, false) + z.DecFallback(yyv992, false) } } - yyj985++ - if yyhl985 { - yyb985 = yyj985 > l + yyj990++ + if yyhl990 { + yyb990 = yyj990 > l } else { - yyb985 = r.CheckBreak() + yyb990 = r.CheckBreak() } - if yyb985 { + if yyb990 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8957,24 +9005,24 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19 if r.TryDecodeAsNil() { x.RenewDeadline = pkg1_unversioned.Duration{} } else { - yyv989 := &x.RenewDeadline - yym990 := z.DecBinary() - _ = yym990 + yyv994 := &x.RenewDeadline + yym995 := z.DecBinary() + _ = yym995 if false { - } else if z.HasExtensions() && z.DecExt(yyv989) { - } else if !yym990 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv989) + } else if z.HasExtensions() && z.DecExt(yyv994) { + } else if !yym995 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv994) } else { - z.DecFallback(yyv989, false) + z.DecFallback(yyv994, false) } } - yyj985++ - if yyhl985 { - yyb985 = yyj985 > l + yyj990++ + if yyhl990 { + yyb990 = yyj990 > l } else { - yyb985 = r.CheckBreak() + yyb990 = r.CheckBreak() } - if yyb985 { + if yyb990 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8982,29 +9030,29 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19 if r.TryDecodeAsNil() { x.RetryPeriod = pkg1_unversioned.Duration{} } else { - yyv991 := &x.RetryPeriod - yym992 := z.DecBinary() - _ = yym992 + yyv996 := &x.RetryPeriod + yym997 := z.DecBinary() + _ = yym997 if false { - } else if z.HasExtensions() && z.DecExt(yyv991) { - } else if !yym992 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv991) + } else if z.HasExtensions() && z.DecExt(yyv996) { + } else if !yym997 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv996) } else { - z.DecFallback(yyv991, false) + z.DecFallback(yyv996, false) } } for { - yyj985++ - if yyhl985 { - yyb985 = yyj985 > l + yyj990++ + if yyhl990 { + yyb990 = yyj990 > l } else { - yyb985 = r.CheckBreak() + yyb990 = r.CheckBreak() } - if yyb985 { + if yyb990 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj985-1, "") + z.DecStructFieldNotFound(yyj990-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -9016,36 +9064,36 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode if x == nil { r.EncodeNil() } else { - yym993 := z.EncBinary() - _ = yym993 + yym998 := z.EncBinary() + _ = yym998 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep994 := !z.EncBinary() - yy2arr994 := z.EncBasicHandle().StructToArray - var yyq994 [61]bool - _, _, _ = yysep994, yyq994, yy2arr994 - const yyr994 bool = false - yyq994[0] = x.Kind != "" - yyq994[1] = x.APIVersion != "" - var yynn994 int - if yyr994 || yy2arr994 { + yysep999 := !z.EncBinary() + yy2arr999 := z.EncBasicHandle().StructToArray + var yyq999 [61]bool + _, _, _ = yysep999, yyq999, yy2arr999 + const yyr999 bool = false + yyq999[0] = x.Kind != "" + yyq999[1] = x.APIVersion != "" + var yynn999 int + if yyr999 || yy2arr999 { r.EncodeArrayStart(61) } else { - yynn994 = 59 - for _, b := range yyq994 { + yynn999 = 59 + for _, b := range yyq999 { if b { - yynn994++ + yynn999++ } } - r.EncodeMapStart(yynn994) - yynn994 = 0 + r.EncodeMapStart(yynn999) + yynn999 = 0 } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq994[0] { - yym996 := z.EncBinary() - _ = yym996 + if yyq999[0] { + yym1001 := z.EncBinary() + _ = yym1001 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -9054,23 +9102,23 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq994[0] { + if yyq999[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym997 := z.EncBinary() - _ = yym997 + yym1002 := z.EncBinary() + _ = yym1002 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq994[1] { - yym999 := z.EncBinary() - _ = yym999 + if yyq999[1] { + yym1004 := z.EncBinary() + _ = yym1004 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -9079,22 +9127,22 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq994[1] { + if yyq999[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1000 := z.EncBinary() - _ = yym1000 + yym1005 := z.EncBinary() + _ = yym1005 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1002 := z.EncBinary() - _ = yym1002 + yym1007 := z.EncBinary() + _ = yym1007 if false { } else { r.EncodeInt(int64(x.Port)) @@ -9103,17 +9151,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("port")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1003 := z.EncBinary() - _ = yym1003 + yym1008 := z.EncBinary() + _ = yym1008 if false { } else { r.EncodeInt(int64(x.Port)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1005 := z.EncBinary() - _ = yym1005 + yym1010 := z.EncBinary() + _ = yym1010 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Address)) @@ -9122,17 +9170,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("address")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1006 := z.EncBinary() - _ = yym1006 + yym1011 := z.EncBinary() + _ = yym1011 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Address)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1008 := z.EncBinary() - _ = yym1008 + yym1013 := z.EncBinary() + _ = yym1013 if false { } else { r.EncodeBool(bool(x.UseServiceAccountCredentials)) @@ -9141,17 +9189,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("useServiceAccountCredentials")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1009 := z.EncBinary() - _ = yym1009 + yym1014 := z.EncBinary() + _ = yym1014 if false { } else { r.EncodeBool(bool(x.UseServiceAccountCredentials)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1011 := z.EncBinary() - _ = yym1011 + yym1016 := z.EncBinary() + _ = yym1016 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.CloudProvider)) @@ -9160,17 +9208,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("cloudProvider")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1012 := z.EncBinary() - _ = yym1012 + yym1017 := z.EncBinary() + _ = yym1017 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.CloudProvider)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1014 := z.EncBinary() - _ = yym1014 + yym1019 := z.EncBinary() + _ = yym1019 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.CloudConfigFile)) @@ -9179,17 +9227,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("cloudConfigFile")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1015 := z.EncBinary() - _ = yym1015 + yym1020 := z.EncBinary() + _ = yym1020 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.CloudConfigFile)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1017 := z.EncBinary() - _ = yym1017 + yym1022 := z.EncBinary() + _ = yym1022 if false { } else { r.EncodeInt(int64(x.ConcurrentEndpointSyncs)) @@ -9198,17 +9246,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("concurrentEndpointSyncs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1018 := z.EncBinary() - _ = yym1018 + yym1023 := z.EncBinary() + _ = yym1023 if false { } else { r.EncodeInt(int64(x.ConcurrentEndpointSyncs)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1020 := z.EncBinary() - _ = yym1020 + yym1025 := z.EncBinary() + _ = yym1025 if false { } else { r.EncodeInt(int64(x.ConcurrentRSSyncs)) @@ -9217,17 +9265,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("concurrentRSSyncs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1021 := z.EncBinary() - _ = yym1021 + yym1026 := z.EncBinary() + _ = yym1026 if false { } else { r.EncodeInt(int64(x.ConcurrentRSSyncs)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1023 := z.EncBinary() - _ = yym1023 + yym1028 := z.EncBinary() + _ = yym1028 if false { } else { r.EncodeInt(int64(x.ConcurrentRCSyncs)) @@ -9236,17 +9284,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("concurrentRCSyncs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1024 := z.EncBinary() - _ = yym1024 + yym1029 := z.EncBinary() + _ = yym1029 if false { } else { r.EncodeInt(int64(x.ConcurrentRCSyncs)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1026 := z.EncBinary() - _ = yym1026 + yym1031 := z.EncBinary() + _ = yym1031 if false { } else { r.EncodeInt(int64(x.ConcurrentServiceSyncs)) @@ -9255,17 +9303,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("concurrentServiceSyncs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1027 := z.EncBinary() - _ = yym1027 + yym1032 := z.EncBinary() + _ = yym1032 if false { } else { r.EncodeInt(int64(x.ConcurrentServiceSyncs)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1029 := z.EncBinary() - _ = yym1029 + yym1034 := z.EncBinary() + _ = yym1034 if false { } else { r.EncodeInt(int64(x.ConcurrentResourceQuotaSyncs)) @@ -9274,17 +9322,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("concurrentResourceQuotaSyncs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1030 := z.EncBinary() - _ = yym1030 + yym1035 := z.EncBinary() + _ = yym1035 if false { } else { r.EncodeInt(int64(x.ConcurrentResourceQuotaSyncs)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1032 := z.EncBinary() - _ = yym1032 + yym1037 := z.EncBinary() + _ = yym1037 if false { } else { r.EncodeInt(int64(x.ConcurrentDeploymentSyncs)) @@ -9293,17 +9341,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("concurrentDeploymentSyncs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1033 := z.EncBinary() - _ = yym1033 + yym1038 := z.EncBinary() + _ = yym1038 if false { } else { r.EncodeInt(int64(x.ConcurrentDeploymentSyncs)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1035 := z.EncBinary() - _ = yym1035 + yym1040 := z.EncBinary() + _ = yym1040 if false { } else { r.EncodeInt(int64(x.ConcurrentDaemonSetSyncs)) @@ -9312,17 +9360,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("concurrentDaemonSetSyncs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1036 := z.EncBinary() - _ = yym1036 + yym1041 := z.EncBinary() + _ = yym1041 if false { } else { r.EncodeInt(int64(x.ConcurrentDaemonSetSyncs)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1038 := z.EncBinary() - _ = yym1038 + yym1043 := z.EncBinary() + _ = yym1043 if false { } else { r.EncodeInt(int64(x.ConcurrentJobSyncs)) @@ -9331,17 +9379,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("concurrentJobSyncs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1039 := z.EncBinary() - _ = yym1039 + yym1044 := z.EncBinary() + _ = yym1044 if false { } else { r.EncodeInt(int64(x.ConcurrentJobSyncs)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1041 := z.EncBinary() - _ = yym1041 + yym1046 := z.EncBinary() + _ = yym1046 if false { } else { r.EncodeInt(int64(x.ConcurrentNamespaceSyncs)) @@ -9350,17 +9398,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("concurrentNamespaceSyncs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1042 := z.EncBinary() - _ = yym1042 + yym1047 := z.EncBinary() + _ = yym1047 if false { } else { r.EncodeInt(int64(x.ConcurrentNamespaceSyncs)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1044 := z.EncBinary() - _ = yym1044 + yym1049 := z.EncBinary() + _ = yym1049 if false { } else { r.EncodeInt(int64(x.ConcurrentSATokenSyncs)) @@ -9369,17 +9417,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("concurrentSATokenSyncs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1045 := z.EncBinary() - _ = yym1045 + yym1050 := z.EncBinary() + _ = yym1050 if false { } else { r.EncodeInt(int64(x.ConcurrentSATokenSyncs)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1047 := z.EncBinary() - _ = yym1047 + yym1052 := z.EncBinary() + _ = yym1052 if false { } else { r.EncodeInt(int64(x.LookupCacheSizeForRC)) @@ -9388,17 +9436,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("lookupCacheSizeForRC")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1048 := z.EncBinary() - _ = yym1048 + yym1053 := z.EncBinary() + _ = yym1053 if false { } else { r.EncodeInt(int64(x.LookupCacheSizeForRC)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1050 := z.EncBinary() - _ = yym1050 + yym1055 := z.EncBinary() + _ = yym1055 if false { } else { r.EncodeInt(int64(x.LookupCacheSizeForRS)) @@ -9407,17 +9455,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("lookupCacheSizeForRS")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1051 := z.EncBinary() - _ = yym1051 + yym1056 := z.EncBinary() + _ = yym1056 if false { } else { r.EncodeInt(int64(x.LookupCacheSizeForRS)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1053 := z.EncBinary() - _ = yym1053 + yym1058 := z.EncBinary() + _ = yym1058 if false { } else { r.EncodeInt(int64(x.LookupCacheSizeForDaemonSet)) @@ -9426,43 +9474,16 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("lookupCacheSizeForDaemonSet")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1054 := z.EncBinary() - _ = yym1054 + yym1059 := z.EncBinary() + _ = yym1059 if false { } else { r.EncodeInt(int64(x.LookupCacheSizeForDaemonSet)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1056 := &x.ServiceSyncPeriod - yym1057 := z.EncBinary() - _ = yym1057 - if false { - } else if z.HasExtensions() && z.EncExt(yy1056) { - } else if !yym1057 && z.IsJSONHandle() { - z.EncJSONMarshal(yy1056) - } else { - z.EncFallback(yy1056) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("serviceSyncPeriod")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1058 := &x.ServiceSyncPeriod - yym1059 := z.EncBinary() - _ = yym1059 - if false { - } else if z.HasExtensions() && z.EncExt(yy1058) { - } else if !yym1059 && z.IsJSONHandle() { - z.EncJSONMarshal(yy1058) - } else { - z.EncFallback(yy1058) - } - } - if yyr994 || yy2arr994 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1061 := &x.NodeSyncPeriod + yy1061 := &x.ServiceSyncPeriod yym1062 := z.EncBinary() _ = yym1062 if false { @@ -9474,9 +9495,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("nodeSyncPeriod")) + r.EncodeString(codecSelferC_UTF81234, string("serviceSyncPeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1063 := &x.NodeSyncPeriod + yy1063 := &x.ServiceSyncPeriod yym1064 := z.EncBinary() _ = yym1064 if false { @@ -9487,9 +9508,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncFallback(yy1063) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1066 := &x.RouteReconciliationPeriod + yy1066 := &x.NodeSyncPeriod yym1067 := z.EncBinary() _ = yym1067 if false { @@ -9501,9 +9522,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("routeReconciliationPeriod")) + r.EncodeString(codecSelferC_UTF81234, string("nodeSyncPeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1068 := &x.RouteReconciliationPeriod + yy1068 := &x.NodeSyncPeriod yym1069 := z.EncBinary() _ = yym1069 if false { @@ -9514,9 +9535,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncFallback(yy1068) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1071 := &x.ResourceQuotaSyncPeriod + yy1071 := &x.RouteReconciliationPeriod yym1072 := z.EncBinary() _ = yym1072 if false { @@ -9528,9 +9549,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("resourceQuotaSyncPeriod")) + r.EncodeString(codecSelferC_UTF81234, string("routeReconciliationPeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1073 := &x.ResourceQuotaSyncPeriod + yy1073 := &x.RouteReconciliationPeriod yym1074 := z.EncBinary() _ = yym1074 if false { @@ -9541,9 +9562,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncFallback(yy1073) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1076 := &x.NamespaceSyncPeriod + yy1076 := &x.ResourceQuotaSyncPeriod yym1077 := z.EncBinary() _ = yym1077 if false { @@ -9555,9 +9576,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("namespaceSyncPeriod")) + r.EncodeString(codecSelferC_UTF81234, string("resourceQuotaSyncPeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1078 := &x.NamespaceSyncPeriod + yy1078 := &x.ResourceQuotaSyncPeriod yym1079 := z.EncBinary() _ = yym1079 if false { @@ -9568,9 +9589,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncFallback(yy1078) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1081 := &x.PVClaimBinderSyncPeriod + yy1081 := &x.NamespaceSyncPeriod yym1082 := z.EncBinary() _ = yym1082 if false { @@ -9582,9 +9603,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("pvClaimBinderSyncPeriod")) + r.EncodeString(codecSelferC_UTF81234, string("namespaceSyncPeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1083 := &x.PVClaimBinderSyncPeriod + yy1083 := &x.NamespaceSyncPeriod yym1084 := z.EncBinary() _ = yym1084 if false { @@ -9595,9 +9616,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncFallback(yy1083) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1086 := &x.MinResyncPeriod + yy1086 := &x.PVClaimBinderSyncPeriod yym1087 := z.EncBinary() _ = yym1087 if false { @@ -9609,9 +9630,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("minResyncPeriod")) + r.EncodeString(codecSelferC_UTF81234, string("pvClaimBinderSyncPeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1088 := &x.MinResyncPeriod + yy1088 := &x.PVClaimBinderSyncPeriod yym1089 := z.EncBinary() _ = yym1089 if false { @@ -9622,10 +9643,37 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncFallback(yy1088) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1091 := z.EncBinary() - _ = yym1091 + yy1091 := &x.MinResyncPeriod + yym1092 := z.EncBinary() + _ = yym1092 + if false { + } else if z.HasExtensions() && z.EncExt(yy1091) { + } else if !yym1092 && z.IsJSONHandle() { + z.EncJSONMarshal(yy1091) + } else { + z.EncFallback(yy1091) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("minResyncPeriod")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy1093 := &x.MinResyncPeriod + yym1094 := z.EncBinary() + _ = yym1094 + if false { + } else if z.HasExtensions() && z.EncExt(yy1093) { + } else if !yym1094 && z.IsJSONHandle() { + z.EncJSONMarshal(yy1093) + } else { + z.EncFallback(yy1093) + } + } + if yyr999 || yy2arr999 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym1096 := z.EncBinary() + _ = yym1096 if false { } else { r.EncodeInt(int64(x.TerminatedPodGCThreshold)) @@ -9634,43 +9682,16 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("terminatedPodGCThreshold")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1092 := z.EncBinary() - _ = yym1092 + yym1097 := z.EncBinary() + _ = yym1097 if false { } else { r.EncodeInt(int64(x.TerminatedPodGCThreshold)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1094 := &x.HorizontalPodAutoscalerSyncPeriod - yym1095 := z.EncBinary() - _ = yym1095 - if false { - } else if z.HasExtensions() && z.EncExt(yy1094) { - } else if !yym1095 && z.IsJSONHandle() { - z.EncJSONMarshal(yy1094) - } else { - z.EncFallback(yy1094) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("horizontalPodAutoscalerSyncPeriod")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1096 := &x.HorizontalPodAutoscalerSyncPeriod - yym1097 := z.EncBinary() - _ = yym1097 - if false { - } else if z.HasExtensions() && z.EncExt(yy1096) { - } else if !yym1097 && z.IsJSONHandle() { - z.EncJSONMarshal(yy1096) - } else { - z.EncFallback(yy1096) - } - } - if yyr994 || yy2arr994 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1099 := &x.DeploymentControllerSyncPeriod + yy1099 := &x.HorizontalPodAutoscalerSyncPeriod yym1100 := z.EncBinary() _ = yym1100 if false { @@ -9682,9 +9703,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("deploymentControllerSyncPeriod")) + r.EncodeString(codecSelferC_UTF81234, string("horizontalPodAutoscalerSyncPeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1101 := &x.DeploymentControllerSyncPeriod + yy1101 := &x.HorizontalPodAutoscalerSyncPeriod yym1102 := z.EncBinary() _ = yym1102 if false { @@ -9695,9 +9716,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncFallback(yy1101) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1104 := &x.PodEvictionTimeout + yy1104 := &x.DeploymentControllerSyncPeriod yym1105 := z.EncBinary() _ = yym1105 if false { @@ -9709,9 +9730,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("podEvictionTimeout")) + r.EncodeString(codecSelferC_UTF81234, string("deploymentControllerSyncPeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1106 := &x.PodEvictionTimeout + yy1106 := &x.DeploymentControllerSyncPeriod yym1107 := z.EncBinary() _ = yym1107 if false { @@ -9722,10 +9743,37 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncFallback(yy1106) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1109 := z.EncBinary() - _ = yym1109 + yy1109 := &x.PodEvictionTimeout + yym1110 := z.EncBinary() + _ = yym1110 + if false { + } else if z.HasExtensions() && z.EncExt(yy1109) { + } else if !yym1110 && z.IsJSONHandle() { + z.EncJSONMarshal(yy1109) + } else { + z.EncFallback(yy1109) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("podEvictionTimeout")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy1111 := &x.PodEvictionTimeout + yym1112 := z.EncBinary() + _ = yym1112 + if false { + } else if z.HasExtensions() && z.EncExt(yy1111) { + } else if !yym1112 && z.IsJSONHandle() { + z.EncJSONMarshal(yy1111) + } else { + z.EncFallback(yy1111) + } + } + if yyr999 || yy2arr999 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym1114 := z.EncBinary() + _ = yym1114 if false { } else { r.EncodeFloat32(float32(x.DeletingPodsQps)) @@ -9734,17 +9782,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("deletingPodsQps")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1110 := z.EncBinary() - _ = yym1110 + yym1115 := z.EncBinary() + _ = yym1115 if false { } else { r.EncodeFloat32(float32(x.DeletingPodsQps)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1112 := z.EncBinary() - _ = yym1112 + yym1117 := z.EncBinary() + _ = yym1117 if false { } else { r.EncodeInt(int64(x.DeletingPodsBurst)) @@ -9753,44 +9801,44 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("deletingPodsBurst")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1113 := z.EncBinary() - _ = yym1113 + yym1118 := z.EncBinary() + _ = yym1118 if false { } else { r.EncodeInt(int64(x.DeletingPodsBurst)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1115 := &x.NodeMonitorGracePeriod - yym1116 := z.EncBinary() - _ = yym1116 + yy1120 := &x.NodeMonitorGracePeriod + yym1121 := z.EncBinary() + _ = yym1121 if false { - } else if z.HasExtensions() && z.EncExt(yy1115) { - } else if !yym1116 && z.IsJSONHandle() { - z.EncJSONMarshal(yy1115) + } else if z.HasExtensions() && z.EncExt(yy1120) { + } else if !yym1121 && z.IsJSONHandle() { + z.EncJSONMarshal(yy1120) } else { - z.EncFallback(yy1115) + z.EncFallback(yy1120) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nodeMonitorGracePeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1117 := &x.NodeMonitorGracePeriod - yym1118 := z.EncBinary() - _ = yym1118 + yy1122 := &x.NodeMonitorGracePeriod + yym1123 := z.EncBinary() + _ = yym1123 if false { - } else if z.HasExtensions() && z.EncExt(yy1117) { - } else if !yym1118 && z.IsJSONHandle() { - z.EncJSONMarshal(yy1117) + } else if z.HasExtensions() && z.EncExt(yy1122) { + } else if !yym1123 && z.IsJSONHandle() { + z.EncJSONMarshal(yy1122) } else { - z.EncFallback(yy1117) + z.EncFallback(yy1122) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1120 := z.EncBinary() - _ = yym1120 + yym1125 := z.EncBinary() + _ = yym1125 if false { } else { r.EncodeInt(int64(x.RegisterRetryCount)) @@ -9799,43 +9847,16 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("registerRetryCount")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1121 := z.EncBinary() - _ = yym1121 + yym1126 := z.EncBinary() + _ = yym1126 if false { } else { r.EncodeInt(int64(x.RegisterRetryCount)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1123 := &x.NodeStartupGracePeriod - yym1124 := z.EncBinary() - _ = yym1124 - if false { - } else if z.HasExtensions() && z.EncExt(yy1123) { - } else if !yym1124 && z.IsJSONHandle() { - z.EncJSONMarshal(yy1123) - } else { - z.EncFallback(yy1123) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("nodeStartupGracePeriod")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1125 := &x.NodeStartupGracePeriod - yym1126 := z.EncBinary() - _ = yym1126 - if false { - } else if z.HasExtensions() && z.EncExt(yy1125) { - } else if !yym1126 && z.IsJSONHandle() { - z.EncJSONMarshal(yy1125) - } else { - z.EncFallback(yy1125) - } - } - if yyr994 || yy2arr994 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1128 := &x.NodeMonitorPeriod + yy1128 := &x.NodeStartupGracePeriod yym1129 := z.EncBinary() _ = yym1129 if false { @@ -9847,9 +9868,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("nodeMonitorPeriod")) + r.EncodeString(codecSelferC_UTF81234, string("nodeStartupGracePeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1130 := &x.NodeMonitorPeriod + yy1130 := &x.NodeStartupGracePeriod yym1131 := z.EncBinary() _ = yym1131 if false { @@ -9860,10 +9881,37 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncFallback(yy1130) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1133 := z.EncBinary() - _ = yym1133 + yy1133 := &x.NodeMonitorPeriod + yym1134 := z.EncBinary() + _ = yym1134 + if false { + } else if z.HasExtensions() && z.EncExt(yy1133) { + } else if !yym1134 && z.IsJSONHandle() { + z.EncJSONMarshal(yy1133) + } else { + z.EncFallback(yy1133) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("nodeMonitorPeriod")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy1135 := &x.NodeMonitorPeriod + yym1136 := z.EncBinary() + _ = yym1136 + if false { + } else if z.HasExtensions() && z.EncExt(yy1135) { + } else if !yym1136 && z.IsJSONHandle() { + z.EncJSONMarshal(yy1135) + } else { + z.EncFallback(yy1135) + } + } + if yyr999 || yy2arr999 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym1138 := z.EncBinary() + _ = yym1138 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountKeyFile)) @@ -9872,17 +9920,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("serviceAccountKeyFile")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1134 := z.EncBinary() - _ = yym1134 + yym1139 := z.EncBinary() + _ = yym1139 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountKeyFile)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1136 := z.EncBinary() - _ = yym1136 + yym1141 := z.EncBinary() + _ = yym1141 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ClusterSigningCertFile)) @@ -9891,17 +9939,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("clusterSigningCertFile")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1137 := z.EncBinary() - _ = yym1137 + yym1142 := z.EncBinary() + _ = yym1142 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ClusterSigningCertFile)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1139 := z.EncBinary() - _ = yym1139 + yym1144 := z.EncBinary() + _ = yym1144 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ClusterSigningKeyFile)) @@ -9910,17 +9958,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("clusterSigningKeyFile")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1140 := z.EncBinary() - _ = yym1140 + yym1145 := z.EncBinary() + _ = yym1145 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ClusterSigningKeyFile)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1142 := z.EncBinary() - _ = yym1142 + yym1147 := z.EncBinary() + _ = yym1147 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ApproveAllKubeletCSRsForGroup)) @@ -9929,17 +9977,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("approveAllKubeletCSRsForGroup")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1143 := z.EncBinary() - _ = yym1143 + yym1148 := z.EncBinary() + _ = yym1148 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ApproveAllKubeletCSRsForGroup)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1145 := z.EncBinary() - _ = yym1145 + yym1150 := z.EncBinary() + _ = yym1150 if false { } else { r.EncodeBool(bool(x.EnableProfiling)) @@ -9948,17 +9996,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("enableProfiling")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1146 := z.EncBinary() - _ = yym1146 + yym1151 := z.EncBinary() + _ = yym1151 if false { } else { r.EncodeBool(bool(x.EnableProfiling)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1148 := z.EncBinary() - _ = yym1148 + yym1153 := z.EncBinary() + _ = yym1153 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName)) @@ -9967,17 +10015,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("clusterName")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1149 := z.EncBinary() - _ = yym1149 + yym1154 := z.EncBinary() + _ = yym1154 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1151 := z.EncBinary() - _ = yym1151 + yym1156 := z.EncBinary() + _ = yym1156 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ClusterCIDR)) @@ -9986,17 +10034,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("clusterCIDR")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1152 := z.EncBinary() - _ = yym1152 + yym1157 := z.EncBinary() + _ = yym1157 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ClusterCIDR)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1154 := z.EncBinary() - _ = yym1154 + yym1159 := z.EncBinary() + _ = yym1159 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ServiceCIDR)) @@ -10005,17 +10053,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("serviceCIDR")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1155 := z.EncBinary() - _ = yym1155 + yym1160 := z.EncBinary() + _ = yym1160 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ServiceCIDR)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1157 := z.EncBinary() - _ = yym1157 + yym1162 := z.EncBinary() + _ = yym1162 if false { } else { r.EncodeInt(int64(x.NodeCIDRMaskSize)) @@ -10024,17 +10072,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nodeCIDRMaskSize")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1158 := z.EncBinary() - _ = yym1158 + yym1163 := z.EncBinary() + _ = yym1163 if false { } else { r.EncodeInt(int64(x.NodeCIDRMaskSize)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1160 := z.EncBinary() - _ = yym1160 + yym1165 := z.EncBinary() + _ = yym1165 if false { } else { r.EncodeBool(bool(x.AllocateNodeCIDRs)) @@ -10043,17 +10091,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("allocateNodeCIDRs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1161 := z.EncBinary() - _ = yym1161 + yym1166 := z.EncBinary() + _ = yym1166 if false { } else { r.EncodeBool(bool(x.AllocateNodeCIDRs)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1163 := z.EncBinary() - _ = yym1163 + yym1168 := z.EncBinary() + _ = yym1168 if false { } else { r.EncodeBool(bool(x.ConfigureCloudRoutes)) @@ -10062,17 +10110,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("configureCloudRoutes")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1164 := z.EncBinary() - _ = yym1164 + yym1169 := z.EncBinary() + _ = yym1169 if false { } else { r.EncodeBool(bool(x.ConfigureCloudRoutes)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1166 := z.EncBinary() - _ = yym1166 + yym1171 := z.EncBinary() + _ = yym1171 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.RootCAFile)) @@ -10081,17 +10129,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("rootCAFile")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1167 := z.EncBinary() - _ = yym1167 + yym1172 := z.EncBinary() + _ = yym1172 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.RootCAFile)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1169 := z.EncBinary() - _ = yym1169 + yym1174 := z.EncBinary() + _ = yym1174 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ContentType)) @@ -10100,17 +10148,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("contentType")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1170 := z.EncBinary() - _ = yym1170 + yym1175 := z.EncBinary() + _ = yym1175 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ContentType)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1172 := z.EncBinary() - _ = yym1172 + yym1177 := z.EncBinary() + _ = yym1177 if false { } else { r.EncodeFloat32(float32(x.KubeAPIQPS)) @@ -10119,17 +10167,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeAPIQPS")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1173 := z.EncBinary() - _ = yym1173 + yym1178 := z.EncBinary() + _ = yym1178 if false { } else { r.EncodeFloat32(float32(x.KubeAPIQPS)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1175 := z.EncBinary() - _ = yym1175 + yym1180 := z.EncBinary() + _ = yym1180 if false { } else { r.EncodeInt(int64(x.KubeAPIBurst)) @@ -10138,66 +10186,66 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeAPIBurst")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1176 := z.EncBinary() - _ = yym1176 + yym1181 := z.EncBinary() + _ = yym1181 if false { } else { r.EncodeInt(int64(x.KubeAPIBurst)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1178 := &x.LeaderElection - yy1178.CodecEncodeSelf(e) + yy1183 := &x.LeaderElection + yy1183.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("leaderElection")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1179 := &x.LeaderElection - yy1179.CodecEncodeSelf(e) + yy1184 := &x.LeaderElection + yy1184.CodecEncodeSelf(e) } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1181 := &x.VolumeConfiguration - yy1181.CodecEncodeSelf(e) + yy1186 := &x.VolumeConfiguration + yy1186.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("volumeConfiguration")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1182 := &x.VolumeConfiguration - yy1182.CodecEncodeSelf(e) + yy1187 := &x.VolumeConfiguration + yy1187.CodecEncodeSelf(e) } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1184 := &x.ControllerStartInterval - yym1185 := z.EncBinary() - _ = yym1185 + yy1189 := &x.ControllerStartInterval + yym1190 := z.EncBinary() + _ = yym1190 if false { - } else if z.HasExtensions() && z.EncExt(yy1184) { - } else if !yym1185 && z.IsJSONHandle() { - z.EncJSONMarshal(yy1184) + } else if z.HasExtensions() && z.EncExt(yy1189) { + } else if !yym1190 && z.IsJSONHandle() { + z.EncJSONMarshal(yy1189) } else { - z.EncFallback(yy1184) + z.EncFallback(yy1189) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("controllerStartInterval")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1186 := &x.ControllerStartInterval - yym1187 := z.EncBinary() - _ = yym1187 + yy1191 := &x.ControllerStartInterval + yym1192 := z.EncBinary() + _ = yym1192 if false { - } else if z.HasExtensions() && z.EncExt(yy1186) { - } else if !yym1187 && z.IsJSONHandle() { - z.EncJSONMarshal(yy1186) + } else if z.HasExtensions() && z.EncExt(yy1191) { + } else if !yym1192 && z.IsJSONHandle() { + z.EncJSONMarshal(yy1191) } else { - z.EncFallback(yy1186) + z.EncFallback(yy1191) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1189 := z.EncBinary() - _ = yym1189 + yym1194 := z.EncBinary() + _ = yym1194 if false { } else { r.EncodeBool(bool(x.EnableGarbageCollector)) @@ -10206,17 +10254,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("enableGarbageCollector")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1190 := z.EncBinary() - _ = yym1190 + yym1195 := z.EncBinary() + _ = yym1195 if false { } else { r.EncodeBool(bool(x.EnableGarbageCollector)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1192 := z.EncBinary() - _ = yym1192 + yym1197 := z.EncBinary() + _ = yym1197 if false { } else { r.EncodeInt(int64(x.ConcurrentGCSyncs)) @@ -10225,17 +10273,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("concurrentGCSyncs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1193 := z.EncBinary() - _ = yym1193 + yym1198 := z.EncBinary() + _ = yym1198 if false { } else { r.EncodeInt(int64(x.ConcurrentGCSyncs)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1195 := z.EncBinary() - _ = yym1195 + yym1200 := z.EncBinary() + _ = yym1200 if false { } else { r.EncodeFloat32(float32(x.NodeEvictionRate)) @@ -10244,17 +10292,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nodeEvictionRate")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1196 := z.EncBinary() - _ = yym1196 + yym1201 := z.EncBinary() + _ = yym1201 if false { } else { r.EncodeFloat32(float32(x.NodeEvictionRate)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1198 := z.EncBinary() - _ = yym1198 + yym1203 := z.EncBinary() + _ = yym1203 if false { } else { r.EncodeFloat32(float32(x.SecondaryNodeEvictionRate)) @@ -10263,17 +10311,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("secondaryNodeEvictionRate")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1199 := z.EncBinary() - _ = yym1199 + yym1204 := z.EncBinary() + _ = yym1204 if false { } else { r.EncodeFloat32(float32(x.SecondaryNodeEvictionRate)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1201 := z.EncBinary() - _ = yym1201 + yym1206 := z.EncBinary() + _ = yym1206 if false { } else { r.EncodeInt(int64(x.LargeClusterSizeThreshold)) @@ -10282,17 +10330,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("largeClusterSizeThreshold")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1202 := z.EncBinary() - _ = yym1202 + yym1207 := z.EncBinary() + _ = yym1207 if false { } else { r.EncodeInt(int64(x.LargeClusterSizeThreshold)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1204 := z.EncBinary() - _ = yym1204 + yym1209 := z.EncBinary() + _ = yym1209 if false { } else { r.EncodeFloat32(float32(x.UnhealthyZoneThreshold)) @@ -10301,14 +10349,14 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("unhealthyZoneThreshold")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1205 := z.EncBinary() - _ = yym1205 + yym1210 := z.EncBinary() + _ = yym1210 if false { } else { r.EncodeFloat32(float32(x.UnhealthyZoneThreshold)) } } - if yyr994 || yy2arr994 { + if yyr999 || yy2arr999 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -10321,25 +10369,25 @@ func (x *KubeControllerManagerConfiguration) CodecDecodeSelf(d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1206 := z.DecBinary() - _ = yym1206 + yym1211 := z.DecBinary() + _ = yym1211 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1207 := r.ContainerType() - if yyct1207 == codecSelferValueTypeMap1234 { - yyl1207 := r.ReadMapStart() - if yyl1207 == 0 { + yyct1212 := r.ContainerType() + if yyct1212 == codecSelferValueTypeMap1234 { + yyl1212 := r.ReadMapStart() + if yyl1212 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1207, d) + x.codecDecodeSelfFromMap(yyl1212, d) } - } else if yyct1207 == codecSelferValueTypeArray1234 { - yyl1207 := r.ReadArrayStart() - if yyl1207 == 0 { + } else if yyct1212 == codecSelferValueTypeArray1234 { + yyl1212 := r.ReadArrayStart() + if yyl1212 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1207, d) + x.codecDecodeSelfFromArray(yyl1212, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -10351,12 +10399,12 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromMap(l int, d *co var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1208Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1208Slc - var yyhl1208 bool = l >= 0 - for yyj1208 := 0; ; yyj1208++ { - if yyhl1208 { - if yyj1208 >= l { + var yys1213Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1213Slc + var yyhl1213 bool = l >= 0 + for yyj1213 := 0; ; yyj1213++ { + if yyhl1213 { + if yyj1213 >= l { break } } else { @@ -10365,10 +10413,10 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromMap(l int, d *co } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1208Slc = r.DecodeBytes(yys1208Slc, true, true) - yys1208 := string(yys1208Slc) + yys1213Slc = r.DecodeBytes(yys1213Slc, true, true) + yys1213 := string(yys1213Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1208 { + switch yys1213 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -10493,105 +10541,105 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromMap(l int, d *co if r.TryDecodeAsNil() { x.ServiceSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1229 := &x.ServiceSyncPeriod - yym1230 := z.DecBinary() - _ = yym1230 + yyv1234 := &x.ServiceSyncPeriod + yym1235 := z.DecBinary() + _ = yym1235 if false { - } else if z.HasExtensions() && z.DecExt(yyv1229) { - } else if !yym1230 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1229) + } else if z.HasExtensions() && z.DecExt(yyv1234) { + } else if !yym1235 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1234) } else { - z.DecFallback(yyv1229, false) + z.DecFallback(yyv1234, false) } } case "nodeSyncPeriod": if r.TryDecodeAsNil() { x.NodeSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1231 := &x.NodeSyncPeriod - yym1232 := z.DecBinary() - _ = yym1232 + yyv1236 := &x.NodeSyncPeriod + yym1237 := z.DecBinary() + _ = yym1237 if false { - } else if z.HasExtensions() && z.DecExt(yyv1231) { - } else if !yym1232 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1231) + } else if z.HasExtensions() && z.DecExt(yyv1236) { + } else if !yym1237 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1236) } else { - z.DecFallback(yyv1231, false) + z.DecFallback(yyv1236, false) } } case "routeReconciliationPeriod": if r.TryDecodeAsNil() { x.RouteReconciliationPeriod = pkg1_unversioned.Duration{} } else { - yyv1233 := &x.RouteReconciliationPeriod - yym1234 := z.DecBinary() - _ = yym1234 + yyv1238 := &x.RouteReconciliationPeriod + yym1239 := z.DecBinary() + _ = yym1239 if false { - } else if z.HasExtensions() && z.DecExt(yyv1233) { - } else if !yym1234 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1233) + } else if z.HasExtensions() && z.DecExt(yyv1238) { + } else if !yym1239 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1238) } else { - z.DecFallback(yyv1233, false) + z.DecFallback(yyv1238, false) } } case "resourceQuotaSyncPeriod": if r.TryDecodeAsNil() { x.ResourceQuotaSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1235 := &x.ResourceQuotaSyncPeriod - yym1236 := z.DecBinary() - _ = yym1236 + yyv1240 := &x.ResourceQuotaSyncPeriod + yym1241 := z.DecBinary() + _ = yym1241 if false { - } else if z.HasExtensions() && z.DecExt(yyv1235) { - } else if !yym1236 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1235) + } else if z.HasExtensions() && z.DecExt(yyv1240) { + } else if !yym1241 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1240) } else { - z.DecFallback(yyv1235, false) + z.DecFallback(yyv1240, false) } } case "namespaceSyncPeriod": if r.TryDecodeAsNil() { x.NamespaceSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1237 := &x.NamespaceSyncPeriod - yym1238 := z.DecBinary() - _ = yym1238 + yyv1242 := &x.NamespaceSyncPeriod + yym1243 := z.DecBinary() + _ = yym1243 if false { - } else if z.HasExtensions() && z.DecExt(yyv1237) { - } else if !yym1238 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1237) + } else if z.HasExtensions() && z.DecExt(yyv1242) { + } else if !yym1243 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1242) } else { - z.DecFallback(yyv1237, false) + z.DecFallback(yyv1242, false) } } case "pvClaimBinderSyncPeriod": if r.TryDecodeAsNil() { x.PVClaimBinderSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1239 := &x.PVClaimBinderSyncPeriod - yym1240 := z.DecBinary() - _ = yym1240 + yyv1244 := &x.PVClaimBinderSyncPeriod + yym1245 := z.DecBinary() + _ = yym1245 if false { - } else if z.HasExtensions() && z.DecExt(yyv1239) { - } else if !yym1240 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1239) + } else if z.HasExtensions() && z.DecExt(yyv1244) { + } else if !yym1245 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1244) } else { - z.DecFallback(yyv1239, false) + z.DecFallback(yyv1244, false) } } case "minResyncPeriod": if r.TryDecodeAsNil() { x.MinResyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1241 := &x.MinResyncPeriod - yym1242 := z.DecBinary() - _ = yym1242 + yyv1246 := &x.MinResyncPeriod + yym1247 := z.DecBinary() + _ = yym1247 if false { - } else if z.HasExtensions() && z.DecExt(yyv1241) { - } else if !yym1242 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1241) + } else if z.HasExtensions() && z.DecExt(yyv1246) { + } else if !yym1247 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1246) } else { - z.DecFallback(yyv1241, false) + z.DecFallback(yyv1246, false) } } case "terminatedPodGCThreshold": @@ -10604,45 +10652,45 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromMap(l int, d *co if r.TryDecodeAsNil() { x.HorizontalPodAutoscalerSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1244 := &x.HorizontalPodAutoscalerSyncPeriod - yym1245 := z.DecBinary() - _ = yym1245 + yyv1249 := &x.HorizontalPodAutoscalerSyncPeriod + yym1250 := z.DecBinary() + _ = yym1250 if false { - } else if z.HasExtensions() && z.DecExt(yyv1244) { - } else if !yym1245 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1244) + } else if z.HasExtensions() && z.DecExt(yyv1249) { + } else if !yym1250 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1249) } else { - z.DecFallback(yyv1244, false) + z.DecFallback(yyv1249, false) } } case "deploymentControllerSyncPeriod": if r.TryDecodeAsNil() { x.DeploymentControllerSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1246 := &x.DeploymentControllerSyncPeriod - yym1247 := z.DecBinary() - _ = yym1247 + yyv1251 := &x.DeploymentControllerSyncPeriod + yym1252 := z.DecBinary() + _ = yym1252 if false { - } else if z.HasExtensions() && z.DecExt(yyv1246) { - } else if !yym1247 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1246) + } else if z.HasExtensions() && z.DecExt(yyv1251) { + } else if !yym1252 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1251) } else { - z.DecFallback(yyv1246, false) + z.DecFallback(yyv1251, false) } } case "podEvictionTimeout": if r.TryDecodeAsNil() { x.PodEvictionTimeout = pkg1_unversioned.Duration{} } else { - yyv1248 := &x.PodEvictionTimeout - yym1249 := z.DecBinary() - _ = yym1249 + yyv1253 := &x.PodEvictionTimeout + yym1254 := z.DecBinary() + _ = yym1254 if false { - } else if z.HasExtensions() && z.DecExt(yyv1248) { - } else if !yym1249 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1248) + } else if z.HasExtensions() && z.DecExt(yyv1253) { + } else if !yym1254 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1253) } else { - z.DecFallback(yyv1248, false) + z.DecFallback(yyv1253, false) } } case "deletingPodsQps": @@ -10661,15 +10709,15 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromMap(l int, d *co if r.TryDecodeAsNil() { x.NodeMonitorGracePeriod = pkg1_unversioned.Duration{} } else { - yyv1252 := &x.NodeMonitorGracePeriod - yym1253 := z.DecBinary() - _ = yym1253 + yyv1257 := &x.NodeMonitorGracePeriod + yym1258 := z.DecBinary() + _ = yym1258 if false { - } else if z.HasExtensions() && z.DecExt(yyv1252) { - } else if !yym1253 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1252) + } else if z.HasExtensions() && z.DecExt(yyv1257) { + } else if !yym1258 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1257) } else { - z.DecFallback(yyv1252, false) + z.DecFallback(yyv1257, false) } } case "registerRetryCount": @@ -10682,30 +10730,30 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromMap(l int, d *co if r.TryDecodeAsNil() { x.NodeStartupGracePeriod = pkg1_unversioned.Duration{} } else { - yyv1255 := &x.NodeStartupGracePeriod - yym1256 := z.DecBinary() - _ = yym1256 + yyv1260 := &x.NodeStartupGracePeriod + yym1261 := z.DecBinary() + _ = yym1261 if false { - } else if z.HasExtensions() && z.DecExt(yyv1255) { - } else if !yym1256 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1255) + } else if z.HasExtensions() && z.DecExt(yyv1260) { + } else if !yym1261 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1260) } else { - z.DecFallback(yyv1255, false) + z.DecFallback(yyv1260, false) } } case "nodeMonitorPeriod": if r.TryDecodeAsNil() { x.NodeMonitorPeriod = pkg1_unversioned.Duration{} } else { - yyv1257 := &x.NodeMonitorPeriod - yym1258 := z.DecBinary() - _ = yym1258 + yyv1262 := &x.NodeMonitorPeriod + yym1263 := z.DecBinary() + _ = yym1263 if false { - } else if z.HasExtensions() && z.DecExt(yyv1257) { - } else if !yym1258 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1257) + } else if z.HasExtensions() && z.DecExt(yyv1262) { + } else if !yym1263 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1262) } else { - z.DecFallback(yyv1257, false) + z.DecFallback(yyv1262, false) } } case "serviceAccountKeyFile": @@ -10802,29 +10850,29 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromMap(l int, d *co if r.TryDecodeAsNil() { x.LeaderElection = LeaderElectionConfiguration{} } else { - yyv1274 := &x.LeaderElection - yyv1274.CodecDecodeSelf(d) + yyv1279 := &x.LeaderElection + yyv1279.CodecDecodeSelf(d) } case "volumeConfiguration": if r.TryDecodeAsNil() { x.VolumeConfiguration = VolumeConfiguration{} } else { - yyv1275 := &x.VolumeConfiguration - yyv1275.CodecDecodeSelf(d) + yyv1280 := &x.VolumeConfiguration + yyv1280.CodecDecodeSelf(d) } case "controllerStartInterval": if r.TryDecodeAsNil() { x.ControllerStartInterval = pkg1_unversioned.Duration{} } else { - yyv1276 := &x.ControllerStartInterval - yym1277 := z.DecBinary() - _ = yym1277 + yyv1281 := &x.ControllerStartInterval + yym1282 := z.DecBinary() + _ = yym1282 if false { - } else if z.HasExtensions() && z.DecExt(yyv1276) { - } else if !yym1277 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1276) + } else if z.HasExtensions() && z.DecExt(yyv1281) { + } else if !yym1282 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1281) } else { - z.DecFallback(yyv1276, false) + z.DecFallback(yyv1281, false) } } case "enableGarbageCollector": @@ -10864,9 +10912,9 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromMap(l int, d *co x.UnhealthyZoneThreshold = float32(r.DecodeFloat(true)) } default: - z.DecStructFieldNotFound(-1, yys1208) - } // end switch yys1208 - } // end for yyj1208 + z.DecStructFieldNotFound(-1, yys1213) + } // end switch yys1213 + } // end for yyj1213 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -10874,16 +10922,16 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1284 int - var yyb1284 bool - var yyhl1284 bool = l >= 0 - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + var yyj1289 int + var yyb1289 bool + var yyhl1289 bool = l >= 0 + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -10893,13 +10941,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.Kind = string(r.DecodeString()) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -10909,13 +10957,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.APIVersion = string(r.DecodeString()) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -10925,13 +10973,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.Port = int32(r.DecodeInt(32)) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -10941,13 +10989,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.Address = string(r.DecodeString()) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -10957,13 +11005,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.UseServiceAccountCredentials = bool(r.DecodeBool()) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -10973,13 +11021,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.CloudProvider = string(r.DecodeString()) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -10989,13 +11037,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.CloudConfigFile = string(r.DecodeString()) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11005,13 +11053,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentEndpointSyncs = int32(r.DecodeInt(32)) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11021,13 +11069,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentRSSyncs = int32(r.DecodeInt(32)) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11037,13 +11085,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentRCSyncs = int32(r.DecodeInt(32)) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11053,13 +11101,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentServiceSyncs = int32(r.DecodeInt(32)) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11069,13 +11117,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentResourceQuotaSyncs = int32(r.DecodeInt(32)) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11085,13 +11133,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentDeploymentSyncs = int32(r.DecodeInt(32)) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11101,13 +11149,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentDaemonSetSyncs = int32(r.DecodeInt(32)) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11117,13 +11165,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentJobSyncs = int32(r.DecodeInt(32)) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11133,13 +11181,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentNamespaceSyncs = int32(r.DecodeInt(32)) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11149,13 +11197,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentSATokenSyncs = int32(r.DecodeInt(32)) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11165,13 +11213,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.LookupCacheSizeForRC = int32(r.DecodeInt(32)) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11181,13 +11229,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.LookupCacheSizeForRS = int32(r.DecodeInt(32)) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11197,13 +11245,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.LookupCacheSizeForDaemonSet = int32(r.DecodeInt(32)) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11211,24 +11259,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.ServiceSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1305 := &x.ServiceSyncPeriod - yym1306 := z.DecBinary() - _ = yym1306 + yyv1310 := &x.ServiceSyncPeriod + yym1311 := z.DecBinary() + _ = yym1311 if false { - } else if z.HasExtensions() && z.DecExt(yyv1305) { - } else if !yym1306 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1305) + } else if z.HasExtensions() && z.DecExt(yyv1310) { + } else if !yym1311 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1310) } else { - z.DecFallback(yyv1305, false) + z.DecFallback(yyv1310, false) } } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11236,24 +11284,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.NodeSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1307 := &x.NodeSyncPeriod - yym1308 := z.DecBinary() - _ = yym1308 + yyv1312 := &x.NodeSyncPeriod + yym1313 := z.DecBinary() + _ = yym1313 if false { - } else if z.HasExtensions() && z.DecExt(yyv1307) { - } else if !yym1308 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1307) + } else if z.HasExtensions() && z.DecExt(yyv1312) { + } else if !yym1313 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1312) } else { - z.DecFallback(yyv1307, false) + z.DecFallback(yyv1312, false) } } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11261,24 +11309,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.RouteReconciliationPeriod = pkg1_unversioned.Duration{} } else { - yyv1309 := &x.RouteReconciliationPeriod - yym1310 := z.DecBinary() - _ = yym1310 + yyv1314 := &x.RouteReconciliationPeriod + yym1315 := z.DecBinary() + _ = yym1315 if false { - } else if z.HasExtensions() && z.DecExt(yyv1309) { - } else if !yym1310 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1309) + } else if z.HasExtensions() && z.DecExt(yyv1314) { + } else if !yym1315 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1314) } else { - z.DecFallback(yyv1309, false) + z.DecFallback(yyv1314, false) } } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11286,24 +11334,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.ResourceQuotaSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1311 := &x.ResourceQuotaSyncPeriod - yym1312 := z.DecBinary() - _ = yym1312 + yyv1316 := &x.ResourceQuotaSyncPeriod + yym1317 := z.DecBinary() + _ = yym1317 if false { - } else if z.HasExtensions() && z.DecExt(yyv1311) { - } else if !yym1312 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1311) + } else if z.HasExtensions() && z.DecExt(yyv1316) { + } else if !yym1317 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1316) } else { - z.DecFallback(yyv1311, false) + z.DecFallback(yyv1316, false) } } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11311,24 +11359,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.NamespaceSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1313 := &x.NamespaceSyncPeriod - yym1314 := z.DecBinary() - _ = yym1314 + yyv1318 := &x.NamespaceSyncPeriod + yym1319 := z.DecBinary() + _ = yym1319 if false { - } else if z.HasExtensions() && z.DecExt(yyv1313) { - } else if !yym1314 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1313) + } else if z.HasExtensions() && z.DecExt(yyv1318) { + } else if !yym1319 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1318) } else { - z.DecFallback(yyv1313, false) + z.DecFallback(yyv1318, false) } } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11336,73 +11384,7 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.PVClaimBinderSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1315 := &x.PVClaimBinderSyncPeriod - yym1316 := z.DecBinary() - _ = yym1316 - if false { - } else if z.HasExtensions() && z.DecExt(yyv1315) { - } else if !yym1316 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1315) - } else { - z.DecFallback(yyv1315, false) - } - } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l - } else { - yyb1284 = r.CheckBreak() - } - if yyb1284 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.MinResyncPeriod = pkg1_unversioned.Duration{} - } else { - yyv1317 := &x.MinResyncPeriod - yym1318 := z.DecBinary() - _ = yym1318 - if false { - } else if z.HasExtensions() && z.DecExt(yyv1317) { - } else if !yym1318 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1317) - } else { - z.DecFallback(yyv1317, false) - } - } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l - } else { - yyb1284 = r.CheckBreak() - } - if yyb1284 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.TerminatedPodGCThreshold = 0 - } else { - x.TerminatedPodGCThreshold = int32(r.DecodeInt(32)) - } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l - } else { - yyb1284 = r.CheckBreak() - } - if yyb1284 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HorizontalPodAutoscalerSyncPeriod = pkg1_unversioned.Duration{} - } else { - yyv1320 := &x.HorizontalPodAutoscalerSyncPeriod + yyv1320 := &x.PVClaimBinderSyncPeriod yym1321 := z.DecBinary() _ = yym1321 if false { @@ -11413,21 +11395,21 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * z.DecFallback(yyv1320, false) } } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.DeploymentControllerSyncPeriod = pkg1_unversioned.Duration{} + x.MinResyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1322 := &x.DeploymentControllerSyncPeriod + yyv1322 := &x.MinResyncPeriod yym1323 := z.DecBinary() _ = yym1323 if false { @@ -11438,13 +11420,79 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * z.DecFallback(yyv1322, false) } } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.TerminatedPodGCThreshold = 0 + } else { + x.TerminatedPodGCThreshold = int32(r.DecodeInt(32)) + } + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l + } else { + yyb1289 = r.CheckBreak() + } + if yyb1289 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HorizontalPodAutoscalerSyncPeriod = pkg1_unversioned.Duration{} + } else { + yyv1325 := &x.HorizontalPodAutoscalerSyncPeriod + yym1326 := z.DecBinary() + _ = yym1326 + if false { + } else if z.HasExtensions() && z.DecExt(yyv1325) { + } else if !yym1326 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1325) + } else { + z.DecFallback(yyv1325, false) + } + } + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l + } else { + yyb1289 = r.CheckBreak() + } + if yyb1289 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.DeploymentControllerSyncPeriod = pkg1_unversioned.Duration{} + } else { + yyv1327 := &x.DeploymentControllerSyncPeriod + yym1328 := z.DecBinary() + _ = yym1328 + if false { + } else if z.HasExtensions() && z.DecExt(yyv1327) { + } else if !yym1328 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1327) + } else { + z.DecFallback(yyv1327, false) + } + } + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l + } else { + yyb1289 = r.CheckBreak() + } + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11452,24 +11500,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.PodEvictionTimeout = pkg1_unversioned.Duration{} } else { - yyv1324 := &x.PodEvictionTimeout - yym1325 := z.DecBinary() - _ = yym1325 + yyv1329 := &x.PodEvictionTimeout + yym1330 := z.DecBinary() + _ = yym1330 if false { - } else if z.HasExtensions() && z.DecExt(yyv1324) { - } else if !yym1325 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1324) + } else if z.HasExtensions() && z.DecExt(yyv1329) { + } else if !yym1330 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1329) } else { - z.DecFallback(yyv1324, false) + z.DecFallback(yyv1329, false) } } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11479,13 +11527,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.DeletingPodsQps = float32(r.DecodeFloat(true)) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11495,13 +11543,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.DeletingPodsBurst = int32(r.DecodeInt(32)) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11509,73 +11557,7 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.NodeMonitorGracePeriod = pkg1_unversioned.Duration{} } else { - yyv1328 := &x.NodeMonitorGracePeriod - yym1329 := z.DecBinary() - _ = yym1329 - if false { - } else if z.HasExtensions() && z.DecExt(yyv1328) { - } else if !yym1329 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1328) - } else { - z.DecFallback(yyv1328, false) - } - } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l - } else { - yyb1284 = r.CheckBreak() - } - if yyb1284 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.RegisterRetryCount = 0 - } else { - x.RegisterRetryCount = int32(r.DecodeInt(32)) - } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l - } else { - yyb1284 = r.CheckBreak() - } - if yyb1284 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.NodeStartupGracePeriod = pkg1_unversioned.Duration{} - } else { - yyv1331 := &x.NodeStartupGracePeriod - yym1332 := z.DecBinary() - _ = yym1332 - if false { - } else if z.HasExtensions() && z.DecExt(yyv1331) { - } else if !yym1332 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1331) - } else { - z.DecFallback(yyv1331, false) - } - } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l - } else { - yyb1284 = r.CheckBreak() - } - if yyb1284 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.NodeMonitorPeriod = pkg1_unversioned.Duration{} - } else { - yyv1333 := &x.NodeMonitorPeriod + yyv1333 := &x.NodeMonitorGracePeriod yym1334 := z.DecBinary() _ = yym1334 if false { @@ -11586,13 +11568,79 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * z.DecFallback(yyv1333, false) } } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.RegisterRetryCount = 0 + } else { + x.RegisterRetryCount = int32(r.DecodeInt(32)) + } + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l + } else { + yyb1289 = r.CheckBreak() + } + if yyb1289 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.NodeStartupGracePeriod = pkg1_unversioned.Duration{} + } else { + yyv1336 := &x.NodeStartupGracePeriod + yym1337 := z.DecBinary() + _ = yym1337 + if false { + } else if z.HasExtensions() && z.DecExt(yyv1336) { + } else if !yym1337 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1336) + } else { + z.DecFallback(yyv1336, false) + } + } + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l + } else { + yyb1289 = r.CheckBreak() + } + if yyb1289 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.NodeMonitorPeriod = pkg1_unversioned.Duration{} + } else { + yyv1338 := &x.NodeMonitorPeriod + yym1339 := z.DecBinary() + _ = yym1339 + if false { + } else if z.HasExtensions() && z.DecExt(yyv1338) { + } else if !yym1339 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1338) + } else { + z.DecFallback(yyv1338, false) + } + } + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l + } else { + yyb1289 = r.CheckBreak() + } + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11602,13 +11650,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ServiceAccountKeyFile = string(r.DecodeString()) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11618,13 +11666,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ClusterSigningCertFile = string(r.DecodeString()) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11634,13 +11682,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ClusterSigningKeyFile = string(r.DecodeString()) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11650,13 +11698,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ApproveAllKubeletCSRsForGroup = string(r.DecodeString()) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11666,13 +11714,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.EnableProfiling = bool(r.DecodeBool()) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11682,13 +11730,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ClusterName = string(r.DecodeString()) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11698,13 +11746,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ClusterCIDR = string(r.DecodeString()) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11714,13 +11762,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ServiceCIDR = string(r.DecodeString()) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11730,13 +11778,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.NodeCIDRMaskSize = int32(r.DecodeInt(32)) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11746,13 +11794,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.AllocateNodeCIDRs = bool(r.DecodeBool()) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11762,13 +11810,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConfigureCloudRoutes = bool(r.DecodeBool()) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11778,13 +11826,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.RootCAFile = string(r.DecodeString()) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11794,13 +11842,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ContentType = string(r.DecodeString()) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11810,13 +11858,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.KubeAPIQPS = float32(r.DecodeFloat(true)) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11826,13 +11874,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.KubeAPIBurst = int32(r.DecodeInt(32)) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11840,16 +11888,16 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.LeaderElection = LeaderElectionConfiguration{} } else { - yyv1350 := &x.LeaderElection - yyv1350.CodecDecodeSelf(d) + yyv1355 := &x.LeaderElection + yyv1355.CodecDecodeSelf(d) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11857,16 +11905,16 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.VolumeConfiguration = VolumeConfiguration{} } else { - yyv1351 := &x.VolumeConfiguration - yyv1351.CodecDecodeSelf(d) + yyv1356 := &x.VolumeConfiguration + yyv1356.CodecDecodeSelf(d) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11874,24 +11922,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.ControllerStartInterval = pkg1_unversioned.Duration{} } else { - yyv1352 := &x.ControllerStartInterval - yym1353 := z.DecBinary() - _ = yym1353 + yyv1357 := &x.ControllerStartInterval + yym1358 := z.DecBinary() + _ = yym1358 if false { - } else if z.HasExtensions() && z.DecExt(yyv1352) { - } else if !yym1353 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1352) + } else if z.HasExtensions() && z.DecExt(yyv1357) { + } else if !yym1358 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1357) } else { - z.DecFallback(yyv1352, false) + z.DecFallback(yyv1357, false) } } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11901,13 +11949,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.EnableGarbageCollector = bool(r.DecodeBool()) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11917,13 +11965,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentGCSyncs = int32(r.DecodeInt(32)) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11933,13 +11981,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.NodeEvictionRate = float32(r.DecodeFloat(true)) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11949,13 +11997,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.SecondaryNodeEvictionRate = float32(r.DecodeFloat(true)) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11965,13 +12013,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.LargeClusterSizeThreshold = int32(r.DecodeInt(32)) } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11982,17 +12030,17 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * x.UnhealthyZoneThreshold = float32(r.DecodeFloat(true)) } for { - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj1289++ + if yyhl1289 { + yyb1289 = yyj1289 > l } else { - yyb1284 = r.CheckBreak() + yyb1289 = r.CheckBreak() } - if yyb1284 { + if yyb1289 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1284-1, "") + z.DecStructFieldNotFound(yyj1289-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -12004,33 +12052,33 @@ func (x *VolumeConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1360 := z.EncBinary() - _ = yym1360 + yym1365 := z.EncBinary() + _ = yym1365 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1361 := !z.EncBinary() - yy2arr1361 := z.EncBasicHandle().StructToArray - var yyq1361 [4]bool - _, _, _ = yysep1361, yyq1361, yy2arr1361 - const yyr1361 bool = false - var yynn1361 int - if yyr1361 || yy2arr1361 { + yysep1366 := !z.EncBinary() + yy2arr1366 := z.EncBasicHandle().StructToArray + var yyq1366 [4]bool + _, _, _ = yysep1366, yyq1366, yy2arr1366 + const yyr1366 bool = false + var yynn1366 int + if yyr1366 || yy2arr1366 { r.EncodeArrayStart(4) } else { - yynn1361 = 4 - for _, b := range yyq1361 { + yynn1366 = 4 + for _, b := range yyq1366 { if b { - yynn1361++ + yynn1366++ } } - r.EncodeMapStart(yynn1361) - yynn1361 = 0 + r.EncodeMapStart(yynn1366) + yynn1366 = 0 } - if yyr1361 || yy2arr1361 { + if yyr1366 || yy2arr1366 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1363 := z.EncBinary() - _ = yym1363 + yym1368 := z.EncBinary() + _ = yym1368 if false { } else { r.EncodeBool(bool(x.EnableHostPathProvisioning)) @@ -12039,17 +12087,17 @@ func (x *VolumeConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("enableHostPathProvisioning")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1364 := z.EncBinary() - _ = yym1364 + yym1369 := z.EncBinary() + _ = yym1369 if false { } else { r.EncodeBool(bool(x.EnableHostPathProvisioning)) } } - if yyr1361 || yy2arr1361 { + if yyr1366 || yy2arr1366 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1366 := z.EncBinary() - _ = yym1366 + yym1371 := z.EncBinary() + _ = yym1371 if false { } else { r.EncodeBool(bool(x.EnableDynamicProvisioning)) @@ -12058,28 +12106,28 @@ func (x *VolumeConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("enableDynamicProvisioning")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1367 := z.EncBinary() - _ = yym1367 + yym1372 := z.EncBinary() + _ = yym1372 if false { } else { r.EncodeBool(bool(x.EnableDynamicProvisioning)) } } - if yyr1361 || yy2arr1361 { + if yyr1366 || yy2arr1366 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1369 := &x.PersistentVolumeRecyclerConfiguration - yy1369.CodecEncodeSelf(e) + yy1374 := &x.PersistentVolumeRecyclerConfiguration + yy1374.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("persitentVolumeRecyclerConfiguration")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1370 := &x.PersistentVolumeRecyclerConfiguration - yy1370.CodecEncodeSelf(e) + yy1375 := &x.PersistentVolumeRecyclerConfiguration + yy1375.CodecEncodeSelf(e) } - if yyr1361 || yy2arr1361 { + if yyr1366 || yy2arr1366 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1372 := z.EncBinary() - _ = yym1372 + yym1377 := z.EncBinary() + _ = yym1377 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FlexVolumePluginDir)) @@ -12088,14 +12136,14 @@ func (x *VolumeConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("flexVolumePluginDir")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1373 := z.EncBinary() - _ = yym1373 + yym1378 := z.EncBinary() + _ = yym1378 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FlexVolumePluginDir)) } } - if yyr1361 || yy2arr1361 { + if yyr1366 || yy2arr1366 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -12108,25 +12156,25 @@ func (x *VolumeConfiguration) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1374 := z.DecBinary() - _ = yym1374 + yym1379 := z.DecBinary() + _ = yym1379 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1375 := r.ContainerType() - if yyct1375 == codecSelferValueTypeMap1234 { - yyl1375 := r.ReadMapStart() - if yyl1375 == 0 { + yyct1380 := r.ContainerType() + if yyct1380 == codecSelferValueTypeMap1234 { + yyl1380 := r.ReadMapStart() + if yyl1380 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1375, d) + x.codecDecodeSelfFromMap(yyl1380, d) } - } else if yyct1375 == codecSelferValueTypeArray1234 { - yyl1375 := r.ReadArrayStart() - if yyl1375 == 0 { + } else if yyct1380 == codecSelferValueTypeArray1234 { + yyl1380 := r.ReadArrayStart() + if yyl1380 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1375, d) + x.codecDecodeSelfFromArray(yyl1380, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -12138,12 +12186,12 @@ func (x *VolumeConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1376Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1376Slc - var yyhl1376 bool = l >= 0 - for yyj1376 := 0; ; yyj1376++ { - if yyhl1376 { - if yyj1376 >= l { + var yys1381Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1381Slc + var yyhl1381 bool = l >= 0 + for yyj1381 := 0; ; yyj1381++ { + if yyhl1381 { + if yyj1381 >= l { break } } else { @@ -12152,10 +12200,10 @@ func (x *VolumeConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1376Slc = r.DecodeBytes(yys1376Slc, true, true) - yys1376 := string(yys1376Slc) + yys1381Slc = r.DecodeBytes(yys1381Slc, true, true) + yys1381 := string(yys1381Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1376 { + switch yys1381 { case "enableHostPathProvisioning": if r.TryDecodeAsNil() { x.EnableHostPathProvisioning = false @@ -12172,8 +12220,8 @@ func (x *VolumeConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.PersistentVolumeRecyclerConfiguration = PersistentVolumeRecyclerConfiguration{} } else { - yyv1379 := &x.PersistentVolumeRecyclerConfiguration - yyv1379.CodecDecodeSelf(d) + yyv1384 := &x.PersistentVolumeRecyclerConfiguration + yyv1384.CodecDecodeSelf(d) } case "flexVolumePluginDir": if r.TryDecodeAsNil() { @@ -12182,9 +12230,9 @@ func (x *VolumeConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder x.FlexVolumePluginDir = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys1376) - } // end switch yys1376 - } // end for yyj1376 + z.DecStructFieldNotFound(-1, yys1381) + } // end switch yys1381 + } // end for yyj1381 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -12192,16 +12240,16 @@ func (x *VolumeConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1381 int - var yyb1381 bool - var yyhl1381 bool = l >= 0 - yyj1381++ - if yyhl1381 { - yyb1381 = yyj1381 > l + var yyj1386 int + var yyb1386 bool + var yyhl1386 bool = l >= 0 + yyj1386++ + if yyhl1386 { + yyb1386 = yyj1386 > l } else { - yyb1381 = r.CheckBreak() + yyb1386 = r.CheckBreak() } - if yyb1381 { + if yyb1386 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12211,13 +12259,13 @@ func (x *VolumeConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decod } else { x.EnableHostPathProvisioning = bool(r.DecodeBool()) } - yyj1381++ - if yyhl1381 { - yyb1381 = yyj1381 > l + yyj1386++ + if yyhl1386 { + yyb1386 = yyj1386 > l } else { - yyb1381 = r.CheckBreak() + yyb1386 = r.CheckBreak() } - if yyb1381 { + if yyb1386 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12227,13 +12275,13 @@ func (x *VolumeConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decod } else { x.EnableDynamicProvisioning = bool(r.DecodeBool()) } - yyj1381++ - if yyhl1381 { - yyb1381 = yyj1381 > l + yyj1386++ + if yyhl1386 { + yyb1386 = yyj1386 > l } else { - yyb1381 = r.CheckBreak() + yyb1386 = r.CheckBreak() } - if yyb1381 { + if yyb1386 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12241,16 +12289,16 @@ func (x *VolumeConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.PersistentVolumeRecyclerConfiguration = PersistentVolumeRecyclerConfiguration{} } else { - yyv1384 := &x.PersistentVolumeRecyclerConfiguration - yyv1384.CodecDecodeSelf(d) + yyv1389 := &x.PersistentVolumeRecyclerConfiguration + yyv1389.CodecDecodeSelf(d) } - yyj1381++ - if yyhl1381 { - yyb1381 = yyj1381 > l + yyj1386++ + if yyhl1386 { + yyb1386 = yyj1386 > l } else { - yyb1381 = r.CheckBreak() + yyb1386 = r.CheckBreak() } - if yyb1381 { + if yyb1386 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12261,17 +12309,17 @@ func (x *VolumeConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decod x.FlexVolumePluginDir = string(r.DecodeString()) } for { - yyj1381++ - if yyhl1381 { - yyb1381 = yyj1381 > l + yyj1386++ + if yyhl1386 { + yyb1386 = yyj1386 > l } else { - yyb1381 = r.CheckBreak() + yyb1386 = r.CheckBreak() } - if yyb1381 { + if yyb1386 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1381-1, "") + z.DecStructFieldNotFound(yyj1386-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -12283,33 +12331,33 @@ func (x *PersistentVolumeRecyclerConfiguration) CodecEncodeSelf(e *codec1978.Enc if x == nil { r.EncodeNil() } else { - yym1386 := z.EncBinary() - _ = yym1386 + yym1391 := z.EncBinary() + _ = yym1391 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1387 := !z.EncBinary() - yy2arr1387 := z.EncBasicHandle().StructToArray - var yyq1387 [7]bool - _, _, _ = yysep1387, yyq1387, yy2arr1387 - const yyr1387 bool = false - var yynn1387 int - if yyr1387 || yy2arr1387 { + yysep1392 := !z.EncBinary() + yy2arr1392 := z.EncBasicHandle().StructToArray + var yyq1392 [7]bool + _, _, _ = yysep1392, yyq1392, yy2arr1392 + const yyr1392 bool = false + var yynn1392 int + if yyr1392 || yy2arr1392 { r.EncodeArrayStart(7) } else { - yynn1387 = 7 - for _, b := range yyq1387 { + yynn1392 = 7 + for _, b := range yyq1392 { if b { - yynn1387++ + yynn1392++ } } - r.EncodeMapStart(yynn1387) - yynn1387 = 0 + r.EncodeMapStart(yynn1392) + yynn1392 = 0 } - if yyr1387 || yy2arr1387 { + if yyr1392 || yy2arr1392 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1389 := z.EncBinary() - _ = yym1389 + yym1394 := z.EncBinary() + _ = yym1394 if false { } else { r.EncodeInt(int64(x.MaximumRetry)) @@ -12318,17 +12366,17 @@ func (x *PersistentVolumeRecyclerConfiguration) CodecEncodeSelf(e *codec1978.Enc z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("maximumRetry")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1390 := z.EncBinary() - _ = yym1390 + yym1395 := z.EncBinary() + _ = yym1395 if false { } else { r.EncodeInt(int64(x.MaximumRetry)) } } - if yyr1387 || yy2arr1387 { + if yyr1392 || yy2arr1392 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1392 := z.EncBinary() - _ = yym1392 + yym1397 := z.EncBinary() + _ = yym1397 if false { } else { r.EncodeInt(int64(x.MinimumTimeoutNFS)) @@ -12337,17 +12385,17 @@ func (x *PersistentVolumeRecyclerConfiguration) CodecEncodeSelf(e *codec1978.Enc z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("minimumTimeoutNFS")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1393 := z.EncBinary() - _ = yym1393 + yym1398 := z.EncBinary() + _ = yym1398 if false { } else { r.EncodeInt(int64(x.MinimumTimeoutNFS)) } } - if yyr1387 || yy2arr1387 { + if yyr1392 || yy2arr1392 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1395 := z.EncBinary() - _ = yym1395 + yym1400 := z.EncBinary() + _ = yym1400 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PodTemplateFilePathNFS)) @@ -12356,17 +12404,17 @@ func (x *PersistentVolumeRecyclerConfiguration) CodecEncodeSelf(e *codec1978.Enc z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("podTemplateFilePathNFS")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1396 := z.EncBinary() - _ = yym1396 + yym1401 := z.EncBinary() + _ = yym1401 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PodTemplateFilePathNFS)) } } - if yyr1387 || yy2arr1387 { + if yyr1392 || yy2arr1392 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1398 := z.EncBinary() - _ = yym1398 + yym1403 := z.EncBinary() + _ = yym1403 if false { } else { r.EncodeInt(int64(x.IncrementTimeoutNFS)) @@ -12375,17 +12423,17 @@ func (x *PersistentVolumeRecyclerConfiguration) CodecEncodeSelf(e *codec1978.Enc z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("incrementTimeoutNFS")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1399 := z.EncBinary() - _ = yym1399 + yym1404 := z.EncBinary() + _ = yym1404 if false { } else { r.EncodeInt(int64(x.IncrementTimeoutNFS)) } } - if yyr1387 || yy2arr1387 { + if yyr1392 || yy2arr1392 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1401 := z.EncBinary() - _ = yym1401 + yym1406 := z.EncBinary() + _ = yym1406 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PodTemplateFilePathHostPath)) @@ -12394,17 +12442,17 @@ func (x *PersistentVolumeRecyclerConfiguration) CodecEncodeSelf(e *codec1978.Enc z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("podTemplateFilePathHostPath")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1402 := z.EncBinary() - _ = yym1402 + yym1407 := z.EncBinary() + _ = yym1407 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PodTemplateFilePathHostPath)) } } - if yyr1387 || yy2arr1387 { + if yyr1392 || yy2arr1392 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1404 := z.EncBinary() - _ = yym1404 + yym1409 := z.EncBinary() + _ = yym1409 if false { } else { r.EncodeInt(int64(x.MinimumTimeoutHostPath)) @@ -12413,17 +12461,17 @@ func (x *PersistentVolumeRecyclerConfiguration) CodecEncodeSelf(e *codec1978.Enc z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("minimumTimeoutHostPath")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1405 := z.EncBinary() - _ = yym1405 + yym1410 := z.EncBinary() + _ = yym1410 if false { } else { r.EncodeInt(int64(x.MinimumTimeoutHostPath)) } } - if yyr1387 || yy2arr1387 { + if yyr1392 || yy2arr1392 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1407 := z.EncBinary() - _ = yym1407 + yym1412 := z.EncBinary() + _ = yym1412 if false { } else { r.EncodeInt(int64(x.IncrementTimeoutHostPath)) @@ -12432,14 +12480,14 @@ func (x *PersistentVolumeRecyclerConfiguration) CodecEncodeSelf(e *codec1978.Enc z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("incrementTimeoutHostPath")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1408 := z.EncBinary() - _ = yym1408 + yym1413 := z.EncBinary() + _ = yym1413 if false { } else { r.EncodeInt(int64(x.IncrementTimeoutHostPath)) } } - if yyr1387 || yy2arr1387 { + if yyr1392 || yy2arr1392 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -12452,25 +12500,25 @@ func (x *PersistentVolumeRecyclerConfiguration) CodecDecodeSelf(d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1409 := z.DecBinary() - _ = yym1409 + yym1414 := z.DecBinary() + _ = yym1414 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1410 := r.ContainerType() - if yyct1410 == codecSelferValueTypeMap1234 { - yyl1410 := r.ReadMapStart() - if yyl1410 == 0 { + yyct1415 := r.ContainerType() + if yyct1415 == codecSelferValueTypeMap1234 { + yyl1415 := r.ReadMapStart() + if yyl1415 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1410, d) + x.codecDecodeSelfFromMap(yyl1415, d) } - } else if yyct1410 == codecSelferValueTypeArray1234 { - yyl1410 := r.ReadArrayStart() - if yyl1410 == 0 { + } else if yyct1415 == codecSelferValueTypeArray1234 { + yyl1415 := r.ReadArrayStart() + if yyl1415 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1410, d) + x.codecDecodeSelfFromArray(yyl1415, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -12482,12 +12530,12 @@ func (x *PersistentVolumeRecyclerConfiguration) codecDecodeSelfFromMap(l int, d var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1411Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1411Slc - var yyhl1411 bool = l >= 0 - for yyj1411 := 0; ; yyj1411++ { - if yyhl1411 { - if yyj1411 >= l { + var yys1416Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1416Slc + var yyhl1416 bool = l >= 0 + for yyj1416 := 0; ; yyj1416++ { + if yyhl1416 { + if yyj1416 >= l { break } } else { @@ -12496,10 +12544,10 @@ func (x *PersistentVolumeRecyclerConfiguration) codecDecodeSelfFromMap(l int, d } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1411Slc = r.DecodeBytes(yys1411Slc, true, true) - yys1411 := string(yys1411Slc) + yys1416Slc = r.DecodeBytes(yys1416Slc, true, true) + yys1416 := string(yys1416Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1411 { + switch yys1416 { case "maximumRetry": if r.TryDecodeAsNil() { x.MaximumRetry = 0 @@ -12543,9 +12591,9 @@ func (x *PersistentVolumeRecyclerConfiguration) codecDecodeSelfFromMap(l int, d x.IncrementTimeoutHostPath = int32(r.DecodeInt(32)) } default: - z.DecStructFieldNotFound(-1, yys1411) - } // end switch yys1411 - } // end for yyj1411 + z.DecStructFieldNotFound(-1, yys1416) + } // end switch yys1416 + } // end for yyj1416 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -12553,16 +12601,16 @@ func (x *PersistentVolumeRecyclerConfiguration) codecDecodeSelfFromArray(l int, var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1419 int - var yyb1419 bool - var yyhl1419 bool = l >= 0 - yyj1419++ - if yyhl1419 { - yyb1419 = yyj1419 > l + var yyj1424 int + var yyb1424 bool + var yyhl1424 bool = l >= 0 + yyj1424++ + if yyhl1424 { + yyb1424 = yyj1424 > l } else { - yyb1419 = r.CheckBreak() + yyb1424 = r.CheckBreak() } - if yyb1419 { + if yyb1424 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12572,13 +12620,13 @@ func (x *PersistentVolumeRecyclerConfiguration) codecDecodeSelfFromArray(l int, } else { x.MaximumRetry = int32(r.DecodeInt(32)) } - yyj1419++ - if yyhl1419 { - yyb1419 = yyj1419 > l + yyj1424++ + if yyhl1424 { + yyb1424 = yyj1424 > l } else { - yyb1419 = r.CheckBreak() + yyb1424 = r.CheckBreak() } - if yyb1419 { + if yyb1424 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12588,13 +12636,13 @@ func (x *PersistentVolumeRecyclerConfiguration) codecDecodeSelfFromArray(l int, } else { x.MinimumTimeoutNFS = int32(r.DecodeInt(32)) } - yyj1419++ - if yyhl1419 { - yyb1419 = yyj1419 > l + yyj1424++ + if yyhl1424 { + yyb1424 = yyj1424 > l } else { - yyb1419 = r.CheckBreak() + yyb1424 = r.CheckBreak() } - if yyb1419 { + if yyb1424 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12604,13 +12652,13 @@ func (x *PersistentVolumeRecyclerConfiguration) codecDecodeSelfFromArray(l int, } else { x.PodTemplateFilePathNFS = string(r.DecodeString()) } - yyj1419++ - if yyhl1419 { - yyb1419 = yyj1419 > l + yyj1424++ + if yyhl1424 { + yyb1424 = yyj1424 > l } else { - yyb1419 = r.CheckBreak() + yyb1424 = r.CheckBreak() } - if yyb1419 { + if yyb1424 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12620,13 +12668,13 @@ func (x *PersistentVolumeRecyclerConfiguration) codecDecodeSelfFromArray(l int, } else { x.IncrementTimeoutNFS = int32(r.DecodeInt(32)) } - yyj1419++ - if yyhl1419 { - yyb1419 = yyj1419 > l + yyj1424++ + if yyhl1424 { + yyb1424 = yyj1424 > l } else { - yyb1419 = r.CheckBreak() + yyb1424 = r.CheckBreak() } - if yyb1419 { + if yyb1424 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12636,13 +12684,13 @@ func (x *PersistentVolumeRecyclerConfiguration) codecDecodeSelfFromArray(l int, } else { x.PodTemplateFilePathHostPath = string(r.DecodeString()) } - yyj1419++ - if yyhl1419 { - yyb1419 = yyj1419 > l + yyj1424++ + if yyhl1424 { + yyb1424 = yyj1424 > l } else { - yyb1419 = r.CheckBreak() + yyb1424 = r.CheckBreak() } - if yyb1419 { + if yyb1424 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12652,13 +12700,13 @@ func (x *PersistentVolumeRecyclerConfiguration) codecDecodeSelfFromArray(l int, } else { x.MinimumTimeoutHostPath = int32(r.DecodeInt(32)) } - yyj1419++ - if yyhl1419 { - yyb1419 = yyj1419 > l + yyj1424++ + if yyhl1424 { + yyb1424 = yyj1424 > l } else { - yyb1419 = r.CheckBreak() + yyb1424 = r.CheckBreak() } - if yyb1419 { + if yyb1424 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12669,17 +12717,17 @@ func (x *PersistentVolumeRecyclerConfiguration) codecDecodeSelfFromArray(l int, x.IncrementTimeoutHostPath = int32(r.DecodeInt(32)) } for { - yyj1419++ - if yyhl1419 { - yyb1419 = yyj1419 > l + yyj1424++ + if yyhl1424 { + yyb1424 = yyj1424 > l } else { - yyb1419 = r.CheckBreak() + yyb1424 = r.CheckBreak() } - if yyb1419 { + if yyb1424 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1419-1, "") + z.DecStructFieldNotFound(yyj1424-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -12689,20 +12737,20 @@ func (x codecSelfer1234) encconfig_ConfigurationMap(v pkg2_config.ConfigurationM z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeMapStart(len(v)) - for yyk1427, yyv1427 := range v { + for yyk1432, yyv1432 := range v { z.EncSendContainerState(codecSelfer_containerMapKey1234) - yym1428 := z.EncBinary() - _ = yym1428 + yym1433 := z.EncBinary() + _ = yym1433 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(yyk1427)) + r.EncodeString(codecSelferC_UTF81234, string(yyk1432)) } z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1429 := z.EncBinary() - _ = yym1429 + yym1434 := z.EncBinary() + _ = yym1434 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(yyv1427)) + r.EncodeString(codecSelferC_UTF81234, string(yyv1432)) } } z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -12713,63 +12761,63 @@ func (x codecSelfer1234) decconfig_ConfigurationMap(v *pkg2_config.Configuration z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1430 := *v - yyl1430 := r.ReadMapStart() - yybh1430 := z.DecBasicHandle() - if yyv1430 == nil { - yyrl1430, _ := z.DecInferLen(yyl1430, yybh1430.MaxInitLen, 32) - yyv1430 = make(map[string]string, yyrl1430) - *v = yyv1430 + yyv1435 := *v + yyl1435 := r.ReadMapStart() + yybh1435 := z.DecBasicHandle() + if yyv1435 == nil { + yyrl1435, _ := z.DecInferLen(yyl1435, yybh1435.MaxInitLen, 32) + yyv1435 = make(map[string]string, yyrl1435) + *v = yyv1435 } - var yymk1430 string - var yymv1430 string - var yymg1430 bool - if yybh1430.MapValueReset { + var yymk1435 string + var yymv1435 string + var yymg1435 bool + if yybh1435.MapValueReset { } - if yyl1430 > 0 { - for yyj1430 := 0; yyj1430 < yyl1430; yyj1430++ { + if yyl1435 > 0 { + for yyj1435 := 0; yyj1435 < yyl1435; yyj1435++ { z.DecSendContainerState(codecSelfer_containerMapKey1234) if r.TryDecodeAsNil() { - yymk1430 = "" + yymk1435 = "" } else { - yymk1430 = string(r.DecodeString()) + yymk1435 = string(r.DecodeString()) } - if yymg1430 { - yymv1430 = yyv1430[yymk1430] + if yymg1435 { + yymv1435 = yyv1435[yymk1435] } z.DecSendContainerState(codecSelfer_containerMapValue1234) if r.TryDecodeAsNil() { - yymv1430 = "" + yymv1435 = "" } else { - yymv1430 = string(r.DecodeString()) + yymv1435 = string(r.DecodeString()) } - if yyv1430 != nil { - yyv1430[yymk1430] = yymv1430 + if yyv1435 != nil { + yyv1435[yymk1435] = yymv1435 } } - } else if yyl1430 < 0 { - for yyj1430 := 0; !r.CheckBreak(); yyj1430++ { + } else if yyl1435 < 0 { + for yyj1435 := 0; !r.CheckBreak(); yyj1435++ { z.DecSendContainerState(codecSelfer_containerMapKey1234) if r.TryDecodeAsNil() { - yymk1430 = "" + yymk1435 = "" } else { - yymk1430 = string(r.DecodeString()) + yymk1435 = string(r.DecodeString()) } - if yymg1430 { - yymv1430 = yyv1430[yymk1430] + if yymg1435 { + yymv1435 = yyv1435[yymk1435] } z.DecSendContainerState(codecSelfer_containerMapValue1234) if r.TryDecodeAsNil() { - yymv1430 = "" + yymv1435 = "" } else { - yymv1430 = string(r.DecodeString()) + yymv1435 = string(r.DecodeString()) } - if yyv1430 != nil { - yyv1430[yymk1430] = yymv1430 + if yyv1435 != nil { + yyv1435[yymk1435] = yymv1435 } } } // else len==0: TODO: Should we clear map entries? diff --git a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/types.go b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/types.go index 6bc9ff3ab..45dd4de00 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/types.go @@ -294,7 +294,7 @@ type KubeletConfiguration struct { // And all Burstable and BestEffort pods are brought up under their // specific top level QoS cgroup. // +optional - CgroupsPerQOS bool `json:"cgroupsPerQOS,omitempty"` + ExperimentalCgroupsPerQOS bool `json:"experimentalCgroupsPerQOS,omitempty"` // driver that the kubelet uses to manipulate cgroups on the host (cgroupfs or systemd) // +optional CgroupDriver string `json:"cgroupDriver,omitempty"` @@ -307,7 +307,7 @@ type KubeletConfiguration struct { // +optional SystemCgroups string `json:"systemCgroups,omitempty"` // CgroupRoot is the root cgroup to use for pods. - // If CgroupsPerQOS is enabled, this is the root of the QoS cgroup hierarchy. + // If ExperimentalCgroupsPerQOS is enabled, this is the root of the QoS cgroup hierarchy. // +optional CgroupRoot string `json:"cgroupRoot,omitempty"` // containerRuntime is the container runtime to use. @@ -466,6 +466,10 @@ type KubeletConfiguration struct { // TODO(#34726:1.8.0): Remove the opt-in for failing when swap is enabled. // Tells the Kubelet to fail to start if swap is enabled on the node. ExperimentalFailSwapOn bool `json:"experimentalFailSwapOn,omitempty"` + // This flag, if set, enables a check prior to mount operations to verify that the required components + // (binaries, etc.) to mount the volume are available on the underlying node. If the check is enabled + // and fails the mount operation fails. + ExperimentalCheckNodeCapabilitiesBeforeMount bool `json:"ExperimentalCheckNodeCapabilitiesBeforeMount,omitempty"` } type KubeletAuthorizationMode string diff --git a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/defaults.go index 7448f6112..318cdd03c 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/defaults.go @@ -204,8 +204,8 @@ func SetDefaults_KubeletConfiguration(obj *KubeletConfiguration) { if obj.CertDirectory == "" { obj.CertDirectory = "/var/run/kubernetes" } - if obj.CgroupsPerQOS == nil { - obj.CgroupsPerQOS = boolVar(false) + if obj.ExperimentalCgroupsPerQOS == nil { + obj.ExperimentalCgroupsPerQOS = boolVar(false) } if obj.ContainerRuntime == "" { obj.ContainerRuntime = "docker" @@ -391,9 +391,9 @@ func SetDefaults_KubeletConfiguration(obj *KubeletConfiguration) { temp := int32(defaultIPTablesDropBit) obj.IPTablesDropBit = &temp } - if obj.CgroupsPerQOS == nil { + if obj.ExperimentalCgroupsPerQOS == nil { temp := false - obj.CgroupsPerQOS = &temp + obj.ExperimentalCgroupsPerQOS = &temp } if obj.CgroupDriver == "" { obj.CgroupDriver = "cgroupfs" @@ -401,8 +401,8 @@ func SetDefaults_KubeletConfiguration(obj *KubeletConfiguration) { // NOTE: this is for backwards compatibility with earlier releases where cgroup-root was optional. // if cgroups per qos is not enabled, and cgroup-root is not specified, we need to default to the // container runtime default and not default to the root cgroup. - if obj.CgroupsPerQOS != nil { - if *obj.CgroupsPerQOS { + if obj.ExperimentalCgroupsPerQOS != nil { + if *obj.ExperimentalCgroupsPerQOS { if obj.CgroupRoot == "" { obj.CgroupRoot = "/" } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/types.go index cbdbddec4..1fb829213 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/types.go @@ -355,7 +355,7 @@ type KubeletConfiguration struct { // And all Burstable and BestEffort pods are brought up under their // specific top level QoS cgroup. // +optional - CgroupsPerQOS *bool `json:"cgroupsPerQOS,omitempty"` + ExperimentalCgroupsPerQOS *bool `json:"experimentalCgroupsPerQOS,omitempty"` // driver that the kubelet uses to manipulate cgroups on the host (cgroupfs or systemd) // +optional CgroupDriver string `json:"cgroupDriver,omitempty"` @@ -505,6 +505,10 @@ type KubeletConfiguration struct { // TODO(#34726:1.8.0): Remove the opt-in for failing when swap is enabled. // Tells the Kubelet to fail to start if swap is enabled on the node. ExperimentalFailSwapOn bool `json:"experimentalFailSwapOn,omitempty"` + // This flag, if set, enables a check prior to mount operations to verify that the required components + // (binaries, etc.) to mount the volume are available on the underlying node. If the check is enabled + // and fails the mount operation fails. + ExperimentalCheckNodeCapabilitiesBeforeMount bool `json:"ExperimentalCheckNodeCapabilitiesBeforeMount,omitempty"` } type KubeletAuthorizationMode string diff --git a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go index c44c9fa6f..a8c1ce522 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go @@ -330,7 +330,7 @@ func autoConvert_v1alpha1_KubeletConfiguration_To_componentconfig_KubeletConfigu out.RuntimeCgroups = in.RuntimeCgroups out.SystemCgroups = in.SystemCgroups out.CgroupRoot = in.CgroupRoot - if err := api.Convert_Pointer_bool_To_bool(&in.CgroupsPerQOS, &out.CgroupsPerQOS, s); err != nil { + if err := api.Convert_Pointer_bool_To_bool(&in.ExperimentalCgroupsPerQOS, &out.ExperimentalCgroupsPerQOS, s); err != nil { return err } out.CgroupDriver = in.CgroupDriver @@ -407,6 +407,7 @@ func autoConvert_v1alpha1_KubeletConfiguration_To_componentconfig_KubeletConfigu out.FeatureGates = in.FeatureGates out.EnableCRI = in.EnableCRI out.ExperimentalFailSwapOn = in.ExperimentalFailSwapOn + out.ExperimentalCheckNodeCapabilitiesBeforeMount = in.ExperimentalCheckNodeCapabilitiesBeforeMount return nil } @@ -495,7 +496,7 @@ func autoConvert_componentconfig_KubeletConfiguration_To_v1alpha1_KubeletConfigu out.CloudProvider = in.CloudProvider out.CloudConfigFile = in.CloudConfigFile out.KubeletCgroups = in.KubeletCgroups - if err := api.Convert_bool_To_Pointer_bool(&in.CgroupsPerQOS, &out.CgroupsPerQOS, s); err != nil { + if err := api.Convert_bool_To_Pointer_bool(&in.ExperimentalCgroupsPerQOS, &out.ExperimentalCgroupsPerQOS, s); err != nil { return err } out.CgroupDriver = in.CgroupDriver @@ -575,6 +576,7 @@ func autoConvert_componentconfig_KubeletConfiguration_To_v1alpha1_KubeletConfigu out.FeatureGates = in.FeatureGates out.EnableCRI = in.EnableCRI out.ExperimentalFailSwapOn = in.ExperimentalFailSwapOn + out.ExperimentalCheckNodeCapabilitiesBeforeMount = in.ExperimentalCheckNodeCapabilitiesBeforeMount return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/zz_generated.deepcopy.go index 6a55040fd..2f5bc2852 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/zz_generated.deepcopy.go @@ -302,12 +302,12 @@ func DeepCopy_v1alpha1_KubeletConfiguration(in interface{}, out interface{}, c * out.RuntimeCgroups = in.RuntimeCgroups out.SystemCgroups = in.SystemCgroups out.CgroupRoot = in.CgroupRoot - if in.CgroupsPerQOS != nil { - in, out := &in.CgroupsPerQOS, &out.CgroupsPerQOS + if in.ExperimentalCgroupsPerQOS != nil { + in, out := &in.ExperimentalCgroupsPerQOS, &out.ExperimentalCgroupsPerQOS *out = new(bool) **out = **in } else { - out.CgroupsPerQOS = nil + out.ExperimentalCgroupsPerQOS = nil } out.CgroupDriver = in.CgroupDriver out.ContainerRuntime = in.ContainerRuntime @@ -461,6 +461,7 @@ func DeepCopy_v1alpha1_KubeletConfiguration(in interface{}, out interface{}, c * out.FeatureGates = in.FeatureGates out.EnableCRI = in.EnableCRI out.ExperimentalFailSwapOn = in.ExperimentalFailSwapOn + out.ExperimentalCheckNodeCapabilitiesBeforeMount = in.ExperimentalCheckNodeCapabilitiesBeforeMount return nil } } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/zz_generated.deepcopy.go index f38728fc2..9f9ce1bb3 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/zz_generated.deepcopy.go @@ -308,7 +308,7 @@ func DeepCopy_componentconfig_KubeletConfiguration(in interface{}, out interface out.CloudProvider = in.CloudProvider out.CloudConfigFile = in.CloudConfigFile out.KubeletCgroups = in.KubeletCgroups - out.CgroupsPerQOS = in.CgroupsPerQOS + out.ExperimentalCgroupsPerQOS = in.ExperimentalCgroupsPerQOS out.CgroupDriver = in.CgroupDriver out.RuntimeCgroups = in.RuntimeCgroups out.SystemCgroups = in.SystemCgroups @@ -392,6 +392,7 @@ func DeepCopy_componentconfig_KubeletConfiguration(in interface{}, out interface out.FeatureGates = in.FeatureGates out.EnableCRI = in.EnableCRI out.ExperimentalFailSwapOn = in.ExperimentalFailSwapOn + out.ExperimentalCheckNodeCapabilitiesBeforeMount = in.ExperimentalCheckNodeCapabilitiesBeforeMount return nil } } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/types.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/types.go index ded03596d..3010ae354 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/extensions/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/types.go @@ -124,7 +124,6 @@ type ThirdPartyResource struct { Description string `json:"description,omitempty"` // Versions are versions for this third party object - // +optional Versions []APIVersion `json:"versions,omitempty"` } @@ -143,7 +142,6 @@ type ThirdPartyResourceList struct { // TODO: we should consider merge this struct with GroupVersion in unversioned.go type APIVersion struct { // Name of this version (e.g. 'v1'). - // +optional Name string `json:"name,omitempty"` } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/validation/validation.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/validation/validation.go index 8ac12827c..bb5224f13 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/extensions/validation/validation.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/validation/validation.go @@ -68,6 +68,9 @@ func ValidateThirdPartyResource(obj *extensions.ThirdPartyResource) field.ErrorL allErrs = append(allErrs, apivalidation.ValidateObjectMeta(&obj.ObjectMeta, false, ValidateThirdPartyResourceName, field.NewPath("metadata"))...) versions := sets.String{} + if len(obj.Versions) == 0 { + allErrs = append(allErrs, field.Required(field.NewPath("versions"), "must specify at least one version")) + } for ix := range obj.Versions { version := &obj.Versions[ix] if len(version.Name) == 0 { diff --git a/vendor/k8s.io/kubernetes/pkg/auth/user/user.go b/vendor/k8s.io/kubernetes/pkg/auth/user/user.go index c48695b6d..3af195988 100644 --- a/vendor/k8s.io/kubernetes/pkg/auth/user/user.go +++ b/vendor/k8s.io/kubernetes/pkg/auth/user/user.go @@ -69,6 +69,7 @@ func (i *DefaultInfo) GetExtra() map[string][]string { // well-known user and group names const ( SystemPrivilegedGroup = "system:masters" + NodesGroup = "system:nodes" AllUnauthenticated = "system:unauthenticated" AllAuthenticated = "system:authenticated" diff --git a/vendor/k8s.io/kubernetes/pkg/client/cache/controller.go b/vendor/k8s.io/kubernetes/pkg/client/cache/controller.go index 59fd52051..5ab84b8dd 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/cache/controller.go +++ b/vendor/k8s.io/kubernetes/pkg/client/cache/controller.go @@ -29,7 +29,7 @@ import ( type Config struct { // The queue for your objects; either a FIFO or // a DeltaFIFO. Your Process() function should accept - // the output of this Oueue's Pop() method. + // the output of this Queue's Pop() method. Queue // Something that can list and watch your objects. @@ -121,6 +121,11 @@ func (c *Controller) Requeue(obj interface{}) error { // TODO: Consider doing the processing in parallel. This will require a little thought // to make sure that we don't end up processing the same object multiple times // concurrently. +// +// TODO: Plumb through the stopCh here (and down to the queue) so that this can +// actually exit when the controller is stopped. Or just give up on this stuff +// ever being stoppable. Converting this whole package to use Context would +// also be helpful. func (c *Controller) processLoop() { for { obj, err := c.config.Queue.Pop(PopProcessFunc(c.config.Process)) @@ -134,7 +139,7 @@ func (c *Controller) processLoop() { } // ResourceEventHandler can handle notifications for events that happen to a -// resource. The events are informational only, so you can't return an +// resource. The events are informational only, so you can't return an // error. // * OnAdd is called when an object is added. // * OnUpdate is called when an object is modified. Note that oldObj is the diff --git a/vendor/k8s.io/kubernetes/pkg/client/cache/reflector.go b/vendor/k8s.io/kubernetes/pkg/client/cache/reflector.go index 745ee7624..8a0d05ab4 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/cache/reflector.go +++ b/vendor/k8s.io/kubernetes/pkg/client/cache/reflector.go @@ -45,7 +45,7 @@ import ( // Reflector watches a specified resource and causes all changes to be reflected in the given store. type Reflector struct { - // name identifies this reflector. By default it will be a file:line if possible. + // name identifies this reflector. By default it will be a file:line if possible. name string // The type of object we expect to place in the store. @@ -74,12 +74,6 @@ var ( // However, it can be modified to avoid periodic resync to break the // TCP connection. minWatchTimeout = 5 * time.Minute - // If we are within 'forceResyncThreshold' from the next planned resync - // and are just before issuing Watch(), resync will be forced now. - forceResyncThreshold = 3 * time.Second - // We try to set timeouts for Watch() so that we will finish about - // than 'timeoutThreshold' from next planned periodic resync. - timeoutThreshold = 1 * time.Second ) // NewNamespaceKeyedIndexerAndReflector creates an Indexer and a Reflector @@ -114,7 +108,7 @@ func NewNamedReflector(name string, lw ListerWatcher, expectedType interface{}, return r } -// internalPackages are packages that ignored when creating a default reflector name. These packages are in the common +// internalPackages are packages that ignored when creating a default reflector name. These packages are in the common // call chains to NewReflector, so they'd be low entropy names for reflectors var internalPackages = []string{"kubernetes/pkg/client/cache/", "/runtime/asm_"} diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/event_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/event_expansion.go index 1e1e982fc..2d316aaed 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/event_expansion.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/event_expansion.go @@ -148,14 +148,14 @@ type EventSinkImpl struct { Interface EventInterface } -func (e EventSinkImpl) Create(event *api.Event) (*api.Event, error) { +func (e *EventSinkImpl) Create(event *api.Event) (*api.Event, error) { return e.Interface.CreateWithEventNamespace(event) } -func (e EventSinkImpl) Update(event *api.Event) (*api.Event, error) { +func (e *EventSinkImpl) Update(event *api.Event) (*api.Event, error) { return e.Interface.UpdateWithEventNamespace(event) } -func (e EventSinkImpl) Patch(event *api.Event, data []byte) (*api.Event, error) { +func (e *EventSinkImpl) Patch(event *api.Event, data []byte) (*api.Event, error) { return e.Interface.PatchWithEventNamespace(event, data) } diff --git a/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/discovery_client.go b/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/discovery_client.go index e64ffd578..377bbfd3b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/discovery_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/discovery_client.go @@ -213,9 +213,11 @@ func (d *DiscoveryClient) serverPreferredResources(namespaced bool) ([]unversion const maxRetries = 2 var failedGroups map[unversioned.GroupVersion]error var results []unversioned.GroupVersionResource + var resources map[unversioned.GroupResource]string RetrieveGroups: for i := 0; i < maxRetries; i++ { results = []unversioned.GroupVersionResource{} + resources = map[unversioned.GroupResource]string{} failedGroups = make(map[unversioned.GroupVersion]error) serverGroupList, err := d.ServerGroups() if err != nil { @@ -223,25 +225,40 @@ RetrieveGroups: } for _, apiGroup := range serverGroupList.Groups { - preferredVersion := apiGroup.PreferredVersion - groupVersion := unversioned.GroupVersion{Group: apiGroup.Name, Version: preferredVersion.Version} - apiResourceList, err := d.ServerResourcesForGroupVersion(preferredVersion.GroupVersion) - if err != nil { - if i < maxRetries-1 { - continue RetrieveGroups - } - failedGroups[groupVersion] = err - continue - } - for _, apiResource := range apiResourceList.APIResources { - // ignore the root scoped resources if "namespaced" is true. - if namespaced && !apiResource.Namespaced { + versions := apiGroup.Versions + for _, version := range versions { + groupVersion := unversioned.GroupVersion{Group: apiGroup.Name, Version: version.Version} + apiResourceList, err := d.ServerResourcesForGroupVersion(version.GroupVersion) + if err != nil { + if i < maxRetries-1 { + continue RetrieveGroups + } + failedGroups[groupVersion] = err continue } - if strings.Contains(apiResource.Name, "/") { - continue + for _, apiResource := range apiResourceList.APIResources { + // ignore the root scoped resources if "namespaced" is true. + if namespaced && !apiResource.Namespaced { + continue + } + if strings.Contains(apiResource.Name, "/") { + continue + } + gvr := groupVersion.WithResource(apiResource.Name) + if _, ok := resources[gvr.GroupResource()]; ok { + if gvr.Version != apiGroup.PreferredVersion.Version { + continue + } + // remove previous entry, because it will be replaced with a preferred one + for i := range results { + if results[i].GroupResource() == gvr.GroupResource() { + results = append(results[:i], results[i+1:]...) + } + } + } + resources[gvr.GroupResource()] = gvr.Version + results = append(results, gvr) } - results = append(results, groupVersion.WithResource(apiResource.Name)) } } if len(failedGroups) == 0 { diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce.go index 126feec37..c56dd43b6 100644 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce.go +++ b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce.go @@ -608,6 +608,8 @@ func (gce *GCECloud) EnsureLoadBalancer(clusterName string, apiService *api.Serv // an IP, we assume they are managing it themselves. Otherwise, we will // release the IP in case of early-terminating failure or upon successful // creating of the LB. + // TODO(#36535): boil this logic down into a set of component functions + // and key the flag values off of errors returned. isUserOwnedIP := false // if this is set, we never release the IP isSafeToReleaseIP := false defer func() { @@ -735,7 +737,7 @@ func (gce *GCECloud) EnsureLoadBalancer(clusterName string, apiService *api.Serv return nil, fmt.Errorf("Error checking HTTP health check %s: %v", loadBalancerName, err) } if path, healthCheckNodePort := apiservice.GetServiceHealthCheckPathPort(apiService); path != "" { - glog.V(4).Infof("service %v needs health checks on :%d/%s)", apiService.Name, healthCheckNodePort, path) + glog.V(4).Infof("service %v (%v) needs health checks on :%d%s)", apiService.Name, loadBalancerName, healthCheckNodePort, path) if err != nil { // This logic exists to detect a transition for a pre-existing service and turn on // the tpNeedsUpdate flag to delete/recreate fwdrule/tpool adding the health check @@ -1080,13 +1082,18 @@ func (gce *GCECloud) createTargetPool(name, serviceName, region string, hosts [] for _, host := range hosts { instances = append(instances, makeHostURL(gce.projectID, host.Zone, host.Name)) } + // health check management is coupled with targetPools to prevent leaks. A + // target pool is the only thing that requires a health check, so we delete + // associated checks on teardown, and ensure checks on setup. hcLinks := []string{} if hc != nil { + var err error + if hc, err = gce.ensureHttpHealthCheck(name, hc.RequestPath, int32(hc.Port)); err != nil || hc == nil { + return fmt.Errorf("Failed to ensure health check for %v port %d path %v: %v", name, hc.Port, hc.RequestPath, err) + } hcLinks = append(hcLinks, hc.SelfLink) } - if len(hcLinks) > 0 { - glog.Infof("Creating targetpool %v with healthchecking", name) - } + glog.Infof("Creating targetpool %v with %d healthchecks", name, len(hcLinks)) pool := &compute.TargetPool{ Name: name, Description: fmt.Sprintf(`{"kubernetes.io/service-name":"%s"}`, serviceName), diff --git a/vendor/k8s.io/kubernetes/pkg/controller/controller_utils.go b/vendor/k8s.io/kubernetes/pkg/controller/controller_utils.go index 2ce713e00..11f871a8b 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/controller_utils.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/controller_utils.go @@ -520,11 +520,11 @@ func (r RealPodControl) DeletePod(namespace string, podID string, object runtime if err != nil { return fmt.Errorf("object does not have ObjectMeta, %v", err) } + glog.V(2).Infof("Controller %v deleting pod %v/%v", accessor.GetName(), namespace, podID) if err := r.KubeClient.Core().Pods(namespace).Delete(podID, nil); err != nil { r.Recorder.Eventf(object, api.EventTypeWarning, FailedDeletePodReason, "Error deleting: %v", err) return fmt.Errorf("unable to delete pods: %v", err) } else { - glog.V(4).Infof("Controller %v deleted pod %v", accessor.GetName(), podID) r.Recorder.Eventf(object, api.EventTypeNormal, SuccessfulDeletePodReason, "Deleted pod: %v", podID) } return nil diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/BUILD b/vendor/k8s.io/kubernetes/pkg/kubectl/BUILD index 2acfc138e..cc112dd3e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/BUILD @@ -46,7 +46,6 @@ go_library( "sorted_resource_name_list.go", "sorting_printer.go", "stop.go", - "version.go", ], tags = ["automanaged"], deps = [ @@ -69,6 +68,7 @@ go_library( "//pkg/apis/batch/v2alpha1:go_default_library", "//pkg/apis/certificates:go_default_library", "//pkg/apis/extensions:go_default_library", + "//pkg/apis/policy:go_default_library", "//pkg/apis/rbac:go_default_library", "//pkg/apis/storage:go_default_library", "//pkg/apis/storage/util:go_default_library", @@ -101,7 +101,6 @@ go_library( "//pkg/util/uuid:go_default_library", "//pkg/util/validation:go_default_library", "//pkg/util/wait:go_default_library", - "//pkg/version:go_default_library", "//pkg/watch:go_default_library", "//vendor:github.com/emicklei/go-restful/swagger", "//vendor:github.com/ghodss/yaml", @@ -155,6 +154,7 @@ go_test( "//pkg/apimachinery/registered:go_default_library", "//pkg/apis/batch:go_default_library", "//pkg/apis/extensions:go_default_library", + "//pkg/apis/policy:go_default_library", "//pkg/apis/storage:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/client/clientset_generated/internalclientset/fake:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/factory.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/factory.go index ef0405ac8..bd5dc1461 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/factory.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/factory.go @@ -386,18 +386,6 @@ func (f *factory) UnstructuredObject() (meta.RESTMapper, runtime.ObjectTyper, er return nil, nil, err } - // Register unknown APIs as third party for now to make - // validation happy. TODO perhaps make a dynamic schema - // validator to avoid this. - for _, group := range groupResources { - for _, version := range group.Group.Versions { - gv := unversioned.GroupVersion{Group: group.Group.Name, Version: version.Version} - if !registered.IsRegisteredVersion(gv) { - registered.AddThirdPartyAPIGroupVersions(gv) - } - } - } - mapper := discovery.NewDeferredDiscoveryRESTMapper(discoveryClient, meta.InterfacesForUnstructured) typer := discovery.NewUnstructuredObjectTyper(groupResources) return NewShortcutExpander(mapper, discoveryClient), typer, nil @@ -1148,10 +1136,7 @@ func (c *clientSwaggerSchema) ValidateBytes(data []byte) error { return err } if ok := registered.IsEnabledVersion(gvk.GroupVersion()); !ok { - return fmt.Errorf("API version %q isn't supported, only supports API versions %q", gvk.GroupVersion().String(), registered.EnabledVersions()) - } - if registered.IsThirdPartyAPIGroupVersion(gvk.GroupVersion()) { - // Don't attempt to validate third party objects + // if we don't have this in our scheme, just skip validation because its an object we don't recognize return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/describe.go b/vendor/k8s.io/kubernetes/pkg/kubectl/describe.go index b8ae59a7a..023313aa6 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/describe.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/describe.go @@ -40,6 +40,7 @@ import ( "k8s.io/kubernetes/pkg/apis/batch" "k8s.io/kubernetes/pkg/apis/certificates" "k8s.io/kubernetes/pkg/apis/extensions" + "k8s.io/kubernetes/pkg/apis/policy" "k8s.io/kubernetes/pkg/apis/storage" storageutil "k8s.io/kubernetes/pkg/apis/storage/util" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -120,6 +121,7 @@ func describerMap(c clientset.Interface) map[unversioned.GroupKind]Describer { apps.Kind("StatefulSet"): &StatefulSetDescriber{c}, certificates.Kind("CertificateSigningRequest"): &CertificateSigningRequestDescriber{c}, storage.Kind("StorageClass"): &StorageClassDescriber{c}, + policy.Kind("PodDisruptionBudget"): &PodDisruptionBudgetDescriber{c}, } return m @@ -1801,6 +1803,7 @@ func (d *NodeDescriber) Describe(namespace, name string, describerSettings Descr func describeNode(node *api.Node, nodeNonTerminatedPodsList *api.PodList, events *api.EventList, canViewPods bool) (string, error) { return tabbedString(func(out io.Writer) error { fmt.Fprintf(out, "Name:\t%s\n", node.Name) + fmt.Fprintf(out, "Role:\t%s\n", findNodeRole(node)) printLabelsMultiline(out, "Labels", node.Labels) printTaintsInAnnotationMultiline(out, "Taints", node.Annotations) fmt.Fprintf(out, "CreationTimestamp:\t%s\n", node.CreationTimestamp.Time.Format(time.RFC1123Z)) @@ -2407,6 +2410,41 @@ func (s *StorageClassDescriber) Describe(namespace, name string, describerSettin }) } +type PodDisruptionBudgetDescriber struct { + clientset.Interface +} + +func (p *PodDisruptionBudgetDescriber) Describe(namespace, name string, describerSettings DescriberSettings) (string, error) { + pdb, err := p.Policy().PodDisruptionBudgets(namespace).Get(name) + if err != nil { + return "", err + } + return tabbedString(func(out io.Writer) error { + fmt.Fprintf(out, "Name:\t%s\n", pdb.Name) + fmt.Fprintf(out, "Min available:\t%s\n", pdb.Spec.MinAvailable.String()) + if pdb.Spec.Selector != nil { + fmt.Fprintf(out, "Selector:\t%s\n", unversioned.FormatLabelSelector(pdb.Spec.Selector)) + } else { + fmt.Fprintf(out, "Selector:\t\n") + } + fmt.Fprintf(out, "Status:\n") + fmt.Fprintf(out, " Allowed disruptions:\t%d\n", pdb.Status.PodDisruptionsAllowed) + fmt.Fprintf(out, " Current:\t%d\n", pdb.Status.CurrentHealthy) + fmt.Fprintf(out, " Desired:\t%d\n", pdb.Status.DesiredHealthy) + fmt.Fprintf(out, " Total:\t%d\n", pdb.Status.ExpectedPods) + if describerSettings.ShowEvents { + events, err := p.Core().Events(namespace).Search(pdb) + if err != nil { + return err + } + if events != nil { + DescribeEvents(events, out) + } + } + return nil + }) +} + // newErrNoDescriber creates a new ErrNoDescriber with the names of the provided types. func newErrNoDescriber(types ...reflect.Type) error { names := make([]string, 0, len(types)) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/resource_filter.go b/vendor/k8s.io/kubernetes/pkg/kubectl/resource_filter.go index 8ca31d83a..cd6470ba2 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/resource_filter.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/resource_filter.go @@ -58,6 +58,17 @@ func filterPods(obj runtime.Object, options PrintOptions) bool { // Filter loops through a collection of FilterFuncs until it finds one that can filter the given resource func (f Filters) Filter(obj runtime.Object, opts *PrintOptions) (bool, error) { + // check if the object is unstructured. If so, let's attempt to convert it to a type we can understand + // before apply filter func. + switch obj.(type) { + case *runtime.UnstructuredList, *runtime.Unstructured, *runtime.Unknown: + if objBytes, err := runtime.Encode(api.Codecs.LegacyCodec(), obj); err == nil { + if decodedObj, err := runtime.Decode(api.Codecs.UniversalDecoder(), objBytes); err == nil { + obj = decodedObj + } + } + } + for _, filter := range f { if ok := filter(obj, *opts); ok { return true, nil diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/resource_printer.go b/vendor/k8s.io/kubernetes/pkg/kubectl/resource_printer.go index cb136f8d1..032982a1c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/resource_printer.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/resource_printer.go @@ -40,6 +40,7 @@ import ( "k8s.io/kubernetes/pkg/apis/batch" "k8s.io/kubernetes/pkg/apis/certificates" "k8s.io/kubernetes/pkg/apis/extensions" + "k8s.io/kubernetes/pkg/apis/policy" "k8s.io/kubernetes/pkg/apis/rbac" "k8s.io/kubernetes/pkg/apis/storage" storageutil "k8s.io/kubernetes/pkg/apis/storage/util" @@ -474,6 +475,7 @@ func (h *HumanReadablePrinter) AfterPrint(output io.Writer, res string) error { var ( podColumns = []string{"NAME", "READY", "STATUS", "RESTARTS", "AGE"} podTemplateColumns = []string{"TEMPLATE", "CONTAINER(S)", "IMAGE(S)", "PODLABELS"} + podDisruptionBudgetColumns = []string{"NAME", "MIN-AVAILABLE", "ALLOWED-DISRUPTIONS", "AGE"} replicationControllerColumns = []string{"NAME", "DESIRED", "CURRENT", "READY", "AGE"} replicaSetColumns = []string{"NAME", "DESIRED", "CURRENT", "READY", "AGE"} jobColumns = []string{"NAME", "DESIRED", "SUCCESSFUL", "AGE"} @@ -536,6 +538,8 @@ func (h *HumanReadablePrinter) addDefaultHandlers() { h.Handler(podColumns, h.printPod) h.Handler(podTemplateColumns, printPodTemplate) h.Handler(podTemplateColumns, printPodTemplateList) + h.Handler(podDisruptionBudgetColumns, printPodDisruptionBudget) + h.Handler(podDisruptionBudgetColumns, printPodDisruptionBudgetList) h.Handler(replicationControllerColumns, printReplicationController) h.Handler(replicationControllerColumns, printReplicationControllerList) h.Handler(replicaSetColumns, printReplicaSet) @@ -828,6 +832,37 @@ func printPodTemplateList(podList *api.PodTemplateList, w io.Writer, options Pri return nil } +func printPodDisruptionBudget(pdb *policy.PodDisruptionBudget, w io.Writer, options PrintOptions) error { + // name, minavailable, selector + name := formatResourceName(options.Kind, pdb.Name, options.WithKind) + namespace := pdb.Namespace + + if options.WithNamespace { + if _, err := fmt.Fprintf(w, "%s\t", namespace); err != nil { + return err + } + } + if _, err := fmt.Fprintf(w, "%s\t%s\t%d\t%s\n", + name, + pdb.Spec.MinAvailable.String(), + pdb.Status.PodDisruptionsAllowed, + translateTimestamp(pdb.CreationTimestamp), + ); err != nil { + return err + } + + return nil +} + +func printPodDisruptionBudgetList(pdbList *policy.PodDisruptionBudgetList, w io.Writer, options PrintOptions) error { + for _, pdb := range pdbList.Items { + if err := printPodDisruptionBudget(&pdb, w, options); err != nil { + return err + } + } + return nil +} + // TODO(AdoHe): try to put wide output in a single method func printReplicationController(controller *api.ReplicationController, w io.Writer, options PrintOptions) error { name := formatResourceName(options.Kind, controller.Name, options.WithKind) @@ -1491,6 +1526,10 @@ func printNode(node *api.Node, w io.Writer, options PrintOptions) error { if node.Spec.Unschedulable { status = append(status, "SchedulingDisabled") } + role := findNodeRole(node) + if role != "" { + status = append(status, role) + } if _, err := fmt.Fprintf(w, "%s\t%s\t%s", name, strings.Join(status, ","), translateTimestamp(node.CreationTimestamp)); err != nil { return err @@ -1520,6 +1559,22 @@ func getNodeExternalIP(node *api.Node) string { return "" } +// findNodeRole returns the role of a given node, or "" if none found. +// The role is determined by looking in order for: +// * a kubernetes.io/role label +// * a kubeadm.alpha.kubernetes.io/role label +// If no role is found, ("", nil) is returned +func findNodeRole(node *api.Node) string { + if role := node.Labels[unversioned.NodeLabelRole]; role != "" { + return role + } + if role := node.Labels[unversioned.NodeLabelKubeadmAlphaRole]; role != "" { + return role + } + // No role found + return "" +} + func printNodeList(list *api.NodeList, w io.Writer, options PrintOptions) error { for _, node := range list.Items { if err := printNode(&node, w, options); err != nil { @@ -2263,7 +2318,7 @@ func (h *HumanReadablePrinter) PrintObj(obj runtime.Object, output io.Writer) er // check if the object is unstructured. If so, let's attempt to convert it to a type we can understand before // trying to print, since the printers are keyed by type. This is extremely expensive. switch obj.(type) { - case *runtime.Unstructured, *runtime.Unknown: + case *runtime.UnstructuredList, *runtime.Unstructured, *runtime.Unknown: if objBytes, err := runtime.Encode(api.Codecs.LegacyCodec(), obj); err == nil { if decodedObj, err := runtime.Decode(api.Codecs.UniversalDecoder(), objBytes); err == nil { obj = decodedObj diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/version.go b/vendor/k8s.io/kubernetes/pkg/kubectl/version.go deleted file mode 100644 index d015df727..000000000 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/version.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package kubectl - -import ( - "fmt" - "io" - - "k8s.io/kubernetes/pkg/version" -) - -func GetClientVersion(w io.Writer) { - fmt.Fprintf(w, "Client Version: %#v\n", version.Get()) -} diff --git a/vendor/k8s.io/kubernetes/pkg/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/storage/BUILD index 1e37a911f..de2d97e92 100644 --- a/vendor/k8s.io/kubernetes/pkg/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/storage/BUILD @@ -87,6 +87,7 @@ go_test( "//pkg/storage/etcd:go_default_library", "//pkg/storage/etcd/etcdtest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//pkg/storage/etcd3:go_default_library", "//pkg/util/sets:go_default_library", "//pkg/util/wait:go_default_library", "//pkg/watch:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/util/config/feature_gate.go b/vendor/k8s.io/kubernetes/pkg/util/config/feature_gate.go index 11996dabf..ff90f2fb2 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/config/feature_gate.go +++ b/vendor/k8s.io/kubernetes/pkg/util/config/feature_gate.go @@ -43,18 +43,26 @@ const ( dynamicKubeletConfig = "DynamicKubeletConfig" dynamicVolumeProvisioning = "DynamicVolumeProvisioning" streamingProxyRedirects = "StreamingProxyRedirects" + + // experimentalHostUserNamespaceDefaulting Default userns=host for containers + // that are using other host namespaces, host mounts, the pod contains a privileged container, + // or specific non-namespaced capabilities + // (MKNOD, SYS_MODULE, SYS_TIME). This should only be enabled if user namespace remapping is enabled + // in the docker daemon. + experimentalHostUserNamespaceDefaultingGate = "ExperimentalHostUserNamespaceDefaulting" ) var ( // Default values for recorded features. Every new feature gate should be // represented here. knownFeatures = map[string]featureSpec{ - allAlphaGate: {false, alpha}, - externalTrafficLocalOnly: {true, beta}, - appArmor: {true, beta}, - dynamicKubeletConfig: {false, alpha}, - dynamicVolumeProvisioning: {true, alpha}, - streamingProxyRedirects: {false, alpha}, + allAlphaGate: {false, alpha}, + externalTrafficLocalOnly: {true, beta}, + appArmor: {true, beta}, + dynamicKubeletConfig: {false, alpha}, + dynamicVolumeProvisioning: {true, alpha}, + streamingProxyRedirects: {false, alpha}, + experimentalHostUserNamespaceDefaultingGate: {false, alpha}, } // Special handling for a few gates. @@ -115,6 +123,10 @@ type FeatureGate interface { // owner: timstclair // alpha: v1.5 StreamingProxyRedirects() bool + + // owner: @pweil- + // alpha: v1.5 + ExperimentalHostUserNamespaceDefaulting() bool } // featureGate implements FeatureGate as well as pflag.Value for flag parsing. @@ -209,6 +221,11 @@ func (f *featureGate) StreamingProxyRedirects() bool { return f.lookup(streamingProxyRedirects) } +// ExperimentalHostUserNamespaceDefaulting returns value for experimentalHostUserNamespaceDefaulting +func (f *featureGate) ExperimentalHostUserNamespaceDefaulting() bool { + return f.lookup(experimentalHostUserNamespaceDefaultingGate) +} + func (f *featureGate) lookup(key string) bool { defaultValue := f.known[key].enabled if f.enabled != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/util/mount/mount.go b/vendor/k8s.io/kubernetes/pkg/util/mount/mount.go index 02ef476b1..8796d6a52 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/mount/mount.go +++ b/vendor/k8s.io/kubernetes/pkg/util/mount/mount.go @@ -30,7 +30,8 @@ import ( const ( // Default mount command if mounter path is not specified - defaultMountCommand = "mount" + defaultMountCommand = "mount" + MountsInGlobalPDPath = "mounts" ) type Interface interface { @@ -189,9 +190,15 @@ func getDeviceNameFromMount(mounter Interface, mountPath, pluginDir string) (str glog.V(4).Infof("Directory %s is not mounted", mountPath) return "", fmt.Errorf("directory %s is not mounted", mountPath) } + basemountPath := path.Join(pluginDir, MountsInGlobalPDPath) for _, ref := range refs { - if strings.HasPrefix(ref, pluginDir) { - return path.Base(ref), nil + if strings.HasPrefix(ref, basemountPath) { + volumeID, err := filepath.Rel(basemountPath, ref) + if err != nil { + glog.Errorf("Failed to get volume id from mount %s - %v", mountPath, err) + return "", err + } + return volumeID, nil } } diff --git a/vendor/k8s.io/kubernetes/pkg/util/wait/wait.go b/vendor/k8s.io/kubernetes/pkg/util/wait/wait.go index 34d833b44..34ed2301d 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/wait/wait.go +++ b/vendor/k8s.io/kubernetes/pkg/util/wait/wait.go @@ -36,33 +36,42 @@ var ForeverTestTimeout = time.Second * 30 // NeverStop may be passed to Until to make it never stop. var NeverStop <-chan struct{} = make(chan struct{}) -// Forever is syntactic sugar on top of Until +// Forever calls f every period for ever. +// +// Forever is syntactic sugar on top of Until. func Forever(f func(), period time.Duration) { Until(f, period, NeverStop) } // Until loops until stop channel is closed, running f every period. -// Until is syntactic sugar on top of JitterUntil with zero jitter -// factor, with sliding = true (which means the timer for period -// starts after the f completes). +// +// Until is syntactic sugar on top of JitterUntil with zero jitter factor and +// with sliding = true (which means the timer for period starts after the f +// completes). func Until(f func(), period time.Duration, stopCh <-chan struct{}) { JitterUntil(f, period, 0.0, true, stopCh) } // NonSlidingUntil loops until stop channel is closed, running f every -// period. NonSlidingUntil is syntactic sugar on top of JitterUntil -// with zero jitter factor, with sliding = false (meaning the timer for -// period starts at the same time as the function starts). +// period. +// +// NonSlidingUntil is syntactic sugar on top of JitterUntil with zero jitter +// factor, with sliding = false (meaning the timer for period starts at the same +// time as the function starts). func NonSlidingUntil(f func(), period time.Duration, stopCh <-chan struct{}) { JitterUntil(f, period, 0.0, false, stopCh) } // JitterUntil loops until stop channel is closed, running f every period. +// // If jitterFactor is positive, the period is jittered before every run of f. -// If jitterFactor is not positive, the period is unchanged. -// Catches any panics, and keeps going. f may not be invoked if -// stop channel is already closed. Pass NeverStop to Until if you -// don't want it stop. +// If jitterFactor is not positive, the period is unchanged and not jitterd. +// +// If slidingis true, the period is computed after f runs. If it is false then +// period includes the runtime for f. +// +// Close stopCh to stop. f may not be invoked if stop channel is already +// closed. Pass NeverStop to if you don't want it stop. func JitterUntil(f func(), period time.Duration, jitterFactor float64, sliding bool, stopCh <-chan struct{}) { for { @@ -104,9 +113,11 @@ func JitterUntil(f func(), period time.Duration, jitterFactor float64, sliding b } } -// Jitter returns a time.Duration between duration and duration + maxFactor * duration, -// to allow clients to avoid converging on periodic behavior. If maxFactor is 0.0, a -// suggested default value will be chosen. +// Jitter returns a time.Duration between duration and duration + maxFactor * +// duration. +// +// This allows clients to avoid converging on periodic behavior. If maxFactor +// is 0.0, a suggested default value will be chosen. func Jitter(duration time.Duration, maxFactor float64) time.Duration { if maxFactor <= 0.0 { maxFactor = 1.0 @@ -115,26 +126,31 @@ func Jitter(duration time.Duration, maxFactor float64) time.Duration { return wait } -// ErrWaitTimeout is returned when the condition exited without success +// ErrWaitTimeout is returned when the condition exited without success. var ErrWaitTimeout = errors.New("timed out waiting for the condition") // ConditionFunc returns true if the condition is satisfied, or an error // if the loop should be aborted. type ConditionFunc func() (done bool, err error) -// Backoff is parameters applied to a Backoff function. +// Backoff holds parameters applied to a Backoff function. type Backoff struct { - Duration time.Duration - Factor float64 - Jitter float64 - Steps int + Duration time.Duration // the base duration + Factor float64 // Duration is multipled by factor each iteration + Jitter float64 // The amount of jitter applied each iteration + Steps int // Exit with error after this many steps } -// ExponentialBackoff repeats a condition check up to steps times, increasing the wait -// by multipling the previous duration by factor. If jitter is greater than zero, -// a random amount of each duration is added (between duration and duration*(1+jitter)). -// If the condition never returns true, ErrWaitTimeout is returned. All other errors -// terminate immediately. +// ExponentialBackoff repeats a condition check with exponential backoff. +// +// It checks the condition up to Steps times, increasing the wait by multipling +// the previous duration by Factor. +// +// If Jitter is greater than zero, a random amount of each duration is added +// (between duration and duration*(1+jitter)). +// +// If the condition never returns true, ErrWaitTimeout is returned. All other +// errors terminate immediately. func ExponentialBackoff(backoff Backoff, condition ConditionFunc) error { duration := backoff.Duration for i := 0; i < backoff.Steps; i++ { @@ -154,22 +170,33 @@ func ExponentialBackoff(backoff Backoff, condition ConditionFunc) error { } // Poll tries a condition func until it returns true, an error, or the timeout -// is reached. condition will always be invoked at least once but some intervals -// may be missed if the condition takes too long or the time window is too short. +// is reached. +// +// Poll always waits the interval before the run of 'condition'. +// 'condition' will always be invoked at least once. +// +// Some intervals may be missed if the condition takes too long or the time +// window is too short. +// // If you want to Poll something forever, see PollInfinite. -// Poll always waits the interval before the first check of the condition. func Poll(interval, timeout time.Duration, condition ConditionFunc) error { return pollInternal(poller(interval, timeout), condition) } func pollInternal(wait WaitFunc, condition ConditionFunc) error { - done := make(chan struct{}) - defer close(done) - return WaitFor(wait, condition, done) + return WaitFor(wait, condition, NeverStop) } -// PollImmediate is identical to Poll, except that it performs the first check -// immediately, not waiting interval beforehand. +// PollImmediate tries a condition func until it returns true, an error, or the timeout +// is reached. +// +// Poll always checks 'condition' before waiting for the interval. 'condition' +// will always be invoked at least once. +// +// Some intervals may be missed if the condition takes too long or the time +// window is too short. +// +// If you want to Poll something forever, see PollInfinite. func PollImmediate(interval, timeout time.Duration, condition ConditionFunc) error { return pollImmediateInternal(poller(interval, timeout), condition) } @@ -185,16 +212,24 @@ func pollImmediateInternal(wait WaitFunc, condition ConditionFunc) error { return pollInternal(wait, condition) } -// PollInfinite polls forever. +// PollInfinite tries a condition func until it returns true or an error +// +// PollInfinite always waits the interval before the run of 'condition'. +// +// Some intervals may be missed if the condition takes too long or the time +// window is too short. func PollInfinite(interval time.Duration, condition ConditionFunc) error { done := make(chan struct{}) defer close(done) return PollUntil(interval, condition, done) } -// PollImmediateInfinite is identical to PollInfinite, except that it -// performs the first check immediately, not waiting interval -// beforehand. +// PollImmediateInfinite tries a condition func until it returns true or an error +// +// PollImmediateInfinite runs the 'condition' before waiting for the interval. +// +// Some intervals may be missed if the condition takes too long or the time +// window is too short. func PollImmediateInfinite(interval time.Duration, condition ConditionFunc) error { done, err := condition() if err != nil { @@ -206,7 +241,11 @@ func PollImmediateInfinite(interval time.Duration, condition ConditionFunc) erro return PollInfinite(interval, condition) } -// PollUntil is like Poll, but it takes a stop change instead of total duration +// PollUntil tries a condition func until it returns true, an error or stopCh is +// closed. +// +// PolUntil always waits interval before the first run of 'condition'. +// 'condition' will always be invoked at least once. func PollUntil(interval time.Duration, condition ConditionFunc, stopCh <-chan struct{}) error { return WaitFor(poller(interval, 0), condition, stopCh) } @@ -215,11 +254,16 @@ func PollUntil(interval time.Duration, condition ConditionFunc, stopCh <-chan st // should be executed and is closed when the last test should be invoked. type WaitFunc func(done <-chan struct{}) <-chan struct{} -// WaitFor gets a channel from wait(), and then invokes fn once for every value -// placed on the channel and once more when the channel is closed. If fn -// returns an error the loop ends and that error is returned, and if fn returns -// true the loop ends and nil is returned. ErrWaitTimeout will be returned if -// the channel is closed without fn ever returning true. +// WaitFor continually checks 'fn' as driven by 'wait'. +// +// WaitFor gets a channel from 'wait()'', and then invokes 'fn' once for every value +// placed on the channel and once more when the channel is closed. +// +// If 'fn' returns an error the loop ends and that error is returned, and if +// 'fn' returns true the loop ends and nil is returned. +// +// ErrWaitTimeout will be returned if the channel is closed without fn ever +// returning true. func WaitFor(wait WaitFunc, fn ConditionFunc, done <-chan struct{}) error { c := wait(done) for { @@ -238,11 +282,14 @@ func WaitFor(wait WaitFunc, fn ConditionFunc, done <-chan struct{}) error { return ErrWaitTimeout } -// poller returns a WaitFunc that will send to the channel every -// interval until timeout has elapsed and then close the channel. -// Over very short intervals you may receive no ticks before -// the channel is closed. If timeout is 0, the channel -// will never be closed. +// poller returns a WaitFunc that will send to the channel every interval until +// timeout has elapsed and then closes the channel. +// +// Over very short intervals you may receive no ticks before the channel is +// closed. A timeout of 0 is interpreted as an infinity. +// +// Output ticks are not buffered. If the channel is not ready to receive an +// item, the tick is skipped. func poller(interval, timeout time.Duration) WaitFunc { return WaitFunc(func(done <-chan struct{}) <-chan struct{} { ch := make(chan struct{}) diff --git a/vendor/k8s.io/kubernetes/pkg/util/workqueue/delaying_queue.go b/vendor/k8s.io/kubernetes/pkg/util/workqueue/delaying_queue.go index 5a71b8181..eaa6b5bb4 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/workqueue/delaying_queue.go +++ b/vendor/k8s.io/kubernetes/pkg/util/workqueue/delaying_queue.go @@ -24,7 +24,7 @@ import ( utilruntime "k8s.io/kubernetes/pkg/util/runtime" ) -// DelayingInterface is an Interface that can Add an item at a later time. This makes it easier to +// DelayingInterface is an Interface that can Add an item at a later time. This makes it easier to // requeue items after failures without ending up in a hot-loop. type DelayingInterface interface { Interface @@ -68,6 +68,9 @@ type delayingType struct { stopCh chan struct{} // heartbeat ensures we wait no more than maxWait before firing + // + // TODO: replace with Ticker (and add to clock) so this can be cleaned up. + // clock.Tick will leak. heartbeat <-chan time.Time // waitingForAdd is an ordered slice of items to be added to the contained work queue @@ -115,7 +118,7 @@ func (q *delayingType) AddAfter(item interface{}, duration time.Duration) { } } -// maxWait keeps a max bound on the wait time. It's just insurance against weird things happening. +// maxWait keeps a max bound on the wait time. It's just insurance against weird things happening. // Checking the queue every 10 seconds isn't expensive and we know that we'll never end up with an // expired item sitting for more than 10 seconds. const maxWait = 10 * time.Second @@ -192,6 +195,9 @@ func (q *delayingType) waitingLoop() { // inserts the given entry into the sorted entries list // same semantics as append()... the given slice may be modified, // and the returned value should be used +// +// TODO: This should probably be converted to use container/heap to improve +// running time for a large number of items. func insert(entries []waitFor, knownEntries map[t]time.Time, entry waitFor) []waitFor { // if the entry is already in our retry list and the existing time is before the new one, just skip it existingTime, exists := knownEntries[entry.data] diff --git a/vendor/k8s.io/kubernetes/pkg/util/workqueue/parallelizer.go b/vendor/k8s.io/kubernetes/pkg/util/workqueue/parallelizer.go index a9305935b..b66cebe69 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/workqueue/parallelizer.go +++ b/vendor/k8s.io/kubernetes/pkg/util/workqueue/parallelizer.go @@ -33,6 +33,10 @@ func Parallelize(workers, pieces int, doWorkPiece DoWorkPieceFunc) { } close(toProcess) + if pieces < workers { + workers = pieces + } + wg := sync.WaitGroup{} wg.Add(workers) for i := 0; i < workers; i++ { diff --git a/vendor/k8s.io/kubernetes/pkg/util/workqueue/queue.go b/vendor/k8s.io/kubernetes/pkg/util/workqueue/queue.go index 9a2ecad38..3e1a49fe2 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/workqueue/queue.go +++ b/vendor/k8s.io/kubernetes/pkg/util/workqueue/queue.go @@ -154,7 +154,7 @@ func (q *Type) Done(item interface{}) { } } -// Shutdown will cause q to ignore all new items added to it. As soon as the +// ShutDown will cause q to ignore all new items added to it. As soon as the // worker goroutines have drained the existing items in the queue, they will be // instructed to exit. func (q *Type) ShutDown() { diff --git a/vendor/k8s.io/kubernetes/pkg/util/workqueue/rate_limitting_queue.go b/vendor/k8s.io/kubernetes/pkg/util/workqueue/rate_limitting_queue.go index 9a2bfbb56..417ac001b 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/workqueue/rate_limitting_queue.go +++ b/vendor/k8s.io/kubernetes/pkg/util/workqueue/rate_limitting_queue.go @@ -16,10 +16,10 @@ limitations under the License. package workqueue -// RateLimitingInterface is an Interface that can Add an item at a later time. This makes it easier to -// requeue items after failures without ending up in a hot-loop. +// RateLimitingInterface is an interface that rate limits items being added to the queue. type RateLimitingInterface interface { DelayingInterface + // AddRateLimited adds an item to the workqueue after the rate limiter says its ok AddRateLimited(item interface{}) @@ -27,6 +27,7 @@ type RateLimitingInterface interface { // or for success, we'll stop the rate limiter from tracking it. This only clears the `rateLimiter`, you // still have to call `Done` on the queue. Forget(item interface{}) + // NumRequeues returns back how many times the item was requeued NumRequeues(item interface{}) int } diff --git a/vendor/k8s.io/kubernetes/pkg/version/base.go b/vendor/k8s.io/kubernetes/pkg/version/base.go index 590981520..e16da307e 100644 --- a/vendor/k8s.io/kubernetes/pkg/version/base.go +++ b/vendor/k8s.io/kubernetes/pkg/version/base.go @@ -39,8 +39,8 @@ var ( // them irrelevant. (Next we'll take it out, which may muck with // scripts consuming the kubectl version output - but most of // these should be looking at gitVersion already anyways.) - gitMajor string = "" // major version, always numeric - gitMinor string = "" // minor version, numeric possibly followed by "+" + gitMajor string = "1" // major version, always numeric + gitMinor string = "5+" // minor version, numeric possibly followed by "+" // semantic version, derived by build scripts (see // https://github.com/kubernetes/kubernetes/blob/master/docs/design/versioning.md @@ -51,7 +51,7 @@ var ( // semantic version is a git hash, but the version itself is no // longer the direct output of "git describe", but a slight // translation to be semver compliant. - gitVersion string = "v0.0.0-master+$Format:%h$" + gitVersion string = "v1.5.0-beta.2+$Format:%h$" gitCommit string = "$Format:%H$" // sha1 from git, output of $(git rev-parse HEAD) gitTreeState string = "not a git tree" // state of git tree, either "clean" or "dirty" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util.go b/vendor/k8s.io/kubernetes/pkg/volume/util.go index a5ff19611..043877293 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/util.go @@ -83,7 +83,12 @@ func internalRecycleVolumeByWatchingPodUntilCompletion(pvName string, pod *api.P return fmt.Errorf("unexpected error creating recycler pod: %+v\n", err) } } - defer recyclerClient.DeletePod(pod.Name, pod.Namespace) + defer func(pod *api.Pod) { + glog.V(2).Infof("deleting recycler pod %s/%s", pod.Namespace, pod.Name) + if err := recyclerClient.DeletePod(pod.Name, pod.Namespace); err != nil { + glog.Errorf("failed to delete recycler pod %s/%s: %v", pod.Namespace, pod.Name, err) + } + }(pod) // Now only the old pod or the new pod run. Watch it until it finishes // and send all events on the pod to the PV diff --git a/vendor/k8s.io/kubernetes/pkg/volume/volume.go b/vendor/k8s.io/kubernetes/pkg/volume/volume.go index 1491c1433..83cb1955f 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/volume.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/volume.go @@ -94,6 +94,18 @@ type Attributes struct { type Mounter interface { // Uses Interface to provide the path for Docker binds. Volume + + // CanMount is called immediately prior to Setup to check if + // the required components (binaries, etc.) are available on + // the underlying node to complete the subsequent SetUp (mount) + // operation. If CanMount returns error, the mount operation is + // aborted and an event is generated indicating that the node + // does not have the required binaries to complete the mount. + // If CanMount succeeds, the mount operation continues + // normally. The CanMount check can be enabled or disabled + // using the experimental-check-mount-binaries binary flag + CanMount() error + // SetUp prepares and mounts/unpacks the volume to a // self-determined directory path. The mount point and its // content should be owned by 'fsGroup' so that it can be diff --git a/vendor/k8s.io/kubernetes/pkg/volume/volume_linux.go b/vendor/k8s.io/kubernetes/pkg/volume/volume_linux.go index cd8b6b2b8..1391e6225 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/volume_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/volume_linux.go @@ -71,7 +71,11 @@ func SetVolumeOwnership(mounter Mounter, fsGroup *int64) error { mask = roMask } - err = chmodRunner.Chmod(path, info.Mode()|mask|os.ModeSetgid) + if info.IsDir() { + mask |= os.ModeSetgid + } + + err = chmodRunner.Chmod(path, info.Mode()|mask) if err != nil { glog.Errorf("Chmod failed on %v: %v", path, err) } diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/gcp/gcp.go b/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/gcp/gcp.go index 97f9912da..8b52a27a1 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/gcp/gcp.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/gcp/gcp.go @@ -23,6 +23,7 @@ import ( "net/http" "os/exec" "strings" + "sync" "time" "github.com/golang/glog" @@ -40,6 +41,48 @@ func init() { } } +// gcpAuthProvider is an auth provider plugin that uses GCP credentials to provide +// tokens for kubectl to authenticate itself to the apiserver. A sample json config +// is provided below with all recognized options described. +// +// { +// 'auth-provider': { +// # Required +// "name": "gcp", +// +// 'config': { +// # Caching options +// +// # Raw string data representing cached access token. +// "access-token": "ya29.CjWdA4GiBPTt", +// # RFC3339Nano expiration timestamp for cached access token. +// "expiry": "2016-10-31 22:31:9.123", +// +// # Command execution options +// # These options direct the plugin to execute a specified command and parse +// # token and expiry time from the output of the command. +// +// # Command to execute for access token. String is split on whitespace +// # with first field treated as the executable, remaining fields as args. +// # Command output will be parsed as JSON. +// "cmd-path": "/usr/bin/gcloud config config-helper --output=json", +// +// # JSONPath to the string field that represents the access token in +// # command output. If omitted, defaults to "{.access_token}". +// "token-key": "{.credential.access_token}", +// +// # JSONPath to the string field that represents expiration timestamp +// # of the access token in the command output. If omitted, defaults to +// # "{.token_expiry}" +// "expiry-key": ""{.credential.token_expiry}", +// +// # golang reference time in the format that the expiration timestamp uses. +// # If omitted, defaults to time.RFC3339Nano +// "time-fmt": "2006-01-02 15:04:05.999999999" +// } +// } +// } +// type gcpAuthProvider struct { tokenSource oauth2.TokenSource persister restclient.AuthProviderConfigPersister @@ -74,6 +117,7 @@ func (g *gcpAuthProvider) WrapTransport(rt http.RoundTripper) http.RoundTripper func (g *gcpAuthProvider) Login() error { return nil } type cachedTokenSource struct { + lk sync.Mutex source oauth2.TokenSource accessToken string expiry time.Time @@ -99,11 +143,7 @@ func newCachedTokenSource(accessToken, expiry string, persister restclient.AuthP } func (t *cachedTokenSource) Token() (*oauth2.Token, error) { - tok := &oauth2.Token{ - AccessToken: t.accessToken, - TokenType: "Bearer", - Expiry: t.expiry, - } + tok := t.cachedToken() if tok.Valid() && !tok.Expiry.IsZero() { return tok, nil } @@ -111,16 +151,39 @@ func (t *cachedTokenSource) Token() (*oauth2.Token, error) { if err != nil { return nil, err } + cache := t.update(tok) if t.persister != nil { - t.cache["access-token"] = tok.AccessToken - t.cache["expiry"] = tok.Expiry.Format(time.RFC3339Nano) - if err := t.persister.Persist(t.cache); err != nil { + if err := t.persister.Persist(cache); err != nil { glog.V(4).Infof("Failed to persist token: %v", err) } } return tok, nil } +func (t *cachedTokenSource) cachedToken() *oauth2.Token { + t.lk.Lock() + defer t.lk.Unlock() + return &oauth2.Token{ + AccessToken: t.accessToken, + TokenType: "Bearer", + Expiry: t.expiry, + } +} + +func (t *cachedTokenSource) update(tok *oauth2.Token) map[string]string { + t.lk.Lock() + defer t.lk.Unlock() + t.accessToken = tok.AccessToken + t.expiry = tok.Expiry + ret := map[string]string{} + for k, v := range t.cache { + ret[k] = v + } + ret["access-token"] = t.accessToken + ret["expiry"] = t.expiry.Format(time.RFC3339Nano) + return ret +} + type commandTokenSource struct { cmd string args []string