diff --git a/go.mod b/go.mod index 45f98ddb9..b99b84dfa 100644 --- a/go.mod +++ b/go.mod @@ -3,9 +3,9 @@ module stash.appscode.dev/mongodb go 1.12 require ( - github.com/appscode/go v0.0.0-20200323182826-54e98e09185a + github.com/appscode/go v0.0.0-20200928211031-cc0c23082d91 github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 - github.com/go-openapi/spec v0.19.7 + github.com/go-openapi/spec v0.19.8 github.com/gogo/protobuf v1.3.1 github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b github.com/google/gofuzz v1.1.0 @@ -13,20 +13,25 @@ require ( github.com/spf13/cobra v1.0.0 github.com/yudai/gojsondiff v1.0.0 go.bytebuilders.dev/license-verifier/kubernetes v0.3.0 - k8s.io/api v0.18.5 - k8s.io/apiextensions-apiserver v0.18.5 - k8s.io/apimachinery v0.18.5 + k8s.io/api v0.18.9 + k8s.io/apiextensions-apiserver v0.18.9 + k8s.io/apimachinery v0.18.9 k8s.io/client-go v12.0.0+incompatible k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6 - kmodules.xyz/client-go v0.0.0-20200915091229-7df16c29f4e8 - kmodules.xyz/crd-schema-fuzz v0.0.0-20200521005638-2433a187de95 - kmodules.xyz/custom-resources v0.0.0-20200604135349-9e9f5c4fdba9 - kmodules.xyz/offshoot-api v0.0.0-20200521035628-e135bf07b226 + k8s.io/kubernetes v1.18.9 // indirect + kmodules.xyz/client-go v0.0.0-20200929030759-cce6a3c623c1 + kmodules.xyz/crd-schema-fuzz v0.0.0-20200922204806-c1426cd7fcf4 + kmodules.xyz/custom-resources v0.0.0-20200922210108-70f2815a43bb + kmodules.xyz/objectstore-api v0.0.0-20200922210707-59bab27e5d41 // indirect + kmodules.xyz/offshoot-api v0.0.0-20200922211229-36acc531abab + kmodules.xyz/prober v0.0.0-20200922212142-743a6514664e // indirect kubedb.dev/apimachinery v0.14.0-beta.2 sigs.k8s.io/yaml v1.2.0 stash.appscode.dev/apimachinery v0.11.0 ) +// release-1.18 + replace bitbucket.org/ww/goautoneg => gomodules.xyz/goautoneg v0.0.0-20120707110453-a547fc61f48d replace cloud.google.com/go => cloud.google.com/go v0.49.0 @@ -65,7 +70,9 @@ replace github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.3.1 replace github.com/imdario/mergo => github.com/imdario/mergo v0.3.5 -replace github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring => github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.0.0-20200911141619-675d303ee0b8 +replace github.com/prometheus-operator/prometheus-operator => github.com/prometheus-operator/prometheus-operator v0.42.0 + +replace github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring => github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.42.0 replace github.com/prometheus/client_golang => github.com/prometheus/client_golang v1.7.1 @@ -77,18 +84,20 @@ replace google.golang.org/genproto => google.golang.org/genproto v0.0.0-20191115 replace google.golang.org/grpc => google.golang.org/grpc v1.26.0 -replace k8s.io/api => github.com/kmodules/api v0.18.4-0.20200524125823-c8bc107809b9 +replace k8s.io/api => github.com/kmodules/api v0.18.10-0.20200922195318-d60fe725dea0 + +replace k8s.io/apimachinery => github.com/kmodules/apimachinery v0.19.0-alpha.0.0.20200922195535-0c9a1b86beec -replace k8s.io/apimachinery => github.com/kmodules/apimachinery v0.19.0-alpha.0.0.20200520235721-10b58e57a423 +replace k8s.io/apiserver => github.com/kmodules/apiserver v0.18.10-0.20200922195747-1bd1cc8f00d1 -replace k8s.io/apiserver => github.com/kmodules/apiserver v0.18.4-0.20200521000930-14c5f6df9625 +replace k8s.io/cli-runtime => k8s.io/cli-runtime v0.18.9 -replace k8s.io/cli-runtime => k8s.io/cli-runtime v0.18.3 +replace k8s.io/client-go => github.com/kmodules/k8s-client-go v0.18.10-0.20200922201634-73fedf3d677e -replace k8s.io/client-go => k8s.io/client-go v0.18.3 +replace k8s.io/component-base => k8s.io/component-base v0.18.9 -replace k8s.io/component-base => k8s.io/component-base v0.18.3 +replace k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6 -replace k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6 // release-1.18 +replace k8s.io/kubernetes => github.com/kmodules/kubernetes v1.19.0-alpha.0.0.20200922200158-8b13196d8dc4 -replace k8s.io/kubernetes => github.com/kmodules/kubernetes v1.19.0-alpha.0.0.20200521033432-49d3646051ad +replace k8s.io/utils => k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 diff --git a/go.sum b/go.sum index a8cd1a035..5948ec7d4 100644 --- a/go.sum +++ b/go.sum @@ -75,6 +75,8 @@ github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb github.com/appscode/docker-registry-client v0.0.0-20180426150142-1bb02bb202b0/go.mod h1:W9bsWfSbgJXUXzBZ+tSBV2g+zzT7ANPHQFsSXRHYKsA= github.com/appscode/go v0.0.0-20200323182826-54e98e09185a h1:cZ80NKoLRaW1PVCWXAJE+YFkBAmLZ8BnrJmH0ClY1Gs= github.com/appscode/go v0.0.0-20200323182826-54e98e09185a/go.mod h1:lIcm8Z6VPuvcw/a3EeOWcG6R3I13iHMLYbtVP7TKufY= +github.com/appscode/go v0.0.0-20200928211031-cc0c23082d91 h1:a5T6J190+3yXrGoq7qjng7EnseLj/IMoRhmV48+Y1iU= +github.com/appscode/go v0.0.0-20200928211031-cc0c23082d91/go.mod h1:oWiTjcudxE2UxyEDtsgJl3d84JD75S7j3UsrLKC7U68= github.com/appscode/osm v0.14.0/go.mod h1:3bxEjMJSVhSNBXVrdrCy8EwMudOWKK6UgHzAOdZY7LQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= @@ -209,6 +211,8 @@ github.com/euank/go-kmsg-parser v2.0.0+incompatible/go.mod h1:MhmAMZ8V4CYH4ybgdR github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= +github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb/go.mod h1:bH6Xx7IW64qjjJq8M2u4dxNaBiDfKK+z/3eGDpXEQhc= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= @@ -223,6 +227,7 @@ github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHqu github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/gabriel-vasile/mimetype v1.1.0/go.mod h1:6CDPel/o/3/s4+bp6kIbsWATq8pmgOisOPG40CJa6To= +github.com/gabriel-vasile/mimetype v1.1.1/go.mod h1:6CDPel/o/3/s4+bp6kIbsWATq8pmgOisOPG40CJa6To= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= @@ -286,6 +291,8 @@ github.com/go-openapi/spec v0.19.3 h1:0XRyw8kguri6Yw4SxhsQA/atC88yqrk0+G4YhI2wab github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/spec v0.19.7 h1:0xWSeMd35y5avQAThZR2PkEuqSosoS5t6gDH4L8n11M= github.com/go-openapi/spec v0.19.7/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.8 h1:qAdZLh1r6QF/hI/gTq+TJTvsQUodZsM7KLqkAJdiJNg= +github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.17.2/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= @@ -521,14 +528,16 @@ github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0 github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/kmodules/api v0.18.4-0.20200524125823-c8bc107809b9 h1:3WfoOV3g8udvdh1SgCjp93waE4njc5p8Yu6iPdcTPeY= -github.com/kmodules/api v0.18.4-0.20200524125823-c8bc107809b9/go.mod h1:UOaMwERbqJMfeeeHc8XJKawj4P9TgDRnViIqqBeH2QA= -github.com/kmodules/apimachinery v0.19.0-alpha.0.0.20200520235721-10b58e57a423 h1:eIx5nBpcokltYCsMIguagM4k2yi04irNqAFVPw4IdjE= -github.com/kmodules/apimachinery v0.19.0-alpha.0.0.20200520235721-10b58e57a423/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= -github.com/kmodules/apiserver v0.18.4-0.20200521000930-14c5f6df9625 h1:VgTz5R1ePhWVoGGBWsFv0+MkLvXwg6XwvaPMlG7QFKo= -github.com/kmodules/apiserver v0.18.4-0.20200521000930-14c5f6df9625/go.mod h1:tHQRmthRPLUtwqsOnJJMoI8SW3lnoReZeE861lH8vUw= -github.com/kmodules/kubernetes v1.19.0-alpha.0.0.20200521033432-49d3646051ad h1:6yy4Xy9GxZBydjyFLXq8PU9l5oIw1C7UUUU+1/U3tVc= -github.com/kmodules/kubernetes v1.19.0-alpha.0.0.20200521033432-49d3646051ad/go.mod h1:PsXn17+Pk0tAjQKbXNvSZZqJkqtoDDKye1co0JZV/EI= +github.com/kmodules/api v0.18.10-0.20200922195318-d60fe725dea0 h1:1Pf9Bq4ckUK551AUXB0O2fNmJlYv9ddVigcAtBBT90c= +github.com/kmodules/api v0.18.10-0.20200922195318-d60fe725dea0/go.mod h1:9u/h6sUh6FxfErv7QqetX1EB3yBMIYOBXzdcf0Gf0rc= +github.com/kmodules/apimachinery v0.19.0-alpha.0.0.20200922195535-0c9a1b86beec h1:sQp539eyQsIguskgE5obrCwT/IaPj98/J9IBgj/sBc4= +github.com/kmodules/apimachinery v0.19.0-alpha.0.0.20200922195535-0c9a1b86beec/go.mod h1:PF5taHbXgTEJLU+xMypMmYTXTWPJ5LaW8bfsisxnEXk= +github.com/kmodules/apiserver v0.18.10-0.20200922195747-1bd1cc8f00d1 h1:7EoPyLcCaVlTFNB/pJgUhAHvFuvemtn8fiLI77XMM08= +github.com/kmodules/apiserver v0.18.10-0.20200922195747-1bd1cc8f00d1/go.mod h1:vXQzMtUCLsGg1Bh+7Jo2mZKHpHZFCZn8eTNSepcIA1M= +github.com/kmodules/k8s-client-go v0.18.10-0.20200922201634-73fedf3d677e h1:y3n9GoRUtgt6ira3KVIr8iT6laR9y61/vuqdZKsGdUM= +github.com/kmodules/k8s-client-go v0.18.10-0.20200922201634-73fedf3d677e/go.mod h1:UjkEetDmr40P9NX0Ok3Idt08FCf2I4mIHgjFsot77uY= +github.com/kmodules/kubernetes v1.19.0-alpha.0.0.20200922200158-8b13196d8dc4 h1:+jJae6hdYdjIbb+q/2QcPsoakM3ADr03ATSFp/JcuuU= +github.com/kmodules/kubernetes v1.19.0-alpha.0.0.20200922200158-8b13196d8dc4/go.mod h1:lTc732ZplaxM3c4QXZez/NbDziB4/fgeywvu0z1RkrE= github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= @@ -1148,9 +1157,11 @@ gomodules.xyz/jsonpatch/v2 v2.0.1 h1:xyiBuvkD2g5n7cYzx6u2sxQvsAy4QJsZFCzGVdzOXZ0 gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= gomodules.xyz/jsonpatch/v2 v2.1.0 h1:Phva6wqu+xR//Njw6iorylFFgn/z547tw5Ne3HZPQ+k= gomodules.xyz/jsonpatch/v2 v2.1.0/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= +gomodules.xyz/password-generator v0.2.3/go.mod h1:TvwYYTx9+P1pPwKQKfZgB/wr2Id9MqAQ3B5auY7reNg= gomodules.xyz/sets v0.0.0-20200817084356-ae6e5e14ce3d h1:iikjtYw6tLPrD2dXkzDVMygYLaqzGRxQTDFZI23MXes= gomodules.xyz/sets v0.0.0-20200817084356-ae6e5e14ce3d/go.mod h1:jKgNp01/iDs+svOWXaPk5cKP3VXy0mWUoTF/ore+aMc= gomodules.xyz/stow v0.2.3/go.mod h1:S9/zV1kNAWAvqmdum0oByA4+aNdTdoK9hKb1bObf1BI= +gomodules.xyz/stow v0.2.4/go.mod h1:aAgUEHyZ+4nKznyVupMMkP0JX9MXW1ZRrbRGaclp3E0= gomodules.xyz/version v0.1.0 h1:inGItCg/egI0jPMeIE0SQkiDIJaodOMoCrxYqasQLR0= gomodules.xyz/version v0.1.0/go.mod h1:Y8xuV02mL/45psyPKG3NCVOwvAOy6T5Kx0l3rCjKSjU= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= @@ -1234,20 +1245,21 @@ k8s.io/apiextensions-apiserver v0.18.3 h1:h6oZO+iAgg0HjxmuNnguNdKNB9+wv3O1EBDdDW k8s.io/apiextensions-apiserver v0.18.3/go.mod h1:TMsNGs7DYpMXd+8MOCX8KzPOCx8fnZMoIGB24m03+JE= k8s.io/apiextensions-apiserver v0.18.5 h1:pvbXjB/BRXZiO+/Erp5Pxr+lnhDCv5uxNxHh3FLGZ/g= k8s.io/apiextensions-apiserver v0.18.5/go.mod h1:woZ7PkEIMHjhHIyApvOwkGOkBLUYKuet0VWVkPTQ/Fs= -k8s.io/cli-runtime v0.18.3/go.mod h1:pqbbi4nqRIQhUWAVzen8uE8DD/zcZLwf+8sQYO4lwLk= -k8s.io/client-go v0.18.3 h1:QaJzz92tsN67oorwzmoB0a9r9ZVHuD5ryjbCKP0U22k= -k8s.io/client-go v0.18.3/go.mod h1:4a/dpQEvzAhT1BbuWW09qvIaGw6Gbu1gZYiQZIi1DMw= -k8s.io/cloud-provider v0.18.3/go.mod h1:sZelqNhA+TI+FqV6smLvZ84/DQCNdrEUmdQLneZpfC4= -k8s.io/cluster-bootstrap v0.18.3/go.mod h1:iM3iptIPGNWCvFBvm67JJWaFdYb+7Gzle2bj125ZBy8= +k8s.io/apiextensions-apiserver v0.18.9 h1:tVEf8rVKh5BnXORnYYCztjbf6CSyGNMt/rAIEyfU00Q= +k8s.io/apiextensions-apiserver v0.18.9/go.mod h1:JagmAhU0TVENzgUZqHJsjCSDh7YuV5o6g01G1Fwh7zI= +k8s.io/cli-runtime v0.18.9/go.mod h1:Pw7UPmZd/wIlGd7DWGTUWA7qn92jCeybNeiS5WYJI6A= +k8s.io/cloud-provider v0.18.9/go.mod h1:kwlWAqQK2AzQtq8zhXYRgsgia8zJVqdoonzNOUhDE4c= +k8s.io/cluster-bootstrap v0.18.9/go.mod h1:1mBaMJ6iQnJ82oGu2FIhMjZHTSxYXVk6b/e/TYBOP+0= k8s.io/code-generator v0.0.0-20190912054826-cd179ad6a269/go.mod h1:V5BD6M4CyaN5m+VthcclXWsVcT1Hu+glwa1bi3MIsyE= k8s.io/code-generator v0.18.0/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= k8s.io/code-generator v0.18.2/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= k8s.io/code-generator v0.18.3/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= k8s.io/code-generator v0.18.5/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= -k8s.io/component-base v0.18.3 h1:QXq+P4lgi4LCIREya1RDr5gTcBaVFhxEcALir3QCSDA= -k8s.io/component-base v0.18.3/go.mod h1:bp5GzGR0aGkYEfTj+eTY0AN/vXTgkJdQXjNTTVUaa3k= -k8s.io/cri-api v0.18.3/go.mod h1:OJtpjDvfsKoLGhvcc0qfygved0S0dGX56IJzPbqTG1s= -k8s.io/csi-translation-lib v0.18.3/go.mod h1:4UtVGtxPzhtFdadhRCYBL084NvJLNMouCat3UcTbbu0= +k8s.io/code-generator v0.18.9/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= +k8s.io/component-base v0.18.9 h1:7G0D/PUKrVxyUxjT5HV4aTqYqhPj60erA1ab1JUw7m8= +k8s.io/component-base v0.18.9/go.mod h1:tUo4qZtV8m7t/U+0DgY+fcnn4BFZ480fZdzxOkWH4zk= +k8s.io/cri-api v0.18.9/go.mod h1:OJtpjDvfsKoLGhvcc0qfygved0S0dGX56IJzPbqTG1s= +k8s.io/csi-translation-lib v0.18.9/go.mod h1:ELfWvcnpMYGXEGMtAzMmF4LahWWB0ZRzWbg6DynSWWE= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= @@ -1264,27 +1276,24 @@ k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/kube-aggregator v0.18.3/go.mod h1:fux0WabUOggW2yAACL4jQGVd6kv7mSgBnJ3GgCXCris= k8s.io/kube-aggregator v0.18.5 h1:mGRE5L7cm2Uucp5LNxwEcf60apGotk/g0+awoZ0JnGg= k8s.io/kube-aggregator v0.18.5/go.mod h1:5M4HZr+fs3MSFYRL/UBoieXn7BjA5Bvs3yF8Nct6KkA= -k8s.io/kube-controller-manager v0.18.3/go.mod h1:gKpzON0DWgbn5oNAXrsBJAQR0ztw9GQQ7mBBGVYM7Xk= +k8s.io/kube-aggregator v0.18.9 h1:kqwbA15uygYfLfdMUlyBm/q3OHaYbnirFrg7tGUTVZk= +k8s.io/kube-aggregator v0.18.9/go.mod h1:ik5Mf6JaP2M9XbWZR/AYgXx2Nj4EDBrHyakUx7C8cdw= +k8s.io/kube-controller-manager v0.18.9/go.mod h1:ZNrKY2V/vDYVLAqbSjcsgUVNC24JktaaQaeeGmC17Zc= k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6 h1:Oh3Mzx5pJ+yIumsAD0MOECPVeXsVot0UkiaCGVyfGQY= k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= -k8s.io/kube-proxy v0.18.3/go.mod h1:Uyqd3mVXhJeNzTmZYW/6N00Bu3kVJ6jzLQQ/T7f8jY0= -k8s.io/kube-scheduler v0.18.3/go.mod h1:55V1fgqzVXEDJB/zkBYjVceixZFQVOVWZwfLrnXt3yA= -k8s.io/kubectl v0.18.3/go.mod h1:k/EpvXBDgEsHBzWr0A44l9+ArvYi3txBBnzXBjQasUQ= +k8s.io/kube-proxy v0.18.9/go.mod h1:vWzFu3b1E55OQ2659d4ugfDlxJKIj69InFUkWGZTKS4= +k8s.io/kube-scheduler v0.18.9/go.mod h1:rQ0iAmJpEv+7CWPhkqY+Rz0Mhm23hsyQ5bh5EeRX+z8= k8s.io/kubectl v0.18.5/go.mod h1:LAGxvYunNuwcZst0OAMXnInFIv81/IeoAz2N1Yh+AhU= -k8s.io/kubelet v0.18.3/go.mod h1:KXTAte7pUtoMyIlysam9g6HIY8C+D5Djd4fZvGXqLtg= -k8s.io/legacy-cloud-providers v0.18.3/go.mod h1:ZsvkD18BRzT2PUxvlX4ueqDA2+eM35d0N0GZC4Jynl8= -k8s.io/metrics v0.18.3/go.mod h1:TkuJE3ezDZ1ym8pYkZoEzJB7HDiFE7qxl+EmExEBoPA= +k8s.io/kubectl v0.18.9/go.mod h1:wJBoebwhAhI6LkvLefo8k2vEUCjJwcPz19seNepOLkU= +k8s.io/kubelet v0.18.9/go.mod h1:mqLCPAOmh1raK9Z+qapi6yZ0VSfPne/qRuEqqg3E9DE= +k8s.io/legacy-cloud-providers v0.18.9/go.mod h1:8ubkki2oC6Kto8euDjXf8xWszW1ehH5Bpwt+QxBBI8Q= k8s.io/metrics v0.18.5/go.mod h1:pqn6YiCCxUt067ivZVo4KtvppvdykV6HHG5+7ygVkNg= +k8s.io/metrics v0.18.9/go.mod h1:zFnHxkmOAc4EywyiWFCSwMPmtvvMStlvWFZTL9BqGWU= k8s.io/repo-infra v0.0.1-alpha.1/go.mod h1:wO1t9WaB99V80ljbeENTnayuEEwNZt7gECYh/CEyOJ8= -k8s.io/sample-apiserver v0.18.3/go.mod h1:Un04reJ2OCi73A/ZKrZkMtumJznUl98AM18pfu8bM0g= +k8s.io/sample-apiserver v0.18.9/go.mod h1:BqskggZvQv6thkecZe2iAoPeNTN7WRu6e5bfDzOjc0A= k8s.io/system-validators v1.0.4/go.mod h1:HgSgTg4NAGNoYYjKsUyk52gdNi2PVDswQ9Iyn66R7NI= -k8s.io/utils v0.0.0-20190801114015-581e00157fb1 h1:+ySTxfHnfzZb9ys375PXNlLhkJPLKgHajBU0N62BDvE= -k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20191114200735-6ca3b61696b6/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 h1:d4vVOjXm687F1iLSP2q3lyPPuyvTUt3aVoBpi2DqRsU= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20200414100711-2df71ebbae66 h1:Ly1Oxdu5p5ZFmiVT71LFgeZETvMfZ1iBIGeOenT2JeM= -k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= kmodules.xyz/client-go v0.0.0-20200521005126-35ce6bd4ed46/go.mod h1:sY/eoe4ktxZEoHpr5NpAQ5s22VSwTE8psJtKVeVgLRY= kmodules.xyz/client-go v0.0.0-20200521065424-173e32c78a20/go.mod h1:sY/eoe4ktxZEoHpr5NpAQ5s22VSwTE8psJtKVeVgLRY= kmodules.xyz/client-go v0.0.0-20200522120609-c6430d66212f/go.mod h1:sY/eoe4ktxZEoHpr5NpAQ5s22VSwTE8psJtKVeVgLRY= @@ -1297,19 +1306,32 @@ kmodules.xyz/client-go v0.0.0-20200818171030-24b2ce405feb/go.mod h1:sY/eoe4ktxZE kmodules.xyz/client-go v0.0.0-20200903033732-dab39b86c81b/go.mod h1:sY/eoe4ktxZEoHpr5NpAQ5s22VSwTE8psJtKVeVgLRY= kmodules.xyz/client-go v0.0.0-20200915091229-7df16c29f4e8 h1:C6+M9aTLhPCmsJ8dmhPvkr7Qe2MN+iiY3kZvbonhS9E= kmodules.xyz/client-go v0.0.0-20200915091229-7df16c29f4e8/go.mod h1:sY/eoe4ktxZEoHpr5NpAQ5s22VSwTE8psJtKVeVgLRY= +kmodules.xyz/client-go v0.0.0-20200922200830-63d86b6e5b63/go.mod h1:JZN34jqk6ZlR+QOnBPpnUVBab4rmfamqxfSvLaulBMY= +kmodules.xyz/client-go v0.0.0-20200929030759-cce6a3c623c1 h1:wig8NVgxE5ynY6dsGduWpkF8utYHU1RjepncNbaStNw= +kmodules.xyz/client-go v0.0.0-20200929030759-cce6a3c623c1/go.mod h1:pnRh7gtJ6ErPJQBkQeRlpD95KRtxhD4eGrYagZEU8RM= kmodules.xyz/constants v0.0.0-20200506032633-a21e58ceec72/go.mod h1:DbiFk1bJ1KEO94t1SlAn7tzc+Zz95rSXgyUKa2nzPmY= kmodules.xyz/crd-schema-fuzz v0.0.0-20200521005638-2433a187de95 h1:v0S/+ftzL6Xrs9XevgchAOJyPKlRQXPiZf87xotj3X4= kmodules.xyz/crd-schema-fuzz v0.0.0-20200521005638-2433a187de95/go.mod h1:jpu8xFsDKd6kAWUAKk8oTu/GQGBWqhrcaDeOJdaCJnk= +kmodules.xyz/crd-schema-fuzz v0.0.0-20200922204806-c1426cd7fcf4 h1:NWWv+Qju8xzHZT9hIk1+BbgQtIytNOoCU4g4vqUmh3M= +kmodules.xyz/crd-schema-fuzz v0.0.0-20200922204806-c1426cd7fcf4/go.mod h1:WrO3fryNyFCgqqyWnwI89lnzWA7kN072Ehya7ELGfzE= kmodules.xyz/custom-resources v0.0.0-20200604135349-9e9f5c4fdba9 h1:W+k1qhU0W1rptia2PWPOb7IWUvWnf31EMnatXt7MW6w= kmodules.xyz/custom-resources v0.0.0-20200604135349-9e9f5c4fdba9/go.mod h1:bu1V7HdnuHc1hgvbqAdcwTViQ0TfZwF3Nu/SjB4vai4= +kmodules.xyz/custom-resources v0.0.0-20200922210108-70f2815a43bb h1:SwMPMh6A196yoe8kAH+guTNS8rsTfB2dRbFNh6g0Znk= +kmodules.xyz/custom-resources v0.0.0-20200922210108-70f2815a43bb/go.mod h1:+YU32jSWaGGE4etTr/iCF88tLAeDNq1lhptVymjUbjg= kmodules.xyz/monitoring-agent-api v0.0.0-20200828051750-42aa8e7852f3/go.mod h1:ybC7USLPa1dCpNeiJBuoJ5TMucpFUklnj+Dhq/sSky0= kmodules.xyz/objectstore-api v0.0.0-20200521103120-92080446e04d h1:ud3XDScnBdD5q6nLQI/tHLSbuuSwIFaav6IhcQAz2qA= kmodules.xyz/objectstore-api v0.0.0-20200521103120-92080446e04d/go.mod h1:k6sbzLWYBLRGDNmCj/NwLgj1cniRXCl9ux/P6+7Xd+A= +kmodules.xyz/objectstore-api v0.0.0-20200922210707-59bab27e5d41 h1:BsCSSPoY0uRGylfPTUzzQ28h2axuXremPGPzwpmxvYI= +kmodules.xyz/objectstore-api v0.0.0-20200922210707-59bab27e5d41/go.mod h1:XAWxC/b1ICoufU6XDV0AOHNQY+y+4/B3Z5uyLnW1B6s= kmodules.xyz/offshoot-api v0.0.0-20200521035628-e135bf07b226 h1:RZ7H0gl1z/9jLI74YOlGEtNeAknxTEKeAeYH0jakUcM= kmodules.xyz/offshoot-api v0.0.0-20200521035628-e135bf07b226/go.mod h1:IbK+hCI23UfTDMzG7hos9sERCase2xsFK+XC0Ns3OCg= +kmodules.xyz/offshoot-api v0.0.0-20200922211229-36acc531abab h1:d/4AFAN0TfKgwhjbQYzwXXHT/5/vTP7SAAvS4uJX+wQ= +kmodules.xyz/offshoot-api v0.0.0-20200922211229-36acc531abab/go.mod h1:Wy3/mWK2lWQOviKVpBtiCEYtLaYIaSiym8leZNKBUd4= kmodules.xyz/openshift v0.0.0-20200522123204-ce4abf5433c8/go.mod h1:nVhGcoB3Bi7Ots5+g972Ap/vtyIrrtoK3Z3aulNux7w= kmodules.xyz/prober v0.0.0-20200521101241-adf06150535c h1:aV6O9NbDpnFVra/D8c7b7TjI05w/CyI5CYJ8IBg6lg8= kmodules.xyz/prober v0.0.0-20200521101241-adf06150535c/go.mod h1:XYWZkfQquD09Mn+O7piHS+SEPq9oFV1Wy2WZ9DA+oeA= +kmodules.xyz/prober v0.0.0-20200922212142-743a6514664e h1:NASVP0dOE5Zdlq+3Op7Fh2Yc8ei32uf9PxEbuwGLQm0= +kmodules.xyz/prober v0.0.0-20200922212142-743a6514664e/go.mod h1:AZ58K5hrxkkNPf8tM+UWeZjtNG3/mn192nKcUyC93F8= kmodules.xyz/webhook-runtime v0.0.0-20200522123600-ca70a7e28ed0/go.mod h1:9hUftUcjvzDSiO5LIbe2U8Naz4tyS9Ndf1LRzsytMzs= kubedb.dev/apimachinery v0.14.0-beta.2 h1:Ws+DYzQmESOP7mwaaeXcDjWae9joiG/Xi8yYoSBnLD0= kubedb.dev/apimachinery v0.14.0-beta.2/go.mod h1:WQ/oXfTfXNRfz6JvRBIoHwi3Dg4eumKnXu5WXquGF0Y= diff --git a/vendor/github.com/evanphx/json-patch/.travis.yml b/vendor/github.com/evanphx/json-patch/.travis.yml index 2092c72c4..50e4afd19 100644 --- a/vendor/github.com/evanphx/json-patch/.travis.yml +++ b/vendor/github.com/evanphx/json-patch/.travis.yml @@ -1,8 +1,8 @@ language: go go: - - 1.8 - - 1.7 + - 1.14 + - 1.13 install: - if ! go get code.google.com/p/go.tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi @@ -11,6 +11,9 @@ install: script: - go get - go test -cover ./... + - cd ./v5 + - go get + - go test -cover ./... notifications: email: false diff --git a/vendor/github.com/evanphx/json-patch/LICENSE b/vendor/github.com/evanphx/json-patch/LICENSE index 0eb9b72d8..df76d7d77 100644 --- a/vendor/github.com/evanphx/json-patch/LICENSE +++ b/vendor/github.com/evanphx/json-patch/LICENSE @@ -6,7 +6,7 @@ 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 +* 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 Evan Phoenix nor the names of its contributors diff --git a/vendor/github.com/evanphx/json-patch/README.md b/vendor/github.com/evanphx/json-patch/README.md index 9c7f87f7c..121b039db 100644 --- a/vendor/github.com/evanphx/json-patch/README.md +++ b/vendor/github.com/evanphx/json-patch/README.md @@ -1,5 +1,5 @@ # JSON-Patch -`jsonpatch` is a library which provides functionallity for both applying +`jsonpatch` is a library which provides functionality for both applying [RFC6902 JSON patches](http://tools.ietf.org/html/rfc6902) against documents, as well as for calculating & applying [RFC7396 JSON merge patches](https://tools.ietf.org/html/rfc7396). @@ -11,10 +11,11 @@ well as for calculating & applying [RFC7396 JSON merge patches](https://tools.ie **Latest and greatest**: ```bash -go get -u github.com/evanphx/json-patch +go get -u github.com/evanphx/json-patch/v5 ``` **Stable Versions**: +* Version 5: `go get -u gopkg.in/evanphx/json-patch.v5` * Version 4: `go get -u gopkg.in/evanphx/json-patch.v4` (previous versions below `v3` are unavailable) @@ -82,7 +83,7 @@ When ran, you get the following output: ```bash $ go run main.go patch document: {"height":null,"name":"Jane"} -updated tina doc: {"age":28,"name":"Jane"} +updated alternative doc: {"age":28,"name":"Jane"} ``` ## Create and apply a JSON Patch @@ -164,7 +165,7 @@ func main() { } if !jsonpatch.Equal(original, different) { - fmt.Println(`"original" is _not_ structurally equal to "similar"`) + fmt.Println(`"original" is _not_ structurally equal to "different"`) } } ``` @@ -173,7 +174,7 @@ When ran, you get the following output: ```bash $ go run main.go "original" is structurally equal to "similar" -"original" is _not_ structurally equal to "similar" +"original" is _not_ structurally equal to "different" ``` ## Combine merge patches diff --git a/vendor/github.com/evanphx/json-patch/merge.go b/vendor/github.com/evanphx/json-patch/merge.go index 6806c4c20..14e8bb5ce 100644 --- a/vendor/github.com/evanphx/json-patch/merge.go +++ b/vendor/github.com/evanphx/json-patch/merge.go @@ -307,13 +307,16 @@ func matchesValue(av, bv interface{}) bool { return true case map[string]interface{}: bt := bv.(map[string]interface{}) - for key := range at { - if !matchesValue(at[key], bt[key]) { - return false - } + if len(bt) != len(at) { + return false } for key := range bt { - if !matchesValue(at[key], bt[key]) { + av, aOK := at[key] + bv, bOK := bt[key] + if aOK != bOK { + return false + } + if !matchesValue(av, bv) { return false } } diff --git a/vendor/github.com/evanphx/json-patch/patch.go b/vendor/github.com/evanphx/json-patch/patch.go index 1b5f95e61..f185a45b2 100644 --- a/vendor/github.com/evanphx/json-patch/patch.go +++ b/vendor/github.com/evanphx/json-patch/patch.go @@ -202,6 +202,10 @@ func (n *lazyNode) equal(o *lazyNode) bool { return false } + if len(n.doc) != len(o.doc) { + return false + } + for k, v := range n.doc { ov, ok := o.doc[k] @@ -209,6 +213,10 @@ func (n *lazyNode) equal(o *lazyNode) bool { return false } + if (v == nil) != (ov == nil) { + return false + } + if v == nil && ov == nil { continue } @@ -429,14 +437,14 @@ func (d *partialArray) add(key string, val *lazyNode) error { return errors.Wrapf(ErrInvalidIndex, "Unable to access invalid index: %d", idx) } - if SupportNegativeIndices { - if idx < -len(ary) { + if idx < 0 { + if !SupportNegativeIndices { return errors.Wrapf(ErrInvalidIndex, "Unable to access invalid index: %d", idx) } - - if idx < 0 { - idx += len(ary) + if idx < -len(ary) { + return errors.Wrapf(ErrInvalidIndex, "Unable to access invalid index: %d", idx) } + idx += len(ary) } copy(ary[0:idx], cur[0:idx]) @@ -473,14 +481,14 @@ func (d *partialArray) remove(key string) error { return errors.Wrapf(ErrInvalidIndex, "Unable to access invalid index: %d", idx) } - if SupportNegativeIndices { - if idx < -len(cur) { + if idx < 0 { + if !SupportNegativeIndices { return errors.Wrapf(ErrInvalidIndex, "Unable to access invalid index: %d", idx) } - - if idx < 0 { - idx += len(cur) + if idx < -len(cur) { + return errors.Wrapf(ErrInvalidIndex, "Unable to access invalid index: %d", idx) } + idx += len(cur) } ary := make([]*lazyNode, len(cur)-1) diff --git a/vendor/github.com/go-logr/logr/LICENSE b/vendor/github.com/go-logr/logr/LICENSE deleted file mode 100644 index 8dada3eda..000000000 --- a/vendor/github.com/go-logr/logr/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - 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. diff --git a/vendor/github.com/go-logr/logr/README.md b/vendor/github.com/go-logr/logr/README.md deleted file mode 100644 index 26296d024..000000000 --- a/vendor/github.com/go-logr/logr/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# A more minimal logging API for Go - -Before you consider this package, please read [this blog post by the inimitable -Dave Cheney](http://dave.cheney.net/2015/11/05/lets-talk-about-logging). I -really appreciate what he has to say, and it largely aligns with my own -experiences. Too many choices of levels means inconsistent logs. - -This package offers a purely abstract interface, based on these ideas but with -a few twists. Code can depend on just this interface and have the actual -logging implementation be injected from callers. Ideally only `main()` knows -what logging implementation is being used. - -# Differences from Dave's ideas - -The main differences are: - -1) Dave basically proposes doing away with the notion of a logging API in favor -of `fmt.Printf()`. I disagree, especially when you consider things like output -locations, timestamps, file and line decorations, and structured logging. I -restrict the API to just 2 types of logs: info and error. - -Info logs are things you want to tell the user which are not errors. Error -logs are, well, errors. If your code receives an `error` from a subordinate -function call and is logging that `error` *and not returning it*, use error -logs. - -2) Verbosity-levels on info logs. This gives developers a chance to indicate -arbitrary grades of importance for info logs, without assigning names with -semantic meaning such as "warning", "trace", and "debug". Superficially this -may feel very similar, but the primary difference is the lack of semantics. -Because verbosity is a numerical value, it's safe to assume that an app running -with higher verbosity means more (and less important) logs will be generated. - -This is a BETA grade API. I have implemented it for -[glog](https://godoc.org/github.com/golang/glog). Until there is a significant -2nd implementation, I don't really know how it will change. diff --git a/vendor/github.com/go-logr/logr/logr.go b/vendor/github.com/go-logr/logr/logr.go deleted file mode 100644 index ad72e7886..000000000 --- a/vendor/github.com/go-logr/logr/logr.go +++ /dev/null @@ -1,151 +0,0 @@ -// Package logr defines abstract interfaces for logging. Packages can depend on -// these interfaces and callers can implement logging in whatever way is -// appropriate. -// -// This design derives from Dave Cheney's blog: -// http://dave.cheney.net/2015/11/05/lets-talk-about-logging -// -// This is a BETA grade API. Until there is a significant 2nd implementation, -// I don't really know how it will change. -// -// The logging specifically makes it non-trivial to use format strings, to encourage -// attaching structured information instead of unstructured format strings. -// -// Usage -// -// Logging is done using a Logger. Loggers can have name prefixes and named values -// attached, so that all log messages logged with that Logger have some base context -// associated. -// -// The term "key" is used to refer to the name associated with a particular value, to -// disambiguate it from the general Logger name. -// -// For instance, suppose we're trying to reconcile the state of an object, and we want -// to log that we've made some decision. -// -// With the traditional log package, we might write -// log.Printf( -// "decided to set field foo to value %q for object %s/%s", -// targetValue, object.Namespace, object.Name) -// -// With logr's structured logging, we'd write -// // elsewhere in the file, set up the logger to log with the prefix of "reconcilers", -// // and the named value target-type=Foo, for extra context. -// log := mainLogger.WithName("reconcilers").WithValues("target-type", "Foo") -// -// // later on... -// log.Info("setting field foo on object", "value", targetValue, "object", object) -// -// Depending on our logging implementation, we could then make logging decisions based on field values -// (like only logging such events for objects in a certain namespace), or copy the structured -// information into a structured log store. -// -// For logging errors, Logger has a method called Error. Suppose we wanted to log an -// error while reconciling. With the traditional log package, we might write -// log.Errorf("unable to reconcile object %s/%s: %v", object.Namespace, object.Name, err) -// -// With logr, we'd instead write -// // assuming the above setup for log -// log.Error(err, "unable to reconcile object", "object", object) -// -// This functions similarly to: -// log.Info("unable to reconcile object", "error", err, "object", object) -// -// However, it ensures that a standard key for the error value ("error") is used across all -// error logging. Furthermore, certain implementations may choose to attach additional -// information (such as stack traces) on calls to Error, so it's preferred to use Error -// to log errors. -// -// Parts of a log line -// -// Each log message from a Logger has four types of context: -// logger name, log verbosity, log message, and the named values. -// -// The Logger name constists of a series of name "segments" added by successive calls to WithName. -// These name segments will be joined in some way by the underlying implementation. It is strongly -// reccomended that name segements contain simple identifiers (letters, digits, and hyphen), and do -// not contain characters that could muddle the log output or confuse the joining operation (e.g. -// whitespace, commas, periods, slashes, brackets, quotes, etc). -// -// Log verbosity represents how little a log matters. Level zero, the default, matters most. -// Increasing levels matter less and less. Try to avoid lots of different verbosity levels, -// and instead provide useful keys, logger names, and log messages for users to filter on. -// It's illegal to pass a log level below zero. -// -// The log message consists of a constant message attached to the the log line. This -// should generally be a simple description of what's occuring, and should never be a format string. -// -// Variable information can then be attached using named values (key/value pairs). Keys are arbitrary -// strings, while values may be any Go value. -// -// Key Naming Conventions -// -// While users are generally free to use key names of their choice, it's generally best to avoid -// using the following keys, as they're frequently used by implementations: -// -// - `"error"`: the underlying error value in the `Error` method. -// - `"stacktrace"`: the stack trace associated with a particular log line or error -// (often from the `Error` message). -// - `"caller"`: the calling information (file/line) of a particular log line. -// - `"msg"`: the log message. -// - `"level"`: the log level. -// - `"ts"`: the timestamp for a log line. -// -// Implementations are encouraged to make use of these keys to represent the above -// concepts, when neccessary (for example, in a pure-JSON output form, it would be -// necessary to represent at least message and timestamp as ordinary named values). -package logr - -// TODO: consider adding back in format strings if they're really needed -// TODO: consider other bits of zap/zapcore functionality like ObjectMarshaller (for arbitrary objects) -// TODO: consider other bits of glog functionality like Flush, InfoDepth, OutputStats - -// InfoLogger represents the ability to log non-error messages, at a particular verbosity. -type InfoLogger interface { - // Info logs a non-error message with the given key/value pairs as context. - // - // The msg argument should be used to add some constant description to - // the log line. The key/value pairs can then be used to add additional - // variable information. The key/value pairs should alternate string - // keys and arbitrary values. - Info(msg string, keysAndValues ...interface{}) - - // Enabled tests whether this InfoLogger is enabled. For example, - // commandline flags might be used to set the logging verbosity and disable - // some info logs. - Enabled() bool -} - -// Logger represents the ability to log messages, both errors and not. -type Logger interface { - // All Loggers implement InfoLogger. Calling InfoLogger methods directly on - // a Logger value is equivalent to calling them on a V(0) InfoLogger. For - // example, logger.Info() produces the same result as logger.V(0).Info. - InfoLogger - - // Error logs an error, with the given message and key/value pairs as context. - // It functions similarly to calling Info with the "error" named value, but may - // have unique behavior, and should be preferred for logging errors (see the - // package documentations for more information). - // - // The msg field should be used to add context to any underlying error, - // while the err field should be used to attach the actual error that - // triggered this log line, if present. - Error(err error, msg string, keysAndValues ...interface{}) - - // V returns an InfoLogger value for a specific verbosity level. A higher - // verbosity level means a log message is less important. It's illegal to - // pass a log level less than zero. - V(level int) InfoLogger - - // WithValues adds some key-value pairs of context to a logger. - // See Info for documentation on how key/value pairs work. - WithValues(keysAndValues ...interface{}) Logger - - // WithName adds a new element to the logger's name. - // Successive calls with WithName continue to append - // suffixes to the logger's name. It's strongly reccomended - // that name segments contain only letters, digits, and hyphens - // (see the package documentation for more information). - WithName(name string) Logger -} diff --git a/vendor/github.com/go-openapi/spec/expander.go b/vendor/github.com/go-openapi/spec/expander.go index 043720d7d..1f30e7f8b 100644 --- a/vendor/github.com/go-openapi/spec/expander.go +++ b/vendor/github.com/go-openapi/spec/expander.go @@ -200,11 +200,11 @@ func ExpandSpec(spec *Swagger, options *ExpandOptions) error { return nil } +const rootBase = "root" // baseForRoot loads in the cache the root document and produces a fake "root" base path entry // for further $ref resolution func baseForRoot(root interface{}, cache ResolutionCache) string { // cache the root document to resolve $ref's - const rootBase = "root" if root != nil { base, _ := absPath(rootBase) normalizedBase := normalizeAbsPath(base) diff --git a/vendor/github.com/go-openapi/spec/schema_loader.go b/vendor/github.com/go-openapi/spec/schema_loader.go index 961d47757..02d9966c1 100644 --- a/vendor/github.com/go-openapi/spec/schema_loader.go +++ b/vendor/github.com/go-openapi/spec/schema_loader.go @@ -149,7 +149,15 @@ func (r *schemaLoader) load(refURL *url.URL) (interface{}, url.URL, bool, error) toFetch := *refURL toFetch.Fragment = "" - normalized := normalizeAbsPath(toFetch.String()) + var err error + path := toFetch.String() + if path == rootBase { + path, err = absPath(rootBase) + if err != nil { + return nil, url.URL{}, false, err + } + } + normalized := normalizeAbsPath(path) data, fromCache := r.cache.Get(normalized) if !fromCache { diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go index bf125b62a..e7aaead8c 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go @@ -873,6 +873,9 @@ const ( // FieldManagerConflict is used to report when another client claims to manage this field, // It should only be returned for a request using server-side apply. CauseTypeFieldManagerConflict CauseType = "FieldManagerConflict" + // CauseTypeResourceVersionTooLarge is used to report that the requested resource version + // is newer than the data observed by the API server, so the request cannot be served. + CauseTypeResourceVersionTooLarge CauseType = "ResourceVersionTooLarge" ) // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go index 2743793dd..fcd491f4c 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go @@ -178,7 +178,7 @@ func ValidateManagedFields(fieldsList []metav1.ManagedFieldsEntry, fldPath *fiel default: allErrs = append(allErrs, field.Invalid(fldPath.Child("operation"), fields.Operation, "must be `Apply` or `Update`")) } - if fields.FieldsType != "FieldsV1" { + if len(fields.FieldsType) > 0 && fields.FieldsType != "FieldsV1" { allErrs = append(allErrs, field.Invalid(fldPath.Child("fieldsType"), fields.FieldsType, "must be `FieldsV1`")) } } diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/http.go b/vendor/k8s.io/apimachinery/pkg/util/net/http.go index 7449cbb0a..7b64e6815 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/net/http.go +++ b/vendor/k8s.io/apimachinery/pkg/util/net/http.go @@ -446,7 +446,7 @@ redirectLoop: // Only follow redirects to the same host. Otherwise, propagate the redirect response back. if requireSameHostRedirects && location.Hostname() != originalLocation.Hostname() { - break redirectLoop + return nil, nil, fmt.Errorf("hostname mismatch: expected %s, found %s", originalLocation.Hostname(), location.Hostname()) } // Reset the connection. diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/filters/impersonation.go b/vendor/k8s.io/apiserver/pkg/endpoints/filters/impersonation.go index a18b51ba0..fcfcc3007 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/filters/impersonation.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/filters/impersonation.go @@ -117,10 +117,37 @@ func WithImpersonation(handler http.Handler, a authorizer.Authorizer, s runtime. } } - if !groupsSpecified && username != user.Anonymous { - // When impersonating a non-anonymous user, if no groups were specified - // include the system:authenticated group in the impersonated user info - groups = append(groups, user.AllAuthenticated) + if username != user.Anonymous { + // When impersonating a non-anonymous user, include the 'system:authenticated' group + // in the impersonated user info: + // - if no groups were specified + // - if a group has been specified other than 'system:authenticated' + // + // If 'system:unauthenticated' group has been specified we should not include + // the 'system:authenticated' group. + addAuthenticated := true + for _, group := range groups { + if group == user.AllAuthenticated || group == user.AllUnauthenticated { + addAuthenticated = false + break + } + } + + if addAuthenticated { + groups = append(groups, user.AllAuthenticated) + } + } else { + addUnauthenticated := true + for _, group := range groups { + if group == user.AllUnauthenticated { + addUnauthenticated = false + break + } + } + + if addUnauthenticated { + groups = append(groups, user.AllUnauthenticated) + } } newUser := &user.DefaultInfo{ diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/create.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/create.go index f97cbaa2c..653c1ff82 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/create.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/create.go @@ -156,10 +156,7 @@ func createHandler(r rest.NamedCreater, scope *RequestScope, admit admission.Int if err != nil { return nil, fmt.Errorf("failed to create new object (Create for %v): %v", scope.Kind, err) } - obj, err = scope.FieldManager.Update(liveObj, obj, managerOrUserAgent(options.FieldManager, req.UserAgent())) - if err != nil { - return nil, fmt.Errorf("failed to update object (Create for %v) managed fields: %v", scope.Kind, err) - } + obj = scope.FieldManager.UpdateNoErrors(liveObj, obj, managerOrUserAgent(options.FieldManager, req.UserAgent())) } if mutatingAdmission, ok := admit.(admission.MutationInterface); ok && mutatingAdmission.Handles(admission.Create) { if err := mutatingAdmission.Admit(ctx, admissionAttributes, scope); err != nil { diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/fieldmanager.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/fieldmanager.go index bd47efe22..69d8920aa 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/fieldmanager.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/fieldmanager.go @@ -18,12 +18,15 @@ package fieldmanager import ( "fmt" + "reflect" + "time" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal" + "k8s.io/klog" openapiproto "k8s.io/kube-openapi/pkg/util/proto" "sigs.k8s.io/structured-merge-diff/v3/fieldpath" ) @@ -37,6 +40,8 @@ const DefaultMaxUpdateManagers int = 10 // starts being tracked from the object's creation, instead of from the first time the object is applied to. const DefaultTrackOnCreateProbability float32 = 1 +var atMostEverySecond = internal.NewAtMostEvery(time.Second) + // Managed groups a fieldpath.ManagedFields together with the timestamps associated with each operation. type Managed interface { // Fields gets the fieldpath.ManagedFields. @@ -107,20 +112,26 @@ func newDefaultFieldManager(f Manager, objectCreater runtime.ObjectCreater, kind func (f *FieldManager) Update(liveObj, newObj runtime.Object, manager string) (object runtime.Object, err error) { // If the object doesn't have metadata, we should just return without trying to // set the managedFields at all, so creates/updates/patches will work normally. - if _, err = meta.Accessor(newObj); err != nil { + newAccessor, err := meta.Accessor(newObj) + if err != nil { return newObj, nil } // First try to decode the managed fields provided in the update, // This is necessary to allow directly updating managed fields. var managed Managed - if managed, err = internal.DecodeObjectManagedFields(newObj); err != nil || len(managed.Fields()) == 0 { + if isResetManagedFields(newAccessor.GetManagedFields()) { + managed = internal.NewEmptyManaged() + } else if managed, err = internal.DecodeObjectManagedFields(newAccessor.GetManagedFields()); err != nil || len(managed.Fields()) == 0 { + liveAccessor, err := meta.Accessor(liveObj) + if err != nil { + return newObj, nil + } // If the managed field is empty or we failed to decode it, // let's try the live object. This is to prevent clients who // don't understand managedFields from deleting it accidentally. - managed, err = internal.DecodeObjectManagedFields(liveObj) - if err != nil { - return nil, fmt.Errorf("failed to decode managed fields: %v", err) + if managed, err = internal.DecodeObjectManagedFields(liveAccessor.GetManagedFields()); err != nil { + managed = internal.NewEmptyManaged() } } @@ -138,17 +149,52 @@ func (f *FieldManager) Update(liveObj, newObj runtime.Object, manager string) (o return object, nil } +// UpdateNoErrors is the same as Update, but it will not return +// errors. If an error happens, the object is returned with +// managedFields cleared. +func (f *FieldManager) UpdateNoErrors(liveObj, newObj runtime.Object, manager string) runtime.Object { + obj, err := f.Update(liveObj, newObj, manager) + if err != nil { + atMostEverySecond.Do(func() { + klog.Errorf("[SHOULD NOT HAPPEN] failed to update managedFields for %v: %v", + newObj.GetObjectKind().GroupVersionKind(), + err) + }) + // Explicitly remove managedFields on failure, so that + // we can't have garbage in it. + internal.RemoveObjectManagedFields(newObj) + return newObj + } + return obj +} + +// Returns true if the managedFields indicate that the user is trying to +// reset the managedFields, i.e. if the list is non-nil but empty, or if +// the list has one empty item. +func isResetManagedFields(managedFields []metav1.ManagedFieldsEntry) bool { + if len(managedFields) == 0 { + return managedFields != nil + } + + if len(managedFields) == 1 { + return reflect.DeepEqual(managedFields[0], metav1.ManagedFieldsEntry{}) + } + + return false +} + // Apply is used when server-side apply is called, as it merges the // object and updates the managed fields. func (f *FieldManager) Apply(liveObj, appliedObj runtime.Object, manager string, force bool) (object runtime.Object, err error) { // If the object doesn't have metadata, apply isn't allowed. - if _, err = meta.Accessor(liveObj); err != nil { + accessor, err := meta.Accessor(liveObj) + if err != nil { return nil, fmt.Errorf("couldn't get accessor: %v", err) } // Decode the managed fields in the live object, since it isn't allowed in the patch. - var managed Managed - if managed, err = internal.DecodeObjectManagedFields(liveObj); err != nil { + managed, err := internal.DecodeObjectManagedFields(accessor.GetManagedFields()) + if err != nil { return nil, fmt.Errorf("failed to decode managed fields: %v", err) } diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/managedfields.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/managedfields.go index 4778fa792..c5434b101 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/managedfields.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/managedfields.go @@ -53,6 +53,11 @@ func (m *managedStruct) Times() map[string]*metav1.Time { return m.times } +// NewEmptyManaged creates an empty ManagedInterface. +func NewEmptyManaged() ManagedInterface { + return NewManaged(fieldpath.ManagedFields{}, map[string]*metav1.Time{}) +} + // NewManaged creates a ManagedInterface from a fieldpath.ManagedFields and the timestamps associated with each operation. func NewManaged(f fieldpath.ManagedFields, t map[string]*metav1.Time) ManagedInterface { return &managedStruct{ @@ -73,16 +78,8 @@ func RemoveObjectManagedFields(obj runtime.Object) { } // DecodeObjectManagedFields extracts and converts the objects ManagedFields into a fieldpath.ManagedFields. -func DecodeObjectManagedFields(from runtime.Object) (ManagedInterface, error) { - if from == nil { - return &managedStruct{}, nil - } - accessor, err := meta.Accessor(from) - if err != nil { - panic(fmt.Sprintf("couldn't get accessor: %v", err)) - } - - managed, err := decodeManagedFields(accessor.GetManagedFields()) +func DecodeObjectManagedFields(from []metav1.ManagedFieldsEntry) (ManagedInterface, error) { + managed, err := decodeManagedFields(from) if err != nil { return nil, fmt.Errorf("failed to convert managed fields from API: %v", err) } @@ -110,7 +107,16 @@ func EncodeObjectManagedFields(obj runtime.Object, managed ManagedInterface) err func decodeManagedFields(encodedManagedFields []metav1.ManagedFieldsEntry) (managed managedStruct, err error) { managed.fields = make(fieldpath.ManagedFields, len(encodedManagedFields)) managed.times = make(map[string]*metav1.Time, len(encodedManagedFields)) - for _, encodedVersionedSet := range encodedManagedFields { + + for i, encodedVersionedSet := range encodedManagedFields { + switch encodedVersionedSet.FieldsType { + case "FieldsV1": + // Valid case. + case "": + return managedStruct{}, fmt.Errorf("missing fieldsType in managed fields entry %d", i) + default: + return managedStruct{}, fmt.Errorf("invalid fieldsType %q in managed fields entry %d", encodedVersionedSet.FieldsType, i) + } manager, err := BuildManagerIdentifier(&encodedVersionedSet) if err != nil { return managedStruct{}, fmt.Errorf("error decoding manager from %v: %v", encodedVersionedSet, err) diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/structuredmerge.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/structuredmerge.go index 32116a94d..3ec16a838 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/structuredmerge.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/structuredmerge.go @@ -18,14 +18,12 @@ package fieldmanager import ( "fmt" - "time" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal" - "k8s.io/klog" openapiproto "k8s.io/kube-openapi/pkg/util/proto" "sigs.k8s.io/structured-merge-diff/v3/fieldpath" "sigs.k8s.io/structured-merge-diff/v3/merge" @@ -41,7 +39,6 @@ type structuredMergeManager struct { } var _ Manager = &structuredMergeManager{} -var atMostEverySecond = internal.NewAtMostEvery(time.Second) // NewStructuredMergeManager creates a new Manager that merges apply requests // and update managed fields for other types of requests. @@ -98,19 +95,11 @@ func (f *structuredMergeManager) Update(liveObj, newObj runtime.Object, managed } newObjTyped, err := f.typeConverter.ObjectToTyped(newObjVersioned) if err != nil { - // Return newObj and just by-pass fields update. This really shouldn't happen. - atMostEverySecond.Do(func() { - klog.Errorf("[SHOULD NOT HAPPEN] failed to create typed new object of type %v: %v", newObjVersioned.GetObjectKind().GroupVersionKind(), err) - }) - return newObj, managed, nil + return nil, nil, fmt.Errorf("failed to convert new object (%v) to smd typed: %v", newObjVersioned.GetObjectKind().GroupVersionKind(), err) } liveObjTyped, err := f.typeConverter.ObjectToTyped(liveObjVersioned) if err != nil { - // Return newObj and just by-pass fields update. This really shouldn't happen. - atMostEverySecond.Do(func() { - klog.Errorf("[SHOULD NOT HAPPEN] failed to create typed live object of type %v: %v", liveObjVersioned.GetObjectKind().GroupVersionKind(), err) - }) - return newObj, managed, nil + return nil, nil, fmt.Errorf("failed to convert live object (%v) to smd typed: %v", liveObjVersioned.GetObjectKind().GroupVersionKind(), err) } apiVersion := fieldpath.APIVersion(f.groupVersion.String()) diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/patch.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/patch.go index e9d110017..c295d0aa6 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/patch.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/patch.go @@ -323,9 +323,7 @@ func (p *jsonPatcher) applyPatchToCurrentObject(currentObject runtime.Object) (r } if p.fieldManager != nil { - if objToUpdate, err = p.fieldManager.Update(currentObject, objToUpdate, managerOrUserAgent(p.options.FieldManager, p.userAgent)); err != nil { - return nil, fmt.Errorf("failed to update object (json PATCH for %v) managed fields: %v", p.kind, err) - } + objToUpdate = p.fieldManager.UpdateNoErrors(currentObject, objToUpdate, managerOrUserAgent(p.options.FieldManager, p.userAgent)) } return objToUpdate, nil } @@ -408,9 +406,7 @@ func (p *smpPatcher) applyPatchToCurrentObject(currentObject runtime.Object) (ru } if p.fieldManager != nil { - if newObj, err = p.fieldManager.Update(currentObject, newObj, managerOrUserAgent(p.options.FieldManager, p.userAgent)); err != nil { - return nil, fmt.Errorf("failed to update object (smp PATCH for %v) managed fields: %v", p.kind, err) - } + newObj = p.fieldManager.UpdateNoErrors(currentObject, newObj, managerOrUserAgent(p.options.FieldManager, p.userAgent)) } return newObj, nil } diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/update.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/update.go index c58fe9d57..91b909ea6 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/update.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/update.go @@ -131,11 +131,7 @@ func UpdateResource(r rest.Updater, scope *RequestScope, admit admission.Interfa if scope.FieldManager != nil { transformers = append(transformers, func(_ context.Context, newObj, liveObj runtime.Object) (runtime.Object, error) { if shouldUpdateManagedFields { - obj, err := scope.FieldManager.Update(liveObj, newObj, managerOrUserAgent(options.FieldManager, req.UserAgent())) - if err != nil { - return nil, fmt.Errorf("failed to update object (Update for %v) managed fields: %v", scope.Kind, err) - } - return obj, nil + return scope.FieldManager.UpdateNoErrors(liveObj, newObj, managerOrUserAgent(options.FieldManager, req.UserAgent())), nil } return newObj, nil }) diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go b/vendor/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go index c79efdef4..6f1a836e3 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go @@ -28,7 +28,6 @@ import ( "time" restful "github.com/emicklei/go-restful" - "k8s.io/apimachinery/pkg/apis/meta/v1/validation" "k8s.io/apimachinery/pkg/types" utilsets "k8s.io/apimachinery/pkg/util/sets" @@ -48,6 +47,8 @@ type resettableCollector interface { const ( APIServerComponent string = "apiserver" + OtherContentType string = "other" + OtherRequestMethod string = "other" ) /* @@ -172,6 +173,37 @@ var ( currentInflightRequests, requestTerminationsTotal, } + + // these are the known (e.g. whitelisted/known) content types which we will report for + // request metrics. Any other RFC compliant content types will be aggregated under 'unknown' + knownMetricContentTypes = utilsets.NewString( + "application/apply-patch+yaml", + "application/json", + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/vnd.kubernetes.protobuf", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/yaml", + "text/plain", + "text/plain;charset=utf-8") + // these are the valid request methods which we report in our metrics. Any other request methods + // will be aggregated under 'unknown' + validRequestMethods = utilsets.NewString( + "APPLY", + "CONNECT", + "CREATE", + "DELETE", + "DELETECOLLECTION", + "GET", + "LIST", + "PATCH", + "POST", + "PROXY", + "PUT", + "UPDATE", + "WATCH", + "WATCHLIST") ) const ( @@ -219,6 +251,10 @@ func RecordRequestTermination(req *http.Request, requestInfo *request.RequestInf // translated to RequestInfo). // However, we need to tweak it e.g. to differentiate GET from LIST. verb := canonicalVerb(strings.ToUpper(req.Method), scope) + // set verbs to a bounded set of known and expected verbs + if !validRequestMethods.Has(verb) { + verb = OtherRequestMethod + } if requestInfo.IsResourceRequest { requestTerminationsTotal.WithLabelValues(cleanVerb(verb, req), requestInfo.APIGroup, requestInfo.APIVersion, requestInfo.Resource, requestInfo.Subresource, scope, component, codeToString(code)).Inc() } else { @@ -256,7 +292,8 @@ func MonitorRequest(req *http.Request, verb, group, version, resource, subresour reportedVerb := cleanVerb(verb, req) dryRun := cleanDryRun(req.URL) elapsedSeconds := elapsed.Seconds() - requestCounter.WithLabelValues(reportedVerb, dryRun, group, version, resource, subresource, scope, component, contentType, codeToString(httpCode)).Inc() + cleanContentType := cleanContentType(contentType) + requestCounter.WithLabelValues(reportedVerb, dryRun, group, version, resource, subresource, scope, component, cleanContentType, codeToString(httpCode)).Inc() requestLatencies.WithLabelValues(reportedVerb, dryRun, group, version, resource, subresource, scope, component).Observe(elapsedSeconds) // We are only interested in response sizes of read requests. if verb == "GET" || verb == "LIST" { @@ -311,6 +348,19 @@ func InstrumentHandlerFunc(verb, group, version, resource, subresource, scope, c } } +// cleanContentType binds the contentType (for metrics related purposes) to a +// bounded set of known/expected content-types. +func cleanContentType(contentType string) string { + normalizedContentType := strings.ToLower(contentType) + if strings.HasSuffix(contentType, " stream=watch") || strings.HasSuffix(contentType, " charset=utf-8") { + normalizedContentType = strings.ReplaceAll(contentType, " ", "") + } + if knownMetricContentTypes.Has(normalizedContentType) { + return normalizedContentType + } + return OtherContentType +} + // CleanScope returns the scope of the request. func CleanScope(requestInfo *request.RequestInfo) string { if requestInfo.Namespace != "" { @@ -355,7 +405,10 @@ func cleanVerb(verb string, request *http.Request) string { if verb == "PATCH" && request.Header.Get("Content-Type") == string(types.ApplyPatchType) && utilfeature.DefaultFeatureGate.Enabled(features.ServerSideApply) { reportedVerb = "APPLY" } - return reportedVerb + if validRequestMethods.Has(reportedVerb) { + return reportedVerb + } + return OtherRequestMethod } func cleanDryRun(u *url.URL) string { diff --git a/vendor/k8s.io/apiserver/pkg/server/config.go b/vendor/k8s.io/apiserver/pkg/server/config.go index 276be61d5..b182043d8 100644 --- a/vendor/k8s.io/apiserver/pkg/server/config.go +++ b/vendor/k8s.io/apiserver/pkg/server/config.go @@ -616,13 +616,20 @@ func (c completedConfig) New(name string, delegationTarget DelegationTarget) (*G } genericApiServerHookName := "generic-apiserver-start-informers" - if c.SharedInformerFactory != nil && !s.isPostStartHookRegistered(genericApiServerHookName) { - err := s.AddPostStartHook(genericApiServerHookName, func(context PostStartHookContext) error { - c.SharedInformerFactory.Start(context.StopCh) - return nil - }) - if err != nil { - return nil, err + if c.SharedInformerFactory != nil { + if !s.isPostStartHookRegistered(genericApiServerHookName) { + err := s.AddPostStartHook(genericApiServerHookName, func(context PostStartHookContext) error { + c.SharedInformerFactory.Start(context.StopCh) + return nil + }) + if err != nil { + return nil, err + } + // TODO: Once we get rid of /healthz consider changing this to post-start-hook. + err = s.addReadyzChecks(healthz.NewInformerSyncHealthz(c.SharedInformerFactory)) + if err != nil { + return nil, err + } } } diff --git a/vendor/k8s.io/apiserver/pkg/server/healthz/healthz.go b/vendor/k8s.io/apiserver/pkg/server/healthz/healthz.go index 0808a8e8d..098c89e2a 100644 --- a/vendor/k8s.io/apiserver/pkg/server/healthz/healthz.go +++ b/vendor/k8s.io/apiserver/pkg/server/healthz/healthz.go @@ -24,6 +24,7 @@ import ( "fmt" "io/ioutil" "net/http" + "reflect" "strings" "sync" "sync/atomic" @@ -86,6 +87,43 @@ func (l *log) Check(_ *http.Request) error { return fmt.Errorf("logging blocked") } +type cacheSyncWaiter interface { + WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool +} + +type informerSync struct { + cacheSyncWaiter cacheSyncWaiter +} + +var _ HealthChecker = &informerSync{} + +// NewInformerSyncHealthz returns a new HealthChecker that will pass only if all informers in the given cacheSyncWaiter sync. +func NewInformerSyncHealthz(cacheSyncWaiter cacheSyncWaiter) HealthChecker { + return &informerSync{ + cacheSyncWaiter: cacheSyncWaiter, + } +} + +func (i *informerSync) Name() string { + return "informer-sync" +} + +func (i *informerSync) Check(_ *http.Request) error { + stopCh := make(chan struct{}) + // Close stopCh to force checking if informers are synced now. + close(stopCh) + + informersByStarted := make(map[bool][]string) + for informerType, started := range i.cacheSyncWaiter.WaitForCacheSync(stopCh) { + informersByStarted[started] = append(informersByStarted[started], informerType.String()) + } + + if notStarted := informersByStarted[false]; len(notStarted) > 0 { + return fmt.Errorf("%d informers not started yet: %v", len(notStarted), notStarted) + } + return nil +} + // NamedCheck returns a healthz checker for the given name and function. func NamedCheck(name string, check func(r *http.Request) error) HealthChecker { return &healthzCheck{name, check} diff --git a/vendor/k8s.io/apiserver/pkg/storage/errors.go b/vendor/k8s.io/apiserver/pkg/storage/errors.go index 3acee4598..9c72d59fb 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/errors.go +++ b/vendor/k8s.io/apiserver/pkg/storage/errors.go @@ -177,7 +177,12 @@ var tooLargeResourceVersionCauseMsg = "Too large resource version" // a minimum resource version that is larger than the largest currently available resource version for a requested resource. func NewTooLargeResourceVersionError(minimumResourceVersion, currentRevision uint64, retrySeconds int) error { err := errors.NewTimeoutError(fmt.Sprintf("Too large resource version: %d, current: %d", minimumResourceVersion, currentRevision), retrySeconds) - err.ErrStatus.Details.Causes = []metav1.StatusCause{{Message: tooLargeResourceVersionCauseMsg}} + err.ErrStatus.Details.Causes = []metav1.StatusCause{ + { + Type: metav1.CauseTypeResourceVersionTooLarge, + Message: tooLargeResourceVersionCauseMsg, + }, + } return err } @@ -186,15 +191,5 @@ func IsTooLargeResourceVersion(err error) bool { if !errors.IsTimeout(err) { return false } - switch t := err.(type) { - case errors.APIStatus: - if d := t.Status().Details; d != nil { - for _, cause := range d.Causes { - if cause.Message == tooLargeResourceVersionCauseMsg { - return true - } - } - } - } - return false + return errors.HasStatusCause(err, metav1.CauseTypeResourceVersionTooLarge) } diff --git a/vendor/k8s.io/apiserver/pkg/storage/etcd3/store.go b/vendor/k8s.io/apiserver/pkg/storage/etcd3/store.go index ac92a99a9..cb8dadc4e 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/etcd3/store.go +++ b/vendor/k8s.io/apiserver/pkg/storage/etcd3/store.go @@ -547,7 +547,7 @@ func (s *store) List(ctx context.Context, key, resourceVersion string, pred stor newItemFunc := getNewItemFunc(listObj, v) - var returnedRV, continueRV int64 + var returnedRV, continueRV, withRev int64 var continueKey string switch { case s.pagingEnabled && len(pred.Continue) > 0: @@ -568,7 +568,7 @@ func (s *store) List(ctx context.Context, key, resourceVersion string, pred stor // continueRV==0 is invalid. // If continueRV < 0, the request is for the latest resource version. if continueRV > 0 { - options = append(options, clientv3.WithRev(continueRV)) + withRev = continueRV returnedRV = continueRV } case s.pagingEnabled && pred.Limit > 0: @@ -578,7 +578,7 @@ func (s *store) List(ctx context.Context, key, resourceVersion string, pred stor return apierrors.NewBadRequest(fmt.Sprintf("invalid resource version: %v", err)) } if fromRV > 0 { - options = append(options, clientv3.WithRev(int64(fromRV))) + withRev = int64(fromRV) } returnedRV = int64(fromRV) } @@ -589,6 +589,9 @@ func (s *store) List(ctx context.Context, key, resourceVersion string, pred stor default: options = append(options, clientv3.WithPrefix()) } + if withRev != 0 { + options = append(options, clientv3.WithRev(withRev)) + } // loop until we have filled the requested limit from etcd or there are no more results var lastKey []byte @@ -650,6 +653,10 @@ func (s *store) List(ctx context.Context, key, resourceVersion string, pred stor break } key = string(lastKey) + "\x00" + if withRev == 0 { + withRev = returnedRV + options = append(options, clientv3.WithRev(withRev)) + } } // instruct the client to begin querying from immediately after the last key we returned diff --git a/vendor/k8s.io/client-go/tools/cache/controller.go b/vendor/k8s.io/client-go/tools/cache/controller.go index 5d5821193..8da56d364 100644 --- a/vendor/k8s.io/client-go/tools/cache/controller.go +++ b/vendor/k8s.io/client-go/tools/cache/controller.go @@ -138,11 +138,11 @@ func (c *controller) Run(stopCh <-chan struct{}) { c.reflectorMutex.Unlock() var wg wait.Group - defer wg.Wait() wg.StartWithChannel(stopCh, r.Run) wait.Until(c.processLoop, time.Second, stopCh) + wg.Wait() } // Returns true once this controller has completed an initial resource listing @@ -311,6 +311,18 @@ func NewInformer( return clientState, newInformer(lw, objType, resyncPeriod, h, clientState) } +func NewLiteInformer( + lw ListerWatcher, + objType runtime.Object, + resyncPeriod time.Duration, + h ResourceEventHandler, +) (Store, Controller) { + // This will hold the client state, as we know it. + clientState := NewLiteStore(DeletionHandlingMetaNamespaceKeyFunc) + + return clientState, newInformer(lw, objType, resyncPeriod, h, clientState) +} + // NewIndexerInformer returns a Indexer and a controller for populating the index // while also providing event notifications. You should only used the returned // Index for Get/List operations; Add/Modify/Deletes will cause the event @@ -340,6 +352,19 @@ func NewIndexerInformer( return clientState, newInformer(lw, objType, resyncPeriod, h, clientState) } +func NewLiteIndexerInformer( + lw ListerWatcher, + objType runtime.Object, + resyncPeriod time.Duration, + h ResourceEventHandler, + indexers Indexers, +) (Indexer, Controller) { + // This will hold the client state, as we know it. + clientState := NewLiteIndexer(DeletionHandlingMetaNamespaceKeyFunc, indexers) + + return clientState, newInformer(lw, objType, resyncPeriod, h, clientState) +} + // newInformer returns a controller for populating the store while also // providing event notifications. // diff --git a/vendor/k8s.io/client-go/tools/cache/lite_object.go b/vendor/k8s.io/client-go/tools/cache/lite_object.go new file mode 100644 index 000000000..d97a0fe08 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/lite_object.go @@ -0,0 +1,267 @@ +package cache + +import ( + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" +) + +type LiteObject struct { + name string + namespace string + resourceVersion string + uid types.UID + clusterName string +} + +func (obj *LiteObject) GetNamespace() string { + return obj.namespace +} + +func (obj *LiteObject) SetNamespace(namespace string) { + obj.namespace = namespace +} + +func (obj *LiteObject) GetName() string { + return obj.name +} + +func (obj *LiteObject) SetName(name string) { + obj.name = name +} + +func (obj *LiteObject) GetGenerateName() string { + panic("implement me") +} + +func (obj *LiteObject) SetGenerateName(name string) { + panic("implement me") +} + +func (obj *LiteObject) GetUID() types.UID { + return obj.uid +} + +func (obj *LiteObject) SetUID(uid types.UID) { + obj.uid = uid +} + +func (obj *LiteObject) GetResourceVersion() string { + return obj.resourceVersion +} + +func (obj *LiteObject) SetResourceVersion(resourceVersion string) { + obj.resourceVersion = resourceVersion +} + +func (obj *LiteObject) GetGeneration() int64 { + panic("implement me") +} + +func (obj *LiteObject) SetGeneration(generation int64) { + panic("implement me") +} + +func (obj *LiteObject) GetSelfLink() string { + panic("implement me") +} + +func (obj *LiteObject) SetSelfLink(_ string) { + panic("implement me") +} + +func (obj *LiteObject) GetCreationTimestamp() metav1.Time { + panic("implement me") +} + +func (obj *LiteObject) SetCreationTimestamp(_ metav1.Time) { + panic("implement me") +} + +func (obj *LiteObject) GetDeletionTimestamp() *metav1.Time { + panic("implement me") +} + +func (obj *LiteObject) SetDeletionTimestamp(_ *metav1.Time) { + panic("implement me") +} + +func (obj *LiteObject) GetDeletionGracePeriodSeconds() *int64 { + panic("implement me") +} + +func (obj *LiteObject) SetDeletionGracePeriodSeconds(_ *int64) { + panic("implement me") +} + +func (obj *LiteObject) GetLabels() map[string]string { + panic("implement me") +} + +func (obj *LiteObject) SetLabels(_ map[string]string) { + panic("implement me") +} + +func (obj *LiteObject) GetAnnotations() map[string]string { + panic("implement me") +} + +func (obj *LiteObject) SetAnnotations(_ map[string]string) { + panic("implement me") +} + +func (obj *LiteObject) GetFinalizers() []string { + panic("implement me") +} + +func (obj *LiteObject) SetFinalizers(_ []string) { + panic("implement me") +} + +func (obj *LiteObject) GetOwnerReferences() []metav1.OwnerReference { + panic("implement me") +} + +func (obj *LiteObject) SetOwnerReferences(_ []metav1.OwnerReference) { + panic("implement me") +} + +func (obj *LiteObject) GetClusterName() string { + return obj.clusterName +} + +func (obj *LiteObject) SetClusterName(clusterName string) { + obj.clusterName = clusterName +} + +func (obj *LiteObject) GetManagedFields() []metav1.ManagedFieldsEntry { + panic("implement me") +} + +func (obj *LiteObject) SetManagedFields(_ []metav1.ManagedFieldsEntry) { + panic("implement me") +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (obj *LiteObject) DeepCopyInto(out *LiteObject) { + *out = *obj + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LiteObject. +func (obj *LiteObject) DeepCopy() *LiteObject { + if obj == nil { + return nil + } + out := new(LiteObject) + obj.DeepCopyInto(out) + return out +} + +func NewLiteObject(obj interface{}) (interface{}, error) { + if _, ok := obj.(DeletedFinalStateUnknown); ok { + return obj, nil + } + if _, ok := obj.(ExplicitKey); ok { + return obj, nil + } + m, err := meta.Accessor(obj) + if err != nil { + return nil, err + } + return &LiteObject{ + name: m.GetName(), + namespace: m.GetNamespace(), + resourceVersion: m.GetResourceVersion(), + uid: m.GetUID(), + clusterName: m.GetClusterName(), + }, nil +} + +func MustLiteObject(obj interface{}) interface{} { + out, err := NewLiteObject(obj) + if err != nil { + panic(err) + } + return out +} + +// liteMap implements ThreadSafeStore +type liteMap struct { + delegate ThreadSafeStore +} + +func (c *liteMap) Add(key string, obj interface{}) { + c.delegate.Add(key, MustLiteObject(obj)) +} + +func (c *liteMap) Update(key string, obj interface{}) { + c.delegate.Update(key, MustLiteObject(obj)) +} + +func (c *liteMap) Delete(key string) { + c.delegate.Delete(key) +} + +func (c *liteMap) Get(key string) (item interface{}, exists bool) { + return c.delegate.Get(key) +} + +func (c *liteMap) List() []interface{} { + return c.delegate.List() +} + +// ListKeys returns a list of all the keys of the objects currently +// in the liteMap. +func (c *liteMap) ListKeys() []string { + return c.delegate.ListKeys() +} + +func (c *liteMap) Replace(items map[string]interface{}, resourceVersion string) { + liteObjs := make(map[string]interface{}, len(items)) + for key, item := range items { + liteObjs[key] = MustLiteObject(item) + } + c.delegate.Replace(liteObjs, resourceVersion) +} + +// Index returns a list of items that match the given object on the index function. +// Index is thread-safe so long as you treat all items as immutable. +func (c *liteMap) Index(indexName string, obj interface{}) ([]interface{}, error) { + return c.delegate.Index(indexName, MustLiteObject(obj)) +} + +// ByIndex returns a list of the items whose indexed values in the given index include the given indexed value +func (c *liteMap) ByIndex(indexName, indexedValue string) ([]interface{}, error) { + return c.delegate.ByIndex(indexName, indexedValue) +} + +// IndexKeys returns a list of the Store keys of the objects whose indexed values in the given index include the given indexed value. +// IndexKeys is thread-safe so long as you treat all items as immutable. +func (c *liteMap) IndexKeys(indexName, indexedValue string) ([]string, error) { + return c.delegate.IndexKeys(indexName, indexedValue) +} + +func (c *liteMap) ListIndexFuncValues(indexName string) []string { + return c.delegate.ListIndexFuncValues(indexName) +} + +func (c *liteMap) GetIndexers() Indexers { + return c.delegate.GetIndexers() +} + +func (c *liteMap) AddIndexers(newIndexers Indexers) error { + return c.delegate.AddIndexers(newIndexers) +} + +func (c *liteMap) Resync() error { + // Nothing to do + return nil +} + +// NewLiteThreadSafeStore creates a new instance of ThreadSafeStore. +func NewLiteThreadSafeStore(indexers Indexers, indices Indices) ThreadSafeStore { + return &liteMap{ + delegate: NewThreadSafeStore(indexers, indices), + } +} diff --git a/vendor/k8s.io/client-go/tools/cache/reflector.go b/vendor/k8s.io/client-go/tools/cache/reflector.go index 99a7b284b..b646a28bf 100644 --- a/vendor/k8s.io/client-go/tools/cache/reflector.go +++ b/vendor/k8s.io/client-go/tools/cache/reflector.go @@ -82,9 +82,9 @@ type Reflector struct { // observed when doing a sync with the underlying store // it is thread safe, but not synchronized with the underlying store lastSyncResourceVersion string - // isLastSyncResourceVersionGone is true if the previous list or watch request with lastSyncResourceVersion - // failed with an HTTP 410 (Gone) status code. - isLastSyncResourceVersionGone bool + // isLastSyncResourceVersionUnavailable is true if the previous list or watch request with + // lastSyncResourceVersion failed with an "expired" or "too large resource version" error. + isLastSyncResourceVersionUnavailable bool // lastSyncResourceVersionMutex guards read/write access to lastSyncResourceVersion lastSyncResourceVersionMutex sync.RWMutex // WatchListPageSize is the requested chunk size of initial and resync watch lists. @@ -256,13 +256,14 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { } list, paginatedResult, err = pager.List(context.Background(), options) - if isExpiredError(err) { - r.setIsLastSyncResourceVersionExpired(true) - // Retry immediately if the resource version used to list is expired. + if isExpiredError(err) || isTooLargeResourceVersionError(err) { + r.setIsLastSyncResourceVersionUnavailable(true) + // Retry immediately if the resource version used to list is unavailable. // The pager already falls back to full list if paginated list calls fail due to an "Expired" error on - // continuation pages, but the pager might not be enabled, or the full list might fail because the - // resource version it is listing at is expired, so we need to fallback to resourceVersion="" in all - // to recover and ensure the reflector makes forward progress. + // continuation pages, but the pager might not be enabled, the full list might fail because the + // resource version it is listing at is expired or the cache may not yet be synced to the provided + // resource version. So we need to fallback to resourceVersion="" in all to recover and ensure + // the reflector makes forward progress. list, paginatedResult, err = pager.List(context.Background(), metav1.ListOptions{ResourceVersion: r.relistResourceVersion()}) } close(listCh) @@ -292,7 +293,7 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { r.paginatedResult = true } - r.setIsLastSyncResourceVersionExpired(false) // list was successful + r.setIsLastSyncResourceVersionUnavailable(false) // list was successful initTrace.Step("Objects listed") listMetaInterface, err := meta.ListAccessor(list) if err != nil { @@ -396,7 +397,7 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { if err != errorStopRequested { switch { case isExpiredError(err): - // Don't set LastSyncResourceVersionExpired - LIST call with ResourceVersion=RV already + // Don't set LastSyncResourceVersionUnavailable - LIST call with ResourceVersion=RV already // has a semantic that it returns data at least as fresh as provided RV. // So first try to LIST with setting RV to resource version of last observed object. klog.V(4).Infof("%s: watch of %v closed with: %v", r.name, r.expectedTypeName, err) @@ -519,9 +520,9 @@ func (r *Reflector) relistResourceVersion() string { r.lastSyncResourceVersionMutex.RLock() defer r.lastSyncResourceVersionMutex.RUnlock() - if r.isLastSyncResourceVersionGone { + if r.isLastSyncResourceVersionUnavailable { // Since this reflector makes paginated list requests, and all paginated list requests skip the watch cache - // if the lastSyncResourceVersion is expired, we set ResourceVersion="" and list again to re-establish reflector + // if the lastSyncResourceVersion is unavailable, we set ResourceVersion="" and list again to re-establish reflector // to the latest available ResourceVersion, using a consistent read from etcd. return "" } @@ -533,12 +534,12 @@ func (r *Reflector) relistResourceVersion() string { return r.lastSyncResourceVersion } -// setIsLastSyncResourceVersionExpired sets if the last list or watch request with lastSyncResourceVersion returned a -// expired error: HTTP 410 (Gone) Status Code. -func (r *Reflector) setIsLastSyncResourceVersionExpired(isExpired bool) { +// setIsLastSyncResourceVersionUnavailable sets if the last list or watch request with lastSyncResourceVersion returned +// "expired" or "too large resource version" error. +func (r *Reflector) setIsLastSyncResourceVersionUnavailable(isUnavailable bool) { r.lastSyncResourceVersionMutex.Lock() defer r.lastSyncResourceVersionMutex.Unlock() - r.isLastSyncResourceVersionGone = isExpired + r.isLastSyncResourceVersionUnavailable = isUnavailable } func isExpiredError(err error) bool { @@ -548,3 +549,28 @@ func isExpiredError(err error) bool { // check when we fully drop support for Kubernetes 1.17 servers from reflectors. return apierrors.IsResourceExpired(err) || apierrors.IsGone(err) } + +func isTooLargeResourceVersionError(err error) bool { + if apierrors.HasStatusCause(err, metav1.CauseTypeResourceVersionTooLarge) { + return true + } + // In Kubernetes 1.17.0-1.18.5, the api server doesn't set the error status cause to + // metav1.CauseTypeResourceVersionTooLarge to indicate that the requested minimum resource + // version is larger than the largest currently available resource version. To ensure backward + // compatibility with these server versions we also need to detect the error based on the content + // of the error message field. + if !apierrors.IsTimeout(err) { + return false + } + apierr, ok := err.(apierrors.APIStatus) + if !ok || apierr == nil || apierr.Status().Details == nil { + return false + } + for _, cause := range apierr.Status().Details.Causes { + // Matches the message returned by api server 1.17.0-1.18.5 for this error condition + if cause.Message == "Too large resource version" { + return true + } + } + return false +} diff --git a/vendor/k8s.io/client-go/tools/cache/shared_informer.go b/vendor/k8s.io/client-go/tools/cache/shared_informer.go index df8c67dce..e7c2a0e23 100644 --- a/vendor/k8s.io/client-go/tools/cache/shared_informer.go +++ b/vendor/k8s.io/client-go/tools/cache/shared_informer.go @@ -205,6 +205,25 @@ func NewSharedIndexInformer(lw ListerWatcher, exampleObject runtime.Object, defa return sharedIndexInformer } +func NewSharedLiteInformer(lw ListerWatcher, exampleObject runtime.Object, defaultEventHandlerResyncPeriod time.Duration) SharedInformer { + return NewSharedLiteIndexInformer(lw, exampleObject, defaultEventHandlerResyncPeriod, Indexers{}) +} + +func NewSharedLiteIndexInformer(lw ListerWatcher, exampleObject runtime.Object, defaultEventHandlerResyncPeriod time.Duration, indexers Indexers) SharedIndexInformer { + realClock := &clock.RealClock{} + sharedIndexInformer := &sharedIndexInformer{ + processor: &sharedProcessor{clock: realClock}, + indexer: NewLiteIndexer(DeletionHandlingMetaNamespaceKeyFunc, indexers), + listerWatcher: lw, + objectType: exampleObject, + resyncCheckPeriod: defaultEventHandlerResyncPeriod, + defaultEventHandlerResyncPeriod: defaultEventHandlerResyncPeriod, + cacheMutationDetector: NewCacheMutationDetector(fmt.Sprintf("%T", exampleObject)), + clock: realClock, + } + return sharedIndexInformer +} + // InformerSynced is a function that can be used to determine if an informer has synced. This is useful for determining if caches have synced. type InformerSynced func() bool diff --git a/vendor/k8s.io/client-go/tools/cache/store.go b/vendor/k8s.io/client-go/tools/cache/store.go index 886e95d2d..68e39112f 100644 --- a/vendor/k8s.io/client-go/tools/cache/store.go +++ b/vendor/k8s.io/client-go/tools/cache/store.go @@ -264,3 +264,19 @@ func NewIndexer(keyFunc KeyFunc, indexers Indexers) Indexer { keyFunc: keyFunc, } } + +// NewLiteStore returns a Store implemented simply with a map and a lock. +func NewLiteStore(keyFunc KeyFunc) Store { + return &cache{ + cacheStorage: NewLiteThreadSafeStore(Indexers{}, Indices{}), + keyFunc: keyFunc, + } +} + +// NewLiteIndexer returns an Indexer implemented simply with a map and a lock. +func NewLiteIndexer(keyFunc KeyFunc, indexers Indexers) Indexer { + return &cache{ + cacheStorage: NewLiteThreadSafeStore(indexers, Indices{}), + keyFunc: keyFunc, + } +} diff --git a/vendor/k8s.io/klog/v2/.gitignore b/vendor/k8s.io/klog/v2/.gitignore deleted file mode 100644 index 0aa200239..000000000 --- a/vendor/k8s.io/klog/v2/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -# OSX leaves these everywhere on SMB shares -._* - -# OSX trash -.DS_Store - -# Eclipse files -.classpath -.project -.settings/** - -# Files generated by JetBrains IDEs, e.g. IntelliJ IDEA -.idea/ -*.iml - -# Vscode files -.vscode diff --git a/vendor/k8s.io/klog/v2/CONTRIBUTING.md b/vendor/k8s.io/klog/v2/CONTRIBUTING.md deleted file mode 100644 index 2641b1f41..000000000 --- a/vendor/k8s.io/klog/v2/CONTRIBUTING.md +++ /dev/null @@ -1,22 +0,0 @@ -# Contributing Guidelines - -Welcome to Kubernetes. We are excited about the prospect of you joining our [community](https://github.com/kubernetes/community)! The Kubernetes community abides by the CNCF [code of conduct](code-of-conduct.md). Here is an excerpt: - -_As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities._ - -## Getting Started - -We have full documentation on how to get started contributing here: - -- [Contributor License Agreement](https://git.k8s.io/community/CLA.md) Kubernetes projects require that you sign a Contributor License Agreement (CLA) before we can accept your pull requests -- [Kubernetes Contributor Guide](http://git.k8s.io/community/contributors/guide) - Main contributor documentation, or you can just jump directly to the [contributing section](http://git.k8s.io/community/contributors/guide#contributing) -- [Contributor Cheat Sheet](https://git.k8s.io/community/contributors/guide/contributor-cheatsheet) - Common resources for existing developers - -## Mentorship - -- [Mentoring Initiatives](https://git.k8s.io/community/mentoring) - We have a diverse set of mentorship programs available that are always looking for volunteers! - -## Contact Information - -- [Slack](https://kubernetes.slack.com/messages/sig-architecture) -- [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-sig-architecture) diff --git a/vendor/k8s.io/klog/v2/LICENSE b/vendor/k8s.io/klog/v2/LICENSE deleted file mode 100644 index 37ec93a14..000000000 --- a/vendor/k8s.io/klog/v2/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/vendor/k8s.io/klog/v2/OWNERS b/vendor/k8s.io/klog/v2/OWNERS deleted file mode 100644 index 380e514f2..000000000 --- a/vendor/k8s.io/klog/v2/OWNERS +++ /dev/null @@ -1,19 +0,0 @@ -# See the OWNERS docs at https://go.k8s.io/owners -reviewers: - - jayunit100 - - hoegaarden - - andyxning - - neolit123 - - pohly - - yagonobre - - vincepri - - detiber -approvers: - - dims - - thockin - - justinsb - - tallclair - - piosz - - brancz - - DirectXMan12 - - lavalamp diff --git a/vendor/k8s.io/klog/v2/README.md b/vendor/k8s.io/klog/v2/README.md deleted file mode 100644 index eda33d73d..000000000 --- a/vendor/k8s.io/klog/v2/README.md +++ /dev/null @@ -1,99 +0,0 @@ -klog -==== - -klog is a permanent fork of https://github.com/golang/glog. - -## Why was klog created? - -The decision to create klog was one that wasn't made lightly, but it was necessary due to some -drawbacks that are present in [glog](https://github.com/golang/glog). Ultimately, the fork was created due to glog not being under active development; this can be seen in the glog README: - -> The code in this repo [...] is not itself under development - -This makes us unable to solve many use cases without a fork. The factors that contributed to needing feature development are listed below: - - * `glog` [presents a lot "gotchas"](https://github.com/kubernetes/kubernetes/issues/61006) and introduces challenges in containerized environments, all of which aren't well documented. - * `glog` doesn't provide an easy way to test logs, which detracts from the stability of software using it - * A long term goal is to implement a logging interface that allows us to add context, change output format, etc. - -Historical context is available here: - - * https://github.com/kubernetes/kubernetes/issues/61006 - * https://github.com/kubernetes/kubernetes/issues/70264 - * https://groups.google.com/forum/#!msg/kubernetes-sig-architecture/wCWiWf3Juzs/hXRVBH90CgAJ - * https://groups.google.com/forum/#!msg/kubernetes-dev/7vnijOMhLS0/1oRiNtigBgAJ - ----- - -How to use klog -=============== -- Replace imports for `github.com/golang/glog` with `k8s.io/klog` -- Use `klog.InitFlags(nil)` explicitly for initializing global flags as we no longer use `init()` method to register the flags -- You can now use `log_file` instead of `log_dir` for logging to a single file (See `examples/log_file/usage_log_file.go`) -- If you want to redirect everything logged using klog somewhere else (say syslog!), you can use `klog.SetOutput()` method and supply a `io.Writer`. (See `examples/set_output/usage_set_output.go`) -- For more logging conventions (See [Logging Conventions](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/logging.md)) - -**NOTE**: please use the newer go versions that support semantic import versioning in modules, ideally go 1.11.4 or greater. - -### Coexisting with glog -This package can be used side by side with glog. [This example](examples/coexist_glog/coexist_glog.go) shows how to initialize and syncronize flags from the global `flag.CommandLine` FlagSet. In addition, the example makes use of stderr as combined output by setting `alsologtostderr` (or `logtostderr`) to `true`. - -## Community, discussion, contribution, and support - -Learn how to engage with the Kubernetes community on the [community page](http://kubernetes.io/community/). - -You can reach the maintainers of this project at: - -- [Slack](https://kubernetes.slack.com/messages/sig-architecture) -- [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-sig-architecture) - -### Code of conduct - -Participation in the Kubernetes community is governed by the [Kubernetes Code of Conduct](code-of-conduct.md). - ----- - -glog -==== - -Leveled execution logs for Go. - -This is an efficient pure Go implementation of leveled logs in the -manner of the open source C++ package - https://github.com/google/glog - -By binding methods to booleans it is possible to use the log package -without paying the expense of evaluating the arguments to the log. -Through the -vmodule flag, the package also provides fine-grained -control over logging at the file level. - -The comment from glog.go introduces the ideas: - - Package glog implements logging analogous to the Google-internal - C++ INFO/ERROR/V setup. It provides functions Info, Warning, - Error, Fatal, plus formatting variants such as Infof. It - also provides V-style logging controlled by the -v and - -vmodule=file=2 flags. - - Basic examples: - - glog.Info("Prepare to repel boarders") - - glog.Fatalf("Initialization failed: %s", err) - - See the documentation for the V function for an explanation - of these examples: - - if glog.V(2) { - glog.Info("Starting transaction...") - } - - glog.V(2).Infoln("Processed", nItems, "elements") - - -The repository contains an open source version of the log package -used inside Google. The master copy of the source lives inside -Google, not here. The code in this repo is for export only and is not itself -under development. Feature requests will be ignored. - -Send bug reports to golang-nuts@googlegroups.com. diff --git a/vendor/k8s.io/klog/v2/RELEASE.md b/vendor/k8s.io/klog/v2/RELEASE.md deleted file mode 100644 index b53eb960c..000000000 --- a/vendor/k8s.io/klog/v2/RELEASE.md +++ /dev/null @@ -1,9 +0,0 @@ -# Release Process - -The `klog` is released on an as-needed basis. The process is as follows: - -1. An issue is proposing a new release with a changelog since the last release -1. All [OWNERS](OWNERS) must LGTM this release -1. An OWNER runs `git tag -s $VERSION` and inserts the changelog and pushes the tag with `git push $VERSION` -1. The release issue is closed -1. An announcement email is sent to `kubernetes-dev@googlegroups.com` with the subject `[ANNOUNCE] kubernetes-template-project $VERSION is released` diff --git a/vendor/k8s.io/klog/v2/SECURITY_CONTACTS b/vendor/k8s.io/klog/v2/SECURITY_CONTACTS deleted file mode 100644 index 6128a5869..000000000 --- a/vendor/k8s.io/klog/v2/SECURITY_CONTACTS +++ /dev/null @@ -1,20 +0,0 @@ -# Defined below are the security contacts for this repo. -# -# They are the contact point for the Product Security Committee to reach out -# to for triaging and handling of incoming issues. -# -# The below names agree to abide by the -# [Embargo Policy](https://git.k8s.io/security/private-distributors-list.md#embargo-policy) -# and will be removed and replaced if they violate that agreement. -# -# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE -# INSTRUCTIONS AT https://kubernetes.io/security/ - -dims -thockin -justinsb -tallclair -piosz -brancz -DirectXMan12 -lavalamp diff --git a/vendor/k8s.io/klog/v2/code-of-conduct.md b/vendor/k8s.io/klog/v2/code-of-conduct.md deleted file mode 100644 index 0d15c00cf..000000000 --- a/vendor/k8s.io/klog/v2/code-of-conduct.md +++ /dev/null @@ -1,3 +0,0 @@ -# Kubernetes Community Code of Conduct - -Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md) diff --git a/vendor/k8s.io/klog/v2/go.mod b/vendor/k8s.io/klog/v2/go.mod deleted file mode 100644 index f50b25814..000000000 --- a/vendor/k8s.io/klog/v2/go.mod +++ /dev/null @@ -1,5 +0,0 @@ -module k8s.io/klog/v2 - -go 1.13 - -require github.com/go-logr/logr v0.1.0 diff --git a/vendor/k8s.io/klog/v2/go.sum b/vendor/k8s.io/klog/v2/go.sum deleted file mode 100644 index fb64d277a..000000000 --- a/vendor/k8s.io/klog/v2/go.sum +++ /dev/null @@ -1,2 +0,0 @@ -github.com/go-logr/logr v0.1.0 h1:M1Tv3VzNlEHg6uyACnRdtrploV2P7wZqH8BoQMtz0cg= -github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= diff --git a/vendor/k8s.io/klog/v2/klog.go b/vendor/k8s.io/klog/v2/klog.go deleted file mode 100644 index c334b14b2..000000000 --- a/vendor/k8s.io/klog/v2/klog.go +++ /dev/null @@ -1,1496 +0,0 @@ -// Go support for leveled logs, analogous to https://code.google.com/p/google-glog/ -// -// Copyright 2013 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package klog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup. -// It provides functions Info, Warning, Error, Fatal, plus formatting variants such as -// Infof. It also provides V-style logging controlled by the -v and -vmodule=file=2 flags. -// -// Basic examples: -// -// klog.Info("Prepare to repel boarders") -// -// klog.Fatalf("Initialization failed: %s", err) -// -// See the documentation for the V function for an explanation of these examples: -// -// if klog.V(2) { -// klog.Info("Starting transaction...") -// } -// -// klog.V(2).Infoln("Processed", nItems, "elements") -// -// Log output is buffered and written periodically using Flush. Programs -// should call Flush before exiting to guarantee all log output is written. -// -// By default, all log statements write to standard error. -// This package provides several flags that modify this behavior. -// As a result, flag.Parse must be called before any logging is done. -// -// -logtostderr=true -// Logs are written to standard error instead of to files. -// -alsologtostderr=false -// Logs are written to standard error as well as to files. -// -stderrthreshold=ERROR -// Log events at or above this severity are logged to standard -// error as well as to files. -// -log_dir="" -// Log files will be written to this directory instead of the -// default temporary directory. -// -// Other flags provide aids to debugging. -// -// -log_backtrace_at="" -// When set to a file and line number holding a logging statement, -// such as -// -log_backtrace_at=gopherflakes.go:234 -// a stack trace will be written to the Info log whenever execution -// hits that statement. (Unlike with -vmodule, the ".go" must be -// present.) -// -v=0 -// Enable V-leveled logging at the specified level. -// -vmodule="" -// The syntax of the argument is a comma-separated list of pattern=N, -// where pattern is a literal file name (minus the ".go" suffix) or -// "glob" pattern and N is a V level. For instance, -// -vmodule=gopher*=3 -// sets the V level to 3 in all Go files whose names begin "gopher". -// -package klog - -import ( - "bufio" - "bytes" - "errors" - "flag" - "fmt" - "io" - stdLog "log" - "math" - "os" - "path/filepath" - "runtime" - "strconv" - "strings" - "sync" - "sync/atomic" - "time" - - "github.com/go-logr/logr" -) - -// severity identifies the sort of log: info, warning etc. It also implements -// the flag.Value interface. The -stderrthreshold flag is of type severity and -// should be modified only through the flag.Value interface. The values match -// the corresponding constants in C++. -type severity int32 // sync/atomic int32 - -// These constants identify the log levels in order of increasing severity. -// A message written to a high-severity log file is also written to each -// lower-severity log file. -const ( - infoLog severity = iota - warningLog - errorLog - fatalLog - numSeverity = 4 -) - -const severityChar = "IWEF" - -var severityName = []string{ - infoLog: "INFO", - warningLog: "WARNING", - errorLog: "ERROR", - fatalLog: "FATAL", -} - -// get returns the value of the severity. -func (s *severity) get() severity { - return severity(atomic.LoadInt32((*int32)(s))) -} - -// set sets the value of the severity. -func (s *severity) set(val severity) { - atomic.StoreInt32((*int32)(s), int32(val)) -} - -// String is part of the flag.Value interface. -func (s *severity) String() string { - return strconv.FormatInt(int64(*s), 10) -} - -// Get is part of the flag.Getter interface. -func (s *severity) Get() interface{} { - return *s -} - -// Set is part of the flag.Value interface. -func (s *severity) Set(value string) error { - var threshold severity - // Is it a known name? - if v, ok := severityByName(value); ok { - threshold = v - } else { - v, err := strconv.ParseInt(value, 10, 32) - if err != nil { - return err - } - threshold = severity(v) - } - logging.stderrThreshold.set(threshold) - return nil -} - -func severityByName(s string) (severity, bool) { - s = strings.ToUpper(s) - for i, name := range severityName { - if name == s { - return severity(i), true - } - } - return 0, false -} - -// OutputStats tracks the number of output lines and bytes written. -type OutputStats struct { - lines int64 - bytes int64 -} - -// Lines returns the number of lines written. -func (s *OutputStats) Lines() int64 { - return atomic.LoadInt64(&s.lines) -} - -// Bytes returns the number of bytes written. -func (s *OutputStats) Bytes() int64 { - return atomic.LoadInt64(&s.bytes) -} - -// Stats tracks the number of lines of output and number of bytes -// per severity level. Values must be read with atomic.LoadInt64. -var Stats struct { - Info, Warning, Error OutputStats -} - -var severityStats = [numSeverity]*OutputStats{ - infoLog: &Stats.Info, - warningLog: &Stats.Warning, - errorLog: &Stats.Error, -} - -// Level is exported because it appears in the arguments to V and is -// the type of the v flag, which can be set programmatically. -// It's a distinct type because we want to discriminate it from logType. -// Variables of type level are only changed under logging.mu. -// The -v flag is read only with atomic ops, so the state of the logging -// module is consistent. - -// Level is treated as a sync/atomic int32. - -// Level specifies a level of verbosity for V logs. *Level implements -// flag.Value; the -v flag is of type Level and should be modified -// only through the flag.Value interface. -type Level int32 - -// get returns the value of the Level. -func (l *Level) get() Level { - return Level(atomic.LoadInt32((*int32)(l))) -} - -// set sets the value of the Level. -func (l *Level) set(val Level) { - atomic.StoreInt32((*int32)(l), int32(val)) -} - -// String is part of the flag.Value interface. -func (l *Level) String() string { - return strconv.FormatInt(int64(*l), 10) -} - -// Get is part of the flag.Getter interface. -func (l *Level) Get() interface{} { - return *l -} - -// Set is part of the flag.Value interface. -func (l *Level) Set(value string) error { - v, err := strconv.ParseInt(value, 10, 32) - if err != nil { - return err - } - logging.mu.Lock() - defer logging.mu.Unlock() - logging.setVState(Level(v), logging.vmodule.filter, false) - return nil -} - -// moduleSpec represents the setting of the -vmodule flag. -type moduleSpec struct { - filter []modulePat -} - -// modulePat contains a filter for the -vmodule flag. -// It holds a verbosity level and a file pattern to match. -type modulePat struct { - pattern string - literal bool // The pattern is a literal string - level Level -} - -// match reports whether the file matches the pattern. It uses a string -// comparison if the pattern contains no metacharacters. -func (m *modulePat) match(file string) bool { - if m.literal { - return file == m.pattern - } - match, _ := filepath.Match(m.pattern, file) - return match -} - -func (m *moduleSpec) String() string { - // Lock because the type is not atomic. TODO: clean this up. - logging.mu.Lock() - defer logging.mu.Unlock() - var b bytes.Buffer - for i, f := range m.filter { - if i > 0 { - b.WriteRune(',') - } - fmt.Fprintf(&b, "%s=%d", f.pattern, f.level) - } - return b.String() -} - -// Get is part of the (Go 1.2) flag.Getter interface. It always returns nil for this flag type since the -// struct is not exported. -func (m *moduleSpec) Get() interface{} { - return nil -} - -var errVmoduleSyntax = errors.New("syntax error: expect comma-separated list of filename=N") - -// Syntax: -vmodule=recordio=2,file=1,gfs*=3 -func (m *moduleSpec) Set(value string) error { - var filter []modulePat - for _, pat := range strings.Split(value, ",") { - if len(pat) == 0 { - // Empty strings such as from a trailing comma can be ignored. - continue - } - patLev := strings.Split(pat, "=") - if len(patLev) != 2 || len(patLev[0]) == 0 || len(patLev[1]) == 0 { - return errVmoduleSyntax - } - pattern := patLev[0] - v, err := strconv.ParseInt(patLev[1], 10, 32) - if err != nil { - return errors.New("syntax error: expect comma-separated list of filename=N") - } - if v < 0 { - return errors.New("negative value for vmodule level") - } - if v == 0 { - continue // Ignore. It's harmless but no point in paying the overhead. - } - // TODO: check syntax of filter? - filter = append(filter, modulePat{pattern, isLiteral(pattern), Level(v)}) - } - logging.mu.Lock() - defer logging.mu.Unlock() - logging.setVState(logging.verbosity, filter, true) - return nil -} - -// isLiteral reports whether the pattern is a literal string, that is, has no metacharacters -// that require filepath.Match to be called to match the pattern. -func isLiteral(pattern string) bool { - return !strings.ContainsAny(pattern, `\*?[]`) -} - -// traceLocation represents the setting of the -log_backtrace_at flag. -type traceLocation struct { - file string - line int -} - -// isSet reports whether the trace location has been specified. -// logging.mu is held. -func (t *traceLocation) isSet() bool { - return t.line > 0 -} - -// match reports whether the specified file and line matches the trace location. -// The argument file name is the full path, not the basename specified in the flag. -// logging.mu is held. -func (t *traceLocation) match(file string, line int) bool { - if t.line != line { - return false - } - if i := strings.LastIndex(file, "/"); i >= 0 { - file = file[i+1:] - } - return t.file == file -} - -func (t *traceLocation) String() string { - // Lock because the type is not atomic. TODO: clean this up. - logging.mu.Lock() - defer logging.mu.Unlock() - return fmt.Sprintf("%s:%d", t.file, t.line) -} - -// Get is part of the (Go 1.2) flag.Getter interface. It always returns nil for this flag type since the -// struct is not exported -func (t *traceLocation) Get() interface{} { - return nil -} - -var errTraceSyntax = errors.New("syntax error: expect file.go:234") - -// Syntax: -log_backtrace_at=gopherflakes.go:234 -// Note that unlike vmodule the file extension is included here. -func (t *traceLocation) Set(value string) error { - if value == "" { - // Unset. - logging.mu.Lock() - defer logging.mu.Unlock() - t.line = 0 - t.file = "" - return nil - } - fields := strings.Split(value, ":") - if len(fields) != 2 { - return errTraceSyntax - } - file, line := fields[0], fields[1] - if !strings.Contains(file, ".") { - return errTraceSyntax - } - v, err := strconv.Atoi(line) - if err != nil { - return errTraceSyntax - } - if v <= 0 { - return errors.New("negative or zero value for level") - } - logging.mu.Lock() - defer logging.mu.Unlock() - t.line = v - t.file = file - return nil -} - -// flushSyncWriter is the interface satisfied by logging destinations. -type flushSyncWriter interface { - Flush() error - Sync() error - io.Writer -} - -// init sets up the defaults and runs flushDaemon. -func init() { - logging.stderrThreshold = errorLog // Default stderrThreshold is ERROR. - logging.setVState(0, nil, false) - logging.logDir = "" - logging.logFile = "" - logging.logFileMaxSizeMB = 1800 - logging.toStderr = true - logging.alsoToStderr = false - logging.skipHeaders = false - logging.addDirHeader = false - logging.skipLogHeaders = false - go logging.flushDaemon() -} - -// InitFlags is for explicitly initializing the flags. -func InitFlags(flagset *flag.FlagSet) { - if flagset == nil { - flagset = flag.CommandLine - } - - flagset.StringVar(&logging.logDir, "log_dir", logging.logDir, "If non-empty, write log files in this directory") - flagset.StringVar(&logging.logFile, "log_file", logging.logFile, "If non-empty, use this log file") - flagset.Uint64Var(&logging.logFileMaxSizeMB, "log_file_max_size", logging.logFileMaxSizeMB, - "Defines the maximum size a log file can grow to. Unit is megabytes. "+ - "If the value is 0, the maximum file size is unlimited.") - flagset.BoolVar(&logging.toStderr, "logtostderr", logging.toStderr, "log to standard error instead of files") - flagset.BoolVar(&logging.alsoToStderr, "alsologtostderr", logging.alsoToStderr, "log to standard error as well as files") - flagset.Var(&logging.verbosity, "v", "number for the log level verbosity") - flagset.BoolVar(&logging.addDirHeader, "add_dir_header", logging.addDirHeader, "If true, adds the file directory to the header of the log messages") - flagset.BoolVar(&logging.skipHeaders, "skip_headers", logging.skipHeaders, "If true, avoid header prefixes in the log messages") - flagset.BoolVar(&logging.skipLogHeaders, "skip_log_headers", logging.skipLogHeaders, "If true, avoid headers when opening log files") - flagset.Var(&logging.stderrThreshold, "stderrthreshold", "logs at or above this threshold go to stderr") - flagset.Var(&logging.vmodule, "vmodule", "comma-separated list of pattern=N settings for file-filtered logging") - flagset.Var(&logging.traceLocation, "log_backtrace_at", "when logging hits line file:N, emit a stack trace") -} - -// Flush flushes all pending log I/O. -func Flush() { - logging.lockAndFlushAll() -} - -// loggingT collects all the global state of the logging setup. -type loggingT struct { - // Boolean flags. Not handled atomically because the flag.Value interface - // does not let us avoid the =true, and that shorthand is necessary for - // compatibility. TODO: does this matter enough to fix? Seems unlikely. - toStderr bool // The -logtostderr flag. - alsoToStderr bool // The -alsologtostderr flag. - - // Level flag. Handled atomically. - stderrThreshold severity // The -stderrthreshold flag. - - // freeList is a list of byte buffers, maintained under freeListMu. - freeList *buffer - // freeListMu maintains the free list. It is separate from the main mutex - // so buffers can be grabbed and printed to without holding the main lock, - // for better parallelization. - freeListMu sync.Mutex - - // mu protects the remaining elements of this structure and is - // used to synchronize logging. - mu sync.Mutex - // file holds writer for each of the log types. - file [numSeverity]flushSyncWriter - // pcs is used in V to avoid an allocation when computing the caller's PC. - pcs [1]uintptr - // vmap is a cache of the V Level for each V() call site, identified by PC. - // It is wiped whenever the vmodule flag changes state. - vmap map[uintptr]Level - // filterLength stores the length of the vmodule filter chain. If greater - // than zero, it means vmodule is enabled. It may be read safely - // using sync.LoadInt32, but is only modified under mu. - filterLength int32 - // traceLocation is the state of the -log_backtrace_at flag. - traceLocation traceLocation - // These flags are modified only under lock, although verbosity may be fetched - // safely using atomic.LoadInt32. - vmodule moduleSpec // The state of the -vmodule flag. - verbosity Level // V logging level, the value of the -v flag/ - - // If non-empty, overrides the choice of directory in which to write logs. - // See createLogDirs for the full list of possible destinations. - logDir string - - // If non-empty, specifies the path of the file to write logs. mutually exclusive - // with the log_dir option. - logFile string - - // When logFile is specified, this limiter makes sure the logFile won't exceeds a certain size. When exceeds, the - // logFile will be cleaned up. If this value is 0, no size limitation will be applied to logFile. - logFileMaxSizeMB uint64 - - // If true, do not add the prefix headers, useful when used with SetOutput - skipHeaders bool - - // If true, do not add the headers to log files - skipLogHeaders bool - - // If true, add the file directory to the header - addDirHeader bool - - // If set, all output will be redirected unconditionally to the provided logr.Logger - logr logr.Logger -} - -// buffer holds a byte Buffer for reuse. The zero value is ready for use. -type buffer struct { - bytes.Buffer - tmp [64]byte // temporary byte array for creating headers. - next *buffer -} - -var logging loggingT - -// setVState sets a consistent state for V logging. -// l.mu is held. -func (l *loggingT) setVState(verbosity Level, filter []modulePat, setFilter bool) { - // Turn verbosity off so V will not fire while we are in transition. - l.verbosity.set(0) - // Ditto for filter length. - atomic.StoreInt32(&l.filterLength, 0) - - // Set the new filters and wipe the pc->Level map if the filter has changed. - if setFilter { - l.vmodule.filter = filter - l.vmap = make(map[uintptr]Level) - } - - // Things are consistent now, so enable filtering and verbosity. - // They are enabled in order opposite to that in V. - atomic.StoreInt32(&l.filterLength, int32(len(filter))) - l.verbosity.set(verbosity) -} - -// getBuffer returns a new, ready-to-use buffer. -func (l *loggingT) getBuffer() *buffer { - l.freeListMu.Lock() - b := l.freeList - if b != nil { - l.freeList = b.next - } - l.freeListMu.Unlock() - if b == nil { - b = new(buffer) - } else { - b.next = nil - b.Reset() - } - return b -} - -// putBuffer returns a buffer to the free list. -func (l *loggingT) putBuffer(b *buffer) { - if b.Len() >= 256 { - // Let big buffers die a natural death. - return - } - l.freeListMu.Lock() - b.next = l.freeList - l.freeList = b - l.freeListMu.Unlock() -} - -var timeNow = time.Now // Stubbed out for testing. - -/* -header formats a log header as defined by the C++ implementation. -It returns a buffer containing the formatted header and the user's file and line number. -The depth specifies how many stack frames above lives the source line to be identified in the log message. - -Log lines have this form: - Lmmdd hh:mm:ss.uuuuuu threadid file:line] msg... -where the fields are defined as follows: - L A single character, representing the log level (eg 'I' for INFO) - mm The month (zero padded; ie May is '05') - dd The day (zero padded) - hh:mm:ss.uuuuuu Time in hours, minutes and fractional seconds - threadid The space-padded thread ID as returned by GetTID() - file The file name - line The line number - msg The user-supplied message -*/ -func (l *loggingT) header(s severity, depth int) (*buffer, string, int) { - _, file, line, ok := runtime.Caller(3 + depth) - if !ok { - file = "???" - line = 1 - } else { - if slash := strings.LastIndex(file, "/"); slash >= 0 { - path := file - file = path[slash+1:] - if l.addDirHeader { - if dirsep := strings.LastIndex(path[:slash], "/"); dirsep >= 0 { - file = path[dirsep+1:] - } - } - } - } - return l.formatHeader(s, file, line), file, line -} - -// formatHeader formats a log header using the provided file name and line number. -func (l *loggingT) formatHeader(s severity, file string, line int) *buffer { - now := timeNow() - if line < 0 { - line = 0 // not a real line number, but acceptable to someDigits - } - if s > fatalLog { - s = infoLog // for safety. - } - buf := l.getBuffer() - if l.skipHeaders { - return buf - } - - // Avoid Fprintf, for speed. The format is so simple that we can do it quickly by hand. - // It's worth about 3X. Fprintf is hard. - _, month, day := now.Date() - hour, minute, second := now.Clock() - // Lmmdd hh:mm:ss.uuuuuu threadid file:line] - buf.tmp[0] = severityChar[s] - buf.twoDigits(1, int(month)) - buf.twoDigits(3, day) - buf.tmp[5] = ' ' - buf.twoDigits(6, hour) - buf.tmp[8] = ':' - buf.twoDigits(9, minute) - buf.tmp[11] = ':' - buf.twoDigits(12, second) - buf.tmp[14] = '.' - buf.nDigits(6, 15, now.Nanosecond()/1000, '0') - buf.tmp[21] = ' ' - buf.nDigits(7, 22, pid, ' ') // TODO: should be TID - buf.tmp[29] = ' ' - buf.Write(buf.tmp[:30]) - buf.WriteString(file) - buf.tmp[0] = ':' - n := buf.someDigits(1, line) - buf.tmp[n+1] = ']' - buf.tmp[n+2] = ' ' - buf.Write(buf.tmp[:n+3]) - return buf -} - -// Some custom tiny helper functions to print the log header efficiently. - -const digits = "0123456789" - -// twoDigits formats a zero-prefixed two-digit integer at buf.tmp[i]. -func (buf *buffer) twoDigits(i, d int) { - buf.tmp[i+1] = digits[d%10] - d /= 10 - buf.tmp[i] = digits[d%10] -} - -// nDigits formats an n-digit integer at buf.tmp[i], -// padding with pad on the left. -// It assumes d >= 0. -func (buf *buffer) nDigits(n, i, d int, pad byte) { - j := n - 1 - for ; j >= 0 && d > 0; j-- { - buf.tmp[i+j] = digits[d%10] - d /= 10 - } - for ; j >= 0; j-- { - buf.tmp[i+j] = pad - } -} - -// someDigits formats a zero-prefixed variable-width integer at buf.tmp[i]. -func (buf *buffer) someDigits(i, d int) int { - // Print into the top, then copy down. We know there's space for at least - // a 10-digit number. - j := len(buf.tmp) - for { - j-- - buf.tmp[j] = digits[d%10] - d /= 10 - if d == 0 { - break - } - } - return copy(buf.tmp[i:], buf.tmp[j:]) -} - -func (l *loggingT) println(s severity, logr logr.InfoLogger, args ...interface{}) { - buf, file, line := l.header(s, 0) - // if logr is set, we clear the generated header as we rely on the backing - // logr implementation to print headers - if logr != nil { - l.putBuffer(buf) - buf = l.getBuffer() - } - fmt.Fprintln(buf, args...) - l.output(s, logr, buf, file, line, false) -} - -func (l *loggingT) print(s severity, logr logr.InfoLogger, args ...interface{}) { - l.printDepth(s, logr, 1, args...) -} - -func (l *loggingT) printDepth(s severity, logr logr.InfoLogger, depth int, args ...interface{}) { - buf, file, line := l.header(s, depth) - // if logr is set, we clear the generated header as we rely on the backing - // logr implementation to print headers - if logr != nil { - l.putBuffer(buf) - buf = l.getBuffer() - } - fmt.Fprint(buf, args...) - if buf.Bytes()[buf.Len()-1] != '\n' { - buf.WriteByte('\n') - } - l.output(s, logr, buf, file, line, false) -} - -func (l *loggingT) printf(s severity, logr logr.InfoLogger, format string, args ...interface{}) { - buf, file, line := l.header(s, 0) - // if logr is set, we clear the generated header as we rely on the backing - // logr implementation to print headers - if logr != nil { - l.putBuffer(buf) - buf = l.getBuffer() - } - fmt.Fprintf(buf, format, args...) - if buf.Bytes()[buf.Len()-1] != '\n' { - buf.WriteByte('\n') - } - l.output(s, logr, buf, file, line, false) -} - -// printWithFileLine behaves like print but uses the provided file and line number. If -// alsoLogToStderr is true, the log message always appears on standard error; it -// will also appear in the log file unless --logtostderr is set. -func (l *loggingT) printWithFileLine(s severity, logr logr.InfoLogger, file string, line int, alsoToStderr bool, args ...interface{}) { - buf := l.formatHeader(s, file, line) - // if logr is set, we clear the generated header as we rely on the backing - // logr implementation to print headers - if logr != nil { - l.putBuffer(buf) - buf = l.getBuffer() - } - fmt.Fprint(buf, args...) - if buf.Bytes()[buf.Len()-1] != '\n' { - buf.WriteByte('\n') - } - l.output(s, logr, buf, file, line, alsoToStderr) -} - -// printS if loggr is specified, no need to output with logging module. If -// err arguments is specified, will call logr.Error, or output to errorLog severity -func (l *loggingT) printS(err error, loggr logr.Logger, msg string, keysAndValues ...interface{}) { - if loggr != nil { - if err != nil { - loggr.Error(err, msg, keysAndValues) - } else { - loggr.Info(msg, keysAndValues) - } - return - } - b := &bytes.Buffer{} - b.WriteString(fmt.Sprintf("%q", msg)) - if err != nil { - b.WriteByte(' ') - b.WriteString(fmt.Sprintf("err=%q", err.Error())) - } - kvListFormat(b, keysAndValues...) - var s severity - if err == nil { - s = infoLog - } else { - s = errorLog - } - l.printDepth(s, logging.logr, 1, b) -} - -const missingValue = "(MISSING)" - -func kvListFormat(b *bytes.Buffer, keysAndValues ...interface{}) { - for i := 0; i < len(keysAndValues); i += 2 { - var v interface{} - k := keysAndValues[i] - if i+1 < len(keysAndValues) { - v = keysAndValues[i+1] - } else { - v = missingValue - } - b.WriteByte(' ') - if _, ok := v.(fmt.Stringer); ok { - b.WriteString(fmt.Sprintf("%s=%q", k, v)) - } else { - b.WriteString(fmt.Sprintf("%s=%#v", k, v)) - } - } -} - -// redirectBuffer is used to set an alternate destination for the logs -type redirectBuffer struct { - w io.Writer -} - -func (rb *redirectBuffer) Sync() error { - return nil -} - -func (rb *redirectBuffer) Flush() error { - return nil -} - -func (rb *redirectBuffer) Write(bytes []byte) (n int, err error) { - return rb.w.Write(bytes) -} - -// SetLogger will set the backing logr implementation for klog. -// If set, all log lines will be suppressed from the regular Output, and -// redirected to the logr implementation. -// All log lines include the 'severity', 'file' and 'line' values attached as -// structured logging values. -// Use as: -// ... -// klog.SetLogger(zapr.NewLogger(zapLog)) -func SetLogger(logr logr.Logger) { - logging.logr = logr -} - -// SetOutput sets the output destination for all severities -func SetOutput(w io.Writer) { - logging.mu.Lock() - defer logging.mu.Unlock() - for s := fatalLog; s >= infoLog; s-- { - rb := &redirectBuffer{ - w: w, - } - logging.file[s] = rb - } -} - -// SetOutputBySeverity sets the output destination for specific severity -func SetOutputBySeverity(name string, w io.Writer) { - logging.mu.Lock() - defer logging.mu.Unlock() - sev, ok := severityByName(name) - if !ok { - panic(fmt.Sprintf("SetOutputBySeverity(%q): unrecognized severity name", name)) - } - rb := &redirectBuffer{ - w: w, - } - logging.file[sev] = rb -} - -// output writes the data to the log files and releases the buffer. -func (l *loggingT) output(s severity, log logr.InfoLogger, buf *buffer, file string, line int, alsoToStderr bool) { - l.mu.Lock() - if l.traceLocation.isSet() { - if l.traceLocation.match(file, line) { - buf.Write(stacks(false)) - } - } - data := buf.Bytes() - if log != nil { - // TODO: set 'severity' and caller information as structured log info - // keysAndValues := []interface{}{"severity", severityName[s], "file", file, "line", line} - if s == errorLog { - l.logr.Error(nil, string(data)) - } else { - log.Info(string(data)) - } - } else if l.toStderr { - os.Stderr.Write(data) - } else { - if alsoToStderr || l.alsoToStderr || s >= l.stderrThreshold.get() { - os.Stderr.Write(data) - } - - if logging.logFile != "" { - // Since we are using a single log file, all of the items in l.file array - // will point to the same file, so just use one of them to write data. - if l.file[infoLog] == nil { - if err := l.createFiles(infoLog); err != nil { - os.Stderr.Write(data) // Make sure the message appears somewhere. - l.exit(err) - } - } - l.file[infoLog].Write(data) - } else { - if l.file[s] == nil { - if err := l.createFiles(s); err != nil { - os.Stderr.Write(data) // Make sure the message appears somewhere. - l.exit(err) - } - } - - switch s { - case fatalLog: - l.file[fatalLog].Write(data) - fallthrough - case errorLog: - l.file[errorLog].Write(data) - fallthrough - case warningLog: - l.file[warningLog].Write(data) - fallthrough - case infoLog: - l.file[infoLog].Write(data) - } - } - } - if s == fatalLog { - // If we got here via Exit rather than Fatal, print no stacks. - if atomic.LoadUint32(&fatalNoStacks) > 0 { - l.mu.Unlock() - timeoutFlush(10 * time.Second) - os.Exit(1) - } - // Dump all goroutine stacks before exiting. - trace := stacks(true) - // Write the stack trace for all goroutines to the stderr. - if l.toStderr || l.alsoToStderr || s >= l.stderrThreshold.get() || alsoToStderr { - os.Stderr.Write(trace) - } - // Write the stack trace for all goroutines to the files. - logExitFunc = func(error) {} // If we get a write error, we'll still exit below. - for log := fatalLog; log >= infoLog; log-- { - if f := l.file[log]; f != nil { // Can be nil if -logtostderr is set. - f.Write(trace) - } - } - l.mu.Unlock() - timeoutFlush(10 * time.Second) - os.Exit(255) // C++ uses -1, which is silly because it's anded with 255 anyway. - } - l.putBuffer(buf) - l.mu.Unlock() - if stats := severityStats[s]; stats != nil { - atomic.AddInt64(&stats.lines, 1) - atomic.AddInt64(&stats.bytes, int64(len(data))) - } -} - -// timeoutFlush calls Flush and returns when it completes or after timeout -// elapses, whichever happens first. This is needed because the hooks invoked -// by Flush may deadlock when klog.Fatal is called from a hook that holds -// a lock. -func timeoutFlush(timeout time.Duration) { - done := make(chan bool, 1) - go func() { - Flush() // calls logging.lockAndFlushAll() - done <- true - }() - select { - case <-done: - case <-time.After(timeout): - fmt.Fprintln(os.Stderr, "klog: Flush took longer than", timeout) - } -} - -// stacks is a wrapper for runtime.Stack that attempts to recover the data for all goroutines. -func stacks(all bool) []byte { - // We don't know how big the traces are, so grow a few times if they don't fit. Start large, though. - n := 10000 - if all { - n = 100000 - } - var trace []byte - for i := 0; i < 5; i++ { - trace = make([]byte, n) - nbytes := runtime.Stack(trace, all) - if nbytes < len(trace) { - return trace[:nbytes] - } - n *= 2 - } - return trace -} - -// logExitFunc provides a simple mechanism to override the default behavior -// of exiting on error. Used in testing and to guarantee we reach a required exit -// for fatal logs. Instead, exit could be a function rather than a method but that -// would make its use clumsier. -var logExitFunc func(error) - -// exit is called if there is trouble creating or writing log files. -// It flushes the logs and exits the program; there's no point in hanging around. -// l.mu is held. -func (l *loggingT) exit(err error) { - fmt.Fprintf(os.Stderr, "log: exiting because of error: %s\n", err) - // If logExitFunc is set, we do that instead of exiting. - if logExitFunc != nil { - logExitFunc(err) - return - } - l.flushAll() - os.Exit(2) -} - -// syncBuffer joins a bufio.Writer to its underlying file, providing access to the -// file's Sync method and providing a wrapper for the Write method that provides log -// file rotation. There are conflicting methods, so the file cannot be embedded. -// l.mu is held for all its methods. -type syncBuffer struct { - logger *loggingT - *bufio.Writer - file *os.File - sev severity - nbytes uint64 // The number of bytes written to this file - maxbytes uint64 // The max number of bytes this syncBuffer.file can hold before cleaning up. -} - -func (sb *syncBuffer) Sync() error { - return sb.file.Sync() -} - -// CalculateMaxSize returns the real max size in bytes after considering the default max size and the flag options. -func CalculateMaxSize() uint64 { - if logging.logFile != "" { - if logging.logFileMaxSizeMB == 0 { - // If logFileMaxSizeMB is zero, we don't have limitations on the log size. - return math.MaxUint64 - } - // Flag logFileMaxSizeMB is in MB for user convenience. - return logging.logFileMaxSizeMB * 1024 * 1024 - } - // If "log_file" flag is not specified, the target file (sb.file) will be cleaned up when reaches a fixed size. - return MaxSize -} - -func (sb *syncBuffer) Write(p []byte) (n int, err error) { - if sb.nbytes+uint64(len(p)) >= sb.maxbytes { - if err := sb.rotateFile(time.Now(), false); err != nil { - sb.logger.exit(err) - } - } - n, err = sb.Writer.Write(p) - sb.nbytes += uint64(n) - if err != nil { - sb.logger.exit(err) - } - return -} - -// rotateFile closes the syncBuffer's file and starts a new one. -// The startup argument indicates whether this is the initial startup of klog. -// If startup is true, existing files are opened for appending instead of truncated. -func (sb *syncBuffer) rotateFile(now time.Time, startup bool) error { - if sb.file != nil { - sb.Flush() - sb.file.Close() - } - var err error - sb.file, _, err = create(severityName[sb.sev], now, startup) - sb.nbytes = 0 - if err != nil { - return err - } - - sb.Writer = bufio.NewWriterSize(sb.file, bufferSize) - - if sb.logger.skipLogHeaders { - return nil - } - - // Write header. - var buf bytes.Buffer - fmt.Fprintf(&buf, "Log file created at: %s\n", now.Format("2006/01/02 15:04:05")) - fmt.Fprintf(&buf, "Running on machine: %s\n", host) - fmt.Fprintf(&buf, "Binary: Built with %s %s for %s/%s\n", runtime.Compiler, runtime.Version(), runtime.GOOS, runtime.GOARCH) - fmt.Fprintf(&buf, "Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg\n") - n, err := sb.file.Write(buf.Bytes()) - sb.nbytes += uint64(n) - return err -} - -// bufferSize sizes the buffer associated with each log file. It's large -// so that log records can accumulate without the logging thread blocking -// on disk I/O. The flushDaemon will block instead. -const bufferSize = 256 * 1024 - -// createFiles creates all the log files for severity from sev down to infoLog. -// l.mu is held. -func (l *loggingT) createFiles(sev severity) error { - now := time.Now() - // Files are created in decreasing severity order, so as soon as we find one - // has already been created, we can stop. - for s := sev; s >= infoLog && l.file[s] == nil; s-- { - sb := &syncBuffer{ - logger: l, - sev: s, - maxbytes: CalculateMaxSize(), - } - if err := sb.rotateFile(now, true); err != nil { - return err - } - l.file[s] = sb - } - return nil -} - -const flushInterval = 5 * time.Second - -// flushDaemon periodically flushes the log file buffers. -func (l *loggingT) flushDaemon() { - for range time.NewTicker(flushInterval).C { - l.lockAndFlushAll() - } -} - -// lockAndFlushAll is like flushAll but locks l.mu first. -func (l *loggingT) lockAndFlushAll() { - l.mu.Lock() - l.flushAll() - l.mu.Unlock() -} - -// flushAll flushes all the logs and attempts to "sync" their data to disk. -// l.mu is held. -func (l *loggingT) flushAll() { - // Flush from fatal down, in case there's trouble flushing. - for s := fatalLog; s >= infoLog; s-- { - file := l.file[s] - if file != nil { - file.Flush() // ignore error - file.Sync() // ignore error - } - } -} - -// CopyStandardLogTo arranges for messages written to the Go "log" package's -// default logs to also appear in the Google logs for the named and lower -// severities. Subsequent changes to the standard log's default output location -// or format may break this behavior. -// -// Valid names are "INFO", "WARNING", "ERROR", and "FATAL". If the name is not -// recognized, CopyStandardLogTo panics. -func CopyStandardLogTo(name string) { - sev, ok := severityByName(name) - if !ok { - panic(fmt.Sprintf("log.CopyStandardLogTo(%q): unrecognized severity name", name)) - } - // Set a log format that captures the user's file and line: - // d.go:23: message - stdLog.SetFlags(stdLog.Lshortfile) - stdLog.SetOutput(logBridge(sev)) -} - -// logBridge provides the Write method that enables CopyStandardLogTo to connect -// Go's standard logs to the logs provided by this package. -type logBridge severity - -// Write parses the standard logging line and passes its components to the -// logger for severity(lb). -func (lb logBridge) Write(b []byte) (n int, err error) { - var ( - file = "???" - line = 1 - text string - ) - // Split "d.go:23: message" into "d.go", "23", and "message". - if parts := bytes.SplitN(b, []byte{':'}, 3); len(parts) != 3 || len(parts[0]) < 1 || len(parts[2]) < 1 { - text = fmt.Sprintf("bad log format: %s", b) - } else { - file = string(parts[0]) - text = string(parts[2][1:]) // skip leading space - line, err = strconv.Atoi(string(parts[1])) - if err != nil { - text = fmt.Sprintf("bad line number: %s", b) - line = 1 - } - } - // printWithFileLine with alsoToStderr=true, so standard log messages - // always appear on standard error. - logging.printWithFileLine(severity(lb), logging.logr, file, line, true, text) - return len(b), nil -} - -// setV computes and remembers the V level for a given PC -// when vmodule is enabled. -// File pattern matching takes the basename of the file, stripped -// of its .go suffix, and uses filepath.Match, which is a little more -// general than the *? matching used in C++. -// l.mu is held. -func (l *loggingT) setV(pc uintptr) Level { - fn := runtime.FuncForPC(pc) - file, _ := fn.FileLine(pc) - // The file is something like /a/b/c/d.go. We want just the d. - if strings.HasSuffix(file, ".go") { - file = file[:len(file)-3] - } - if slash := strings.LastIndex(file, "/"); slash >= 0 { - file = file[slash+1:] - } - for _, filter := range l.vmodule.filter { - if filter.match(file) { - l.vmap[pc] = filter.level - return filter.level - } - } - l.vmap[pc] = 0 - return 0 -} - -// Verbose is a boolean type that implements Infof (like Printf) etc. -// See the documentation of V for more information. -type Verbose struct { - enabled bool - logr logr.InfoLogger -} - -func newVerbose(level Level, b bool) Verbose { - if logging.logr == nil { - return Verbose{b, nil} - } - return Verbose{b, logging.logr.V(int(level))} -} - -// V reports whether verbosity at the call site is at least the requested level. -// The returned value is a struct of type Verbose, which implements Info, Infoln -// and Infof. These methods will write to the Info log if called. -// Thus, one may write either -// if glog.V(2).Enabled() { klog.Info("log this") } -// or -// klog.V(2).Info("log this") -// The second form is shorter but the first is cheaper if logging is off because it does -// not evaluate its arguments. -// -// Whether an individual call to V generates a log record depends on the setting of -// the -v and --vmodule flags; both are off by default. If the level in the call to -// V is at least the value of -v, or of -vmodule for the source file containing the -// call, the V call will log. -func V(level Level) Verbose { - // This function tries hard to be cheap unless there's work to do. - // The fast path is two atomic loads and compares. - - // Here is a cheap but safe test to see if V logging is enabled globally. - if logging.verbosity.get() >= level { - return newVerbose(level, true) - } - - // It's off globally but it vmodule may still be set. - // Here is another cheap but safe test to see if vmodule is enabled. - if atomic.LoadInt32(&logging.filterLength) > 0 { - // Now we need a proper lock to use the logging structure. The pcs field - // is shared so we must lock before accessing it. This is fairly expensive, - // but if V logging is enabled we're slow anyway. - logging.mu.Lock() - defer logging.mu.Unlock() - if runtime.Callers(2, logging.pcs[:]) == 0 { - return newVerbose(level, false) - } - v, ok := logging.vmap[logging.pcs[0]] - if !ok { - v = logging.setV(logging.pcs[0]) - } - return newVerbose(level, v >= level) - } - return newVerbose(level, false) -} - -// Enabled will return true if this log level is enabled, guarded by the value -// of v. -// See the documentation of V for usage. -func (v Verbose) Enabled() bool { - return v.enabled -} - -// Info is equivalent to the global Info function, guarded by the value of v. -// See the documentation of V for usage. -func (v Verbose) Info(args ...interface{}) { - if v.enabled { - logging.print(infoLog, v.logr, args...) - } -} - -// Infoln is equivalent to the global Infoln function, guarded by the value of v. -// See the documentation of V for usage. -func (v Verbose) Infoln(args ...interface{}) { - if v.enabled { - logging.println(infoLog, v.logr, args...) - } -} - -// Infof is equivalent to the global Infof function, guarded by the value of v. -// See the documentation of V for usage. -func (v Verbose) Infof(format string, args ...interface{}) { - if v.enabled { - logging.printf(infoLog, v.logr, format, args...) - } -} - -// InfoS is equivalent to the global InfoS function, guarded by the value of v. -// See the documentation of V for usage. -func (v Verbose) InfoS(msg string, keysAndValues ...interface{}) { - if v.enabled { - if v.logr != nil { - v.logr.Info(msg, keysAndValues) - return - } - logging.printS(nil, nil, msg, keysAndValues...) - } -} - -// Info logs to the INFO log. -// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. -func Info(args ...interface{}) { - logging.print(infoLog, logging.logr, args...) -} - -// InfoDepth acts as Info but uses depth to determine which call frame to log. -// InfoDepth(0, "msg") is the same as Info("msg"). -func InfoDepth(depth int, args ...interface{}) { - logging.printDepth(infoLog, logging.logr, depth, args...) -} - -// Infoln logs to the INFO log. -// Arguments are handled in the manner of fmt.Println; a newline is always appended. -func Infoln(args ...interface{}) { - logging.println(infoLog, logging.logr, args...) -} - -// Infof logs to the INFO log. -// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. -func Infof(format string, args ...interface{}) { - logging.printf(infoLog, logging.logr, format, args...) -} - -// InfoS structured logs to the INFO log. -// The msg argument used to add constant description to the log line. -// The key/value pairs would be join by "=" ; a newline is always appended. -// -// Basic examples: -// >> klog.InfoS("Pod status updated", "pod", "kubedns", "status", "ready") -// output: -// >> I1025 00:15:15.525108 1 controller_utils.go:116] "Pod status updated" pod="kubedns" status="ready" -func InfoS(msg string, keysAndValues ...interface{}) { - logging.printS(nil, logging.logr, msg, keysAndValues...) -} - -// Warning logs to the WARNING and INFO logs. -// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. -func Warning(args ...interface{}) { - logging.print(warningLog, logging.logr, args...) -} - -// WarningDepth acts as Warning but uses depth to determine which call frame to log. -// WarningDepth(0, "msg") is the same as Warning("msg"). -func WarningDepth(depth int, args ...interface{}) { - logging.printDepth(warningLog, logging.logr, depth, args...) -} - -// Warningln logs to the WARNING and INFO logs. -// Arguments are handled in the manner of fmt.Println; a newline is always appended. -func Warningln(args ...interface{}) { - logging.println(warningLog, logging.logr, args...) -} - -// Warningf logs to the WARNING and INFO logs. -// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. -func Warningf(format string, args ...interface{}) { - logging.printf(warningLog, logging.logr, format, args...) -} - -// Error logs to the ERROR, WARNING, and INFO logs. -// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. -func Error(args ...interface{}) { - logging.print(errorLog, logging.logr, args...) -} - -// ErrorDepth acts as Error but uses depth to determine which call frame to log. -// ErrorDepth(0, "msg") is the same as Error("msg"). -func ErrorDepth(depth int, args ...interface{}) { - logging.printDepth(errorLog, logging.logr, depth, args...) -} - -// Errorln logs to the ERROR, WARNING, and INFO logs. -// Arguments are handled in the manner of fmt.Println; a newline is always appended. -func Errorln(args ...interface{}) { - logging.println(errorLog, logging.logr, args...) -} - -// Errorf logs to the ERROR, WARNING, and INFO logs. -// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. -func Errorf(format string, args ...interface{}) { - logging.printf(errorLog, logging.logr, format, args...) -} - -// ErrorS structured logs to the ERROR, WARNING, and INFO logs. -// the err argument used as "err" field of log line. -// The msg argument used to add constant description to the log line. -// The key/value pairs would be join by "=" ; a newline is always appended. -// -// Basic examples: -// >> klog.ErrorS(err, "Failed to update pod status") -// output: -// >> E1025 00:15:15.525108 1 controller_utils.go:114] "Failed to update pod status" err="timeout" -func ErrorS(err error, msg string, keysAndValues ...interface{}) { - logging.printS(err, logging.logr, msg, keysAndValues...) -} - -// Fatal logs to the FATAL, ERROR, WARNING, and INFO logs, -// including a stack trace of all running goroutines, then calls os.Exit(255). -// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. -func Fatal(args ...interface{}) { - logging.print(fatalLog, logging.logr, args...) -} - -// FatalDepth acts as Fatal but uses depth to determine which call frame to log. -// FatalDepth(0, "msg") is the same as Fatal("msg"). -func FatalDepth(depth int, args ...interface{}) { - logging.printDepth(fatalLog, logging.logr, depth, args...) -} - -// Fatalln logs to the FATAL, ERROR, WARNING, and INFO logs, -// including a stack trace of all running goroutines, then calls os.Exit(255). -// Arguments are handled in the manner of fmt.Println; a newline is always appended. -func Fatalln(args ...interface{}) { - logging.println(fatalLog, logging.logr, args...) -} - -// Fatalf logs to the FATAL, ERROR, WARNING, and INFO logs, -// including a stack trace of all running goroutines, then calls os.Exit(255). -// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. -func Fatalf(format string, args ...interface{}) { - logging.printf(fatalLog, logging.logr, format, args...) -} - -// fatalNoStacks is non-zero if we are to exit without dumping goroutine stacks. -// It allows Exit and relatives to use the Fatal logs. -var fatalNoStacks uint32 - -// Exit logs to the FATAL, ERROR, WARNING, and INFO logs, then calls os.Exit(1). -// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. -func Exit(args ...interface{}) { - atomic.StoreUint32(&fatalNoStacks, 1) - logging.print(fatalLog, logging.logr, args...) -} - -// ExitDepth acts as Exit but uses depth to determine which call frame to log. -// ExitDepth(0, "msg") is the same as Exit("msg"). -func ExitDepth(depth int, args ...interface{}) { - atomic.StoreUint32(&fatalNoStacks, 1) - logging.printDepth(fatalLog, logging.logr, depth, args...) -} - -// Exitln logs to the FATAL, ERROR, WARNING, and INFO logs, then calls os.Exit(1). -func Exitln(args ...interface{}) { - atomic.StoreUint32(&fatalNoStacks, 1) - logging.println(fatalLog, logging.logr, args...) -} - -// Exitf logs to the FATAL, ERROR, WARNING, and INFO logs, then calls os.Exit(1). -// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. -func Exitf(format string, args ...interface{}) { - atomic.StoreUint32(&fatalNoStacks, 1) - logging.printf(fatalLog, logging.logr, format, args...) -} - -// ObjectRef references a kubernetes object -type ObjectRef struct { - Name string `json:"name"` - Namespace string `json:"namespace,omitempty"` -} - -func (ref ObjectRef) String() string { - if ref.Namespace != "" { - return fmt.Sprintf("%s/%s", ref.Namespace, ref.Name) - } - return ref.Name -} - -// KMetadata is a subset of the kubernetes k8s.io/apimachinery/pkg/apis/meta/v1.Object interface -// this interface may expand in the future, but will always be a subset of the -// kubernetes k8s.io/apimachinery/pkg/apis/meta/v1.Object interface -type KMetadata interface { - GetName() string - GetNamespace() string -} - -// KObj returns ObjectRef from ObjectMeta -func KObj(obj KMetadata) ObjectRef { - return ObjectRef{ - Name: obj.GetName(), - Namespace: obj.GetNamespace(), - } -} - -// KRef returns ObjectRef from name and namespace -func KRef(namespace, name string) ObjectRef { - return ObjectRef{ - Name: name, - Namespace: namespace, - } -} diff --git a/vendor/k8s.io/klog/v2/klog_file.go b/vendor/k8s.io/klog/v2/klog_file.go deleted file mode 100644 index 458456a4a..000000000 --- a/vendor/k8s.io/klog/v2/klog_file.go +++ /dev/null @@ -1,158 +0,0 @@ -// Go support for leveled logs, analogous to https://code.google.com/p/google-glog/ -// -// Copyright 2013 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// File I/O for logs. - -package klog - -import ( - "errors" - "fmt" - "os" - "os/user" - "path/filepath" - "runtime" - "strings" - "sync" - "time" -) - -// MaxSize is the maximum size of a log file in bytes. -var MaxSize uint64 = 1024 * 1024 * 1800 - -// logDirs lists the candidate directories for new log files. -var logDirs []string - -func createLogDirs() { - if logging.logDir != "" { - logDirs = append(logDirs, logging.logDir) - } - logDirs = append(logDirs, os.TempDir()) -} - -var ( - pid = os.Getpid() - program = filepath.Base(os.Args[0]) - host = "unknownhost" - userName = "unknownuser" -) - -func init() { - h, err := os.Hostname() - if err == nil { - host = shortHostname(h) - } - - // On Windows, the Go 'user' package requires netapi32.dll. - // This affects Windows Nano Server: - // https://github.com/golang/go/issues/21867 - // Fallback to using environment variables. - if runtime.GOOS == "windows" { - u := os.Getenv("USERNAME") - if len(u) == 0 { - return - } - // Sanitize the USERNAME since it may contain filepath separators. - u = strings.Replace(u, `\`, "_", -1) - - // user.Current().Username normally produces something like 'USERDOMAIN\USERNAME' - d := os.Getenv("USERDOMAIN") - if len(d) != 0 { - userName = d + "_" + u - } else { - userName = u - } - } else { - current, err := user.Current() - if err == nil { - userName = current.Username - } - } -} - -// shortHostname returns its argument, truncating at the first period. -// For instance, given "www.google.com" it returns "www". -func shortHostname(hostname string) string { - if i := strings.Index(hostname, "."); i >= 0 { - return hostname[:i] - } - return hostname -} - -// logName returns a new log file name containing tag, with start time t, and -// the name for the symlink for tag. -func logName(tag string, t time.Time) (name, link string) { - name = fmt.Sprintf("%s.%s.%s.log.%s.%04d%02d%02d-%02d%02d%02d.%d", - program, - host, - userName, - tag, - t.Year(), - t.Month(), - t.Day(), - t.Hour(), - t.Minute(), - t.Second(), - pid) - return name, program + "." + tag -} - -var onceLogDirs sync.Once - -// create creates a new log file and returns the file and its filename, which -// contains tag ("INFO", "FATAL", etc.) and t. If the file is created -// successfully, create also attempts to update the symlink for that tag, ignoring -// errors. -// The startup argument indicates whether this is the initial startup of klog. -// If startup is true, existing files are opened for appending instead of truncated. -func create(tag string, t time.Time, startup bool) (f *os.File, filename string, err error) { - if logging.logFile != "" { - f, err := openOrCreate(logging.logFile, startup) - if err == nil { - return f, logging.logFile, nil - } - return nil, "", fmt.Errorf("log: unable to create log: %v", err) - } - onceLogDirs.Do(createLogDirs) - if len(logDirs) == 0 { - return nil, "", errors.New("log: no log dirs") - } - name, link := logName(tag, t) - var lastErr error - for _, dir := range logDirs { - fname := filepath.Join(dir, name) - f, err := openOrCreate(fname, startup) - if err == nil { - symlink := filepath.Join(dir, link) - os.Remove(symlink) // ignore err - os.Symlink(name, symlink) // ignore err - return f, fname, nil - } - lastErr = err - } - return nil, "", fmt.Errorf("log: cannot create log: %v", lastErr) -} - -// The startup argument indicates whether this is the initial startup of klog. -// If startup is true, existing files are opened for appending instead of truncated. -func openOrCreate(name string, startup bool) (*os.File, error) { - if startup { - f, err := os.OpenFile(name, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666) - return f, err - } - f, err := os.Create(name) - return f, err -} diff --git a/vendor/k8s.io/utils/pointer/README.md b/vendor/k8s.io/utils/pointer/README.md deleted file mode 100644 index 2ca8073dc..000000000 --- a/vendor/k8s.io/utils/pointer/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Pointer - -This package provides some functions for pointer-based operations. diff --git a/vendor/k8s.io/utils/trace/trace.go b/vendor/k8s.io/utils/trace/trace.go index 247ff5371..3b424104a 100644 --- a/vendor/k8s.io/utils/trace/trace.go +++ b/vendor/k8s.io/utils/trace/trace.go @@ -22,7 +22,7 @@ import ( "math/rand" "time" - "k8s.io/klog/v2" + "k8s.io/klog" ) // Field is a key value pair that provides additional details about the trace. @@ -97,7 +97,7 @@ func (t *Trace) logWithStepThreshold(stepThreshold time.Duration) { lastStepTime := t.startTime for _, step := range t.steps { stepDuration := step.stepTime.Sub(lastStepTime) - if stepThreshold == 0 || stepDuration > stepThreshold || klog.V(4).Enabled() { + if stepThreshold == 0 || stepDuration > stepThreshold || klog.V(4) { buffer.WriteString(fmt.Sprintf("Trace[%d]: [%v] [%v] ", tracenum, step.stepTime.Sub(t.startTime), stepDuration)) buffer.WriteString(step.msg) if len(step.fields) > 0 { @@ -109,7 +109,7 @@ func (t *Trace) logWithStepThreshold(stepThreshold time.Duration) { lastStepTime = step.stepTime } stepDuration := endTime.Sub(lastStepTime) - if stepThreshold == 0 || stepDuration > stepThreshold || klog.V(4).Enabled() { + if stepThreshold == 0 || stepDuration > stepThreshold || klog.V(4) { buffer.WriteString(fmt.Sprintf("Trace[%d]: [%v] [%v] END\n", tracenum, endTime.Sub(t.startTime), stepDuration)) } diff --git a/vendor/kmodules.xyz/client-go/Makefile b/vendor/kmodules.xyz/client-go/Makefile index 20cef1a8c..fe919bb7c 100644 --- a/vendor/kmodules.xyz/client-go/Makefile +++ b/vendor/kmodules.xyz/client-go/Makefile @@ -45,7 +45,8 @@ endif ### These variables should not need tweaking. ### -SRC_DIRS := *.go admissionregistration api apiextensions apiregistration apps batch bin certificates core discovery dynamic extensions logs meta openapi policy rbac storage tools +SRC_PKGS := admissionregistration api apiextensions apiregistration apps batch bin certificates core discovery dynamic extensions logs meta openapi policy rbac storage tools +SRC_DIRS := $(SRC_PKGS) *.go DOCKER_PLATFORMS := linux/amd64 linux/arm linux/arm64 BIN_PLATFORMS := $(DOCKER_PLATFORMS) @@ -54,10 +55,10 @@ BIN_PLATFORMS := $(DOCKER_PLATFORMS) OS := $(if $(GOOS),$(GOOS),$(shell go env GOOS)) ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH)) -BASEIMAGE_PROD ?= gcr.io/distroless/static -BASEIMAGE_DBG ?= debian:stretch +BASEIMAGE_PROD ?= gcr.io/distroless/static-debian10 +BASEIMAGE_DBG ?= debian:buster -GO_VERSION ?= 1.14 +GO_VERSION ?= 1.15 BUILD_IMAGE ?= appscode/golang-dev:$(GO_VERSION) OUTBIN = bin/$(OS)_$(ARCH)/$(BIN) @@ -220,7 +221,7 @@ test: $(BUILD_DIRS) ARCH=$(ARCH) \ OS=$(OS) \ VERSION=$(VERSION) \ - ./hack/test.sh $(SRC_DIRS) \ + ./hack/test.sh $(SRC_PKGS) \ " ADDTL_LINTERS := goconst,gofmt,goimports,unparam diff --git a/vendor/kmodules.xyz/client-go/api/v1/certificates.go b/vendor/kmodules.xyz/client-go/api/v1/certificates.go index 0c7b2d9b9..6b545cded 100644 --- a/vendor/kmodules.xyz/client-go/api/v1/certificates.go +++ b/vendor/kmodules.xyz/client-go/api/v1/certificates.go @@ -46,40 +46,37 @@ type CertificateSpec struct { // +optional SecretName string `json:"secretName,omitempty" protobuf:"bytes,2,opt,name=secretName"` - // KeyEncoding is the private key cryptography standards (PKCS) - // for this certificate's private key to be encoded in. - // If provided, allowed values are "pkcs1" and "pkcs8". - // If KeyEncoding is not specified, then PKCS#1 will be used by default. - // +optional - KeyEncoding string `json:"keyEncoding,omitempty" protobuf:"bytes,3,opt,name=keyEncoding"` - // Full X509 name specification (https://golang.org/pkg/crypto/x509/pkix/#Name). // +optional - Subject *X509Subject `json:"subject,omitempty" protobuf:"bytes,4,opt,name=subject"` + Subject *X509Subject `json:"subject,omitempty" protobuf:"bytes,3,opt,name=subject"` // Certificate default Duration // +optional - Duration *metav1.Duration `json:"duration,omitempty" protobuf:"bytes,5,opt,name=duration"` + Duration *metav1.Duration `json:"duration,omitempty" protobuf:"bytes,4,opt,name=duration"` // Certificate renew before expiration duration // +optional - RenewBefore *metav1.Duration `json:"renewBefore,omitempty" protobuf:"bytes,6,opt,name=renewBefore"` + RenewBefore *metav1.Duration `json:"renewBefore,omitempty" protobuf:"bytes,5,opt,name=renewBefore"` // DNSNames is a list of subject alt names to be used on the Certificate. // +optional - DNSNames []string `json:"dnsNames,omitempty" protobuf:"bytes,7,rep,name=dnsNames"` + DNSNames []string `json:"dnsNames,omitempty" protobuf:"bytes,6,rep,name=dnsNames"` // IPAddresses is a list of IP addresses to be used on the Certificate // +optional - IPAddresses []string `json:"ipAddresses,omitempty" protobuf:"bytes,8,rep,name=ipAddresses"` + IPAddresses []string `json:"ipAddresses,omitempty" protobuf:"bytes,7,rep,name=ipAddresses"` // URIs is a list of URI subjectAltNames to be set on the Certificate. // +optional - URIs []string `json:"uris,omitempty" protobuf:"bytes,9,rep,name=uris"` + URIs []string `json:"uris,omitempty" protobuf:"bytes,8,rep,name=uris"` // EmailAddresses is a list of email subjectAltNames to be set on the Certificate. // +optional - EmailAddresses []string `json:"emailAddresses,omitempty" protobuf:"bytes,10,rep,name=emailAddresses"` + EmailAddresses []string `json:"emailAddresses,omitempty" protobuf:"bytes,9,rep,name=emailAddresses"` + + // Options to control private keys used for the Certificate. + // +optional + PrivateKey *CertificatePrivateKey `json:"privateKey,omitempty" protobuf:"bytes,10,opt,name=privateKey"` } // X509Subject Full X509 name specification @@ -110,6 +107,36 @@ type X509Subject struct { SerialNumber string `json:"serialNumber,omitempty" protobuf:"bytes,8,opt,name=serialNumber"` } +// +kubebuilder:validation:Enum=PKCS1;PKCS8 +type PrivateKeyEncoding string + +const ( + // PKCS1 key encoding will produce PEM files that include the type of + // private key as part of the PEM header, e.g. "BEGIN RSA PRIVATE KEY". + // If the keyAlgorithm is set to 'ECDSA', this will produce private keys + // that use the "BEGIN EC PRIVATE KEY" header. + PKCS1 PrivateKeyEncoding = "PKCS1" + + // PKCS8 key encoding will produce PEM files with the "BEGIN PRIVATE KEY" + // header. It encodes the keyAlgorithm of the private key as part of the + // DER encoded PEM block. + PKCS8 PrivateKeyEncoding = "PKCS8" +) + +// CertificatePrivateKey contains configuration options for private keys +// used by the Certificate controller. +// This allows control of how private keys are rotated. +type CertificatePrivateKey struct { + // The private key cryptography standards (PKCS) encoding for this + // certificate's private key to be encoded in. + // If provided, allowed values are "pkcs1" and "pkcs8" standing for PKCS#1 + // and PKCS#8, respectively. + // Defaults to PKCS#1 if not specified. + // See here for the difference between the formats: https://stackoverflow.com/a/48960291 + // +optional + Encoding PrivateKeyEncoding `json:"encoding,omitempty" protobuf:"bytes,1,opt,name=encoding,casttype=PrivateKeyEncoding"` +} + // HasCertificate returns "true" if the desired certificate provided in "aliaS" is present in the certificate list. // Otherwise, it returns "false". func HasCertificate(certificates []CertificateSpec, alias string) bool { diff --git a/vendor/kmodules.xyz/client-go/api/v1/conditions.go b/vendor/kmodules.xyz/client-go/api/v1/conditions.go index cdd1f7172..22792b6cc 100644 --- a/vendor/kmodules.xyz/client-go/api/v1/conditions.go +++ b/vendor/kmodules.xyz/client-go/api/v1/conditions.go @@ -28,7 +28,7 @@ const ( ConditionInitialized = "Initialized" ConditionReady = "Ready" ConditionAvailable = "Available" - ConditionFailure = "Failure" + ConditionFailed = "Failed" ConditionRequestApproved = "Approved" ConditionRequestDenied = "Denied" @@ -75,6 +75,22 @@ type Condition struct { Message string `json:"message" protobuf:"bytes,6,opt,name=message"` } +func NewCondition(reason string, message string, generation int64, conditionStatus ...bool) Condition { + cs := ConditionTrue + if len(conditionStatus) > 0 && !conditionStatus[0] { + cs = ConditionFalse + } + + return Condition{ + Type: reason, + Reason: reason, + Message: message, + Status: cs, + LastTransitionTime: metav1.Now(), + ObservedGeneration: generation, + } +} + // HasCondition returns "true" if the desired condition provided in "condType" is present in the condition list. // Otherwise, it returns "false". func HasCondition(conditions []Condition, condType string) bool { diff --git a/vendor/kmodules.xyz/client-go/api/v1/generated.pb.go b/vendor/kmodules.xyz/client-go/api/v1/generated.pb.go index de59a17fb..8c1ac3c28 100644 --- a/vendor/kmodules.xyz/client-go/api/v1/generated.pb.go +++ b/vendor/kmodules.xyz/client-go/api/v1/generated.pb.go @@ -43,10 +43,38 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *CertificatePrivateKey) Reset() { *m = CertificatePrivateKey{} } +func (*CertificatePrivateKey) ProtoMessage() {} +func (*CertificatePrivateKey) Descriptor() ([]byte, []int) { + return fileDescriptor_af8e7a11c7a1ccd9, []int{0} +} +func (m *CertificatePrivateKey) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CertificatePrivateKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *CertificatePrivateKey) XXX_Merge(src proto.Message) { + xxx_messageInfo_CertificatePrivateKey.Merge(m, src) +} +func (m *CertificatePrivateKey) XXX_Size() int { + return m.Size() +} +func (m *CertificatePrivateKey) XXX_DiscardUnknown() { + xxx_messageInfo_CertificatePrivateKey.DiscardUnknown(m) +} + +var xxx_messageInfo_CertificatePrivateKey proto.InternalMessageInfo + func (m *CertificateSpec) Reset() { *m = CertificateSpec{} } func (*CertificateSpec) ProtoMessage() {} func (*CertificateSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_af8e7a11c7a1ccd9, []int{0} + return fileDescriptor_af8e7a11c7a1ccd9, []int{1} } func (m *CertificateSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -74,7 +102,7 @@ var xxx_messageInfo_CertificateSpec proto.InternalMessageInfo func (m *Condition) Reset() { *m = Condition{} } func (*Condition) ProtoMessage() {} func (*Condition) Descriptor() ([]byte, []int) { - return fileDescriptor_af8e7a11c7a1ccd9, []int{1} + return fileDescriptor_af8e7a11c7a1ccd9, []int{2} } func (m *Condition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -102,7 +130,7 @@ var xxx_messageInfo_Condition proto.InternalMessageInfo func (m *TLSConfig) Reset() { *m = TLSConfig{} } func (*TLSConfig) ProtoMessage() {} func (*TLSConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_af8e7a11c7a1ccd9, []int{2} + return fileDescriptor_af8e7a11c7a1ccd9, []int{3} } func (m *TLSConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -130,7 +158,7 @@ var xxx_messageInfo_TLSConfig proto.InternalMessageInfo func (m *X509Subject) Reset() { *m = X509Subject{} } func (*X509Subject) ProtoMessage() {} func (*X509Subject) Descriptor() ([]byte, []int) { - return fileDescriptor_af8e7a11c7a1ccd9, []int{3} + return fileDescriptor_af8e7a11c7a1ccd9, []int{4} } func (m *X509Subject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -156,6 +184,7 @@ func (m *X509Subject) XXX_DiscardUnknown() { var xxx_messageInfo_X509Subject proto.InternalMessageInfo func init() { + proto.RegisterType((*CertificatePrivateKey)(nil), "kmodules.xyz.client_go.api.v1.CertificatePrivateKey") proto.RegisterType((*CertificateSpec)(nil), "kmodules.xyz.client_go.api.v1.CertificateSpec") proto.RegisterType((*Condition)(nil), "kmodules.xyz.client_go.api.v1.Condition") proto.RegisterType((*TLSConfig)(nil), "kmodules.xyz.client_go.api.v1.TLSConfig") @@ -167,65 +196,96 @@ func init() { } var fileDescriptor_af8e7a11c7a1ccd9 = []byte{ - // 921 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x4f, 0x6f, 0xe3, 0x44, - 0x14, 0x6f, 0x36, 0x69, 0x1b, 0x4f, 0xda, 0x46, 0x4c, 0x91, 0xb0, 0x2a, 0x88, 0x4b, 0x90, 0x50, - 0x00, 0xd5, 0xa1, 0x15, 0x2b, 0x76, 0x91, 0x38, 0xac, 0xc3, 0x0a, 0x15, 0x4a, 0x5b, 0x26, 0x5d, - 0x69, 0xb5, 0x17, 0x34, 0xb1, 0x5f, 0xdc, 0x21, 0x8e, 0xc7, 0x9a, 0x19, 0x07, 0xb2, 0x27, 0x3e, - 0x02, 0xdf, 0x8a, 0x1e, 0x97, 0xdb, 0x9e, 0x2c, 0x6a, 0x2e, 0x7c, 0x06, 0x2e, 0x20, 0x8f, 0x9d, - 0xd8, 0x69, 0xa3, 0x15, 0xe2, 0x66, 0xff, 0xfe, 0xcd, 0xcc, 0x9b, 0x37, 0x0f, 0x1d, 0x4d, 0xa6, - 0xdc, 0x8b, 0x03, 0x90, 0xf6, 0xcf, 0xf3, 0x97, 0x7d, 0x37, 0x60, 0x10, 0xaa, 0x23, 0x9f, 0xf7, - 0x69, 0xc4, 0xfa, 0xb3, 0xe3, 0xbe, 0x0f, 0x21, 0x08, 0xaa, 0xc0, 0xb3, 0x23, 0xc1, 0x15, 0xc7, - 0xef, 0x55, 0xe5, 0x76, 0x2e, 0xff, 0xc1, 0xe7, 0x36, 0x8d, 0x98, 0x3d, 0x3b, 0x3e, 0x38, 0xf2, - 0x99, 0xba, 0x8e, 0x47, 0xb6, 0xcb, 0xa7, 0x7d, 0x9f, 0xfb, 0xbc, 0xaf, 0x5d, 0xa3, 0x78, 0xac, - 0xff, 0xf4, 0x8f, 0xfe, 0xca, 0xd3, 0x0e, 0xba, 0x93, 0x47, 0xd2, 0x66, 0xf9, 0x62, 0x2e, 0x17, - 0xb0, 0x66, 0xc5, 0x83, 0xcf, 0x4a, 0xcd, 0x94, 0xba, 0xd7, 0x2c, 0x04, 0x31, 0xef, 0x47, 0x13, - 0x3f, 0x03, 0x64, 0x7f, 0x0a, 0x8a, 0xae, 0x71, 0x75, 0xff, 0x6a, 0xa0, 0xf6, 0x00, 0x84, 0x62, - 0x63, 0xe6, 0x52, 0x05, 0xc3, 0x08, 0x5c, 0xfc, 0x01, 0xda, 0xa4, 0x01, 0xa3, 0xd2, 0xac, 0x1d, - 0xd6, 0x7a, 0x86, 0xb3, 0x7b, 0x93, 0x58, 0x1b, 0x69, 0x62, 0x6d, 0x3e, 0xc9, 0x40, 0x92, 0x73, - 0xf8, 0x04, 0x21, 0x09, 0xae, 0x00, 0x75, 0x4e, 0xa7, 0x60, 0x3e, 0xd0, 0x4a, 0x5c, 0x28, 0xd1, - 0x70, 0xc9, 0x90, 0x8a, 0x0a, 0x3f, 0x44, 0xad, 0x09, 0xcc, 0x9f, 0x86, 0x2e, 0xf7, 0x58, 0xe8, - 0x9b, 0x75, 0x6d, 0xda, 0x2f, 0x4c, 0xad, 0x6f, 0x4b, 0x8a, 0x54, 0x75, 0xf8, 0x7b, 0xb4, 0x2d, - 0xe3, 0xd1, 0x8f, 0xe0, 0x2a, 0xb3, 0x71, 0x58, 0xeb, 0xb5, 0x4e, 0x3e, 0xb6, 0xdf, 0x58, 0x5d, - 0xfb, 0xf9, 0xc3, 0x4f, 0x1f, 0x0f, 0x73, 0x87, 0xd3, 0x4a, 0x13, 0x6b, 0xbb, 0xf8, 0x21, 0x8b, - 0x1c, 0xfc, 0x1c, 0x35, 0xbd, 0x58, 0x50, 0xc5, 0x78, 0x68, 0x6e, 0xea, 0x4c, 0xdb, 0xce, 0xeb, - 0x67, 0x57, 0xeb, 0x67, 0x47, 0x13, 0x3f, 0x03, 0xa4, 0x9d, 0xd5, 0x2f, 0x8b, 0xfe, 0xaa, 0x70, - 0x39, 0x3b, 0x69, 0x62, 0x35, 0x17, 0x7f, 0x64, 0x99, 0x86, 0x29, 0x6a, 0x09, 0x08, 0xe1, 0x27, - 0x07, 0xc6, 0x5c, 0x80, 0xb9, 0xf5, 0xbf, 0xc2, 0xdb, 0x59, 0x3d, 0x48, 0x19, 0x43, 0xaa, 0x99, - 0xb8, 0x87, 0x9a, 0x5e, 0x28, 0xb3, 0x8a, 0x4a, 0x73, 0xfb, 0xb0, 0xde, 0x33, 0x8a, 0xcd, 0x9c, - 0x0f, 0x35, 0x46, 0x96, 0x2c, 0x3e, 0x46, 0x2d, 0x16, 0x3d, 0xf1, 0x3c, 0x01, 0x52, 0x82, 0x34, - 0x9b, 0x5a, 0xac, 0xc3, 0x4f, 0x2f, 0x97, 0x30, 0xa9, 0x6a, 0xf0, 0xbb, 0xa8, 0x11, 0x0b, 0x26, - 0x4d, 0x43, 0x6b, 0x9b, 0x69, 0x62, 0x35, 0x9e, 0x91, 0x53, 0x49, 0x34, 0x8a, 0xbf, 0x40, 0x7b, - 0x30, 0xa5, 0x2c, 0x28, 0x33, 0x91, 0xd6, 0xe1, 0x34, 0xb1, 0xf6, 0x9e, 0xae, 0x30, 0xe4, 0x8e, - 0xb2, 0xfb, 0xcf, 0x03, 0x64, 0x0c, 0x78, 0xe8, 0x31, 0x5d, 0xa7, 0x43, 0xd4, 0x50, 0xf3, 0x08, - 0x8a, 0x1e, 0xdb, 0x29, 0x9a, 0xa0, 0x71, 0x35, 0x8f, 0x80, 0x68, 0x06, 0x3f, 0x46, 0x5b, 0x52, - 0x51, 0x15, 0xcb, 0xa2, 0xbb, 0xde, 0x2f, 0x34, 0x5b, 0x43, 0x8d, 0xfe, 0x9d, 0x58, 0xed, 0x65, - 0x5c, 0x0e, 0x91, 0xc2, 0x80, 0xbf, 0x41, 0x98, 0x8f, 0x24, 0x88, 0x19, 0x78, 0x5f, 0xe7, 0x0d, - 0x9f, 0x5d, 0x74, 0xd6, 0x6f, 0x75, 0xe7, 0xa0, 0x88, 0xc1, 0x17, 0xf7, 0x14, 0x64, 0x8d, 0x0b, - 0xcf, 0x10, 0x0e, 0xa8, 0x54, 0x57, 0x82, 0x86, 0x52, 0xaf, 0x75, 0xc5, 0xa6, 0x50, 0x36, 0xe2, - 0x7f, 0xb9, 0xd7, 0xcc, 0x51, 0xae, 0x7b, 0x76, 0x2f, 0x8d, 0xac, 0x59, 0x01, 0x7f, 0x88, 0xb6, - 0x04, 0x50, 0x59, 0x34, 0xa8, 0xe1, 0xec, 0x2d, 0x8e, 0x4f, 0x34, 0x4a, 0x0a, 0x16, 0x7f, 0x84, - 0xb6, 0xa7, 0x20, 0x25, 0xf5, 0xf3, 0x66, 0x33, 0x9c, 0x76, 0x21, 0xdc, 0xfe, 0x2e, 0x87, 0xc9, - 0x82, 0xef, 0xfe, 0x5e, 0x43, 0xc6, 0xd5, 0xd9, 0x70, 0xc0, 0xc3, 0x31, 0xf3, 0xf1, 0x0b, 0x64, - 0x30, 0x29, 0x63, 0x10, 0x04, 0xc6, 0xfa, 0x1a, 0x5a, 0x27, 0x47, 0x95, 0xf3, 0xd8, 0xd9, 0xa0, - 0xd1, 0xbb, 0x9f, 0x47, 0xe0, 0x9d, 0x71, 0x97, 0x06, 0x17, 0xf9, 0x2b, 0x82, 0x31, 0x08, 0x08, - 0x5d, 0x70, 0x76, 0xd3, 0xc4, 0x32, 0x4e, 0x17, 0x19, 0xa4, 0x8c, 0xc3, 0xd7, 0x68, 0xc7, 0x2d, - 0xa7, 0x4a, 0x76, 0x83, 0xf5, 0xfc, 0x19, 0xbc, 0xf1, 0xdd, 0xde, 0x19, 0x44, 0xce, 0xdb, 0xc5, - 0x49, 0x76, 0x2a, 0x84, 0x24, 0x2b, 0xc9, 0xdd, 0xdf, 0xea, 0xa8, 0x55, 0x79, 0xef, 0xf8, 0x73, - 0xb4, 0xcb, 0x85, 0x4f, 0x43, 0xf6, 0x52, 0x5f, 0x5f, 0x36, 0xc4, 0xb2, 0x06, 0x7d, 0x2b, 0x4d, - 0xac, 0xdd, 0x8b, 0x2a, 0x41, 0x56, 0x75, 0xf8, 0x13, 0x64, 0xb8, 0x3c, 0x0e, 0x95, 0x60, 0xc5, - 0x7e, 0x8d, 0xfc, 0x7c, 0x83, 0x05, 0x48, 0x4a, 0x1e, 0x9f, 0xa2, 0xfd, 0xaa, 0x9b, 0x06, 0xcf, - 0x42, 0xa6, 0xa4, 0x59, 0xd7, 0xb6, 0x77, 0xd2, 0xc4, 0xda, 0xbf, 0xb8, 0x4f, 0x93, 0x75, 0x1e, - 0x6c, 0x23, 0x14, 0x64, 0xc5, 0x65, 0x2a, 0x5b, 0xb8, 0xa1, 0x13, 0xf6, 0xb2, 0x21, 0x7a, 0xb6, - 0x44, 0x49, 0x45, 0x91, 0xed, 0x33, 0x12, 0x7c, 0xc6, 0x42, 0x17, 0xa4, 0xb9, 0x59, 0xee, 0xf3, - 0x72, 0x01, 0x92, 0x92, 0xc7, 0x5f, 0xa2, 0xb6, 0x54, 0x02, 0x40, 0x95, 0x0f, 0x76, 0x4b, 0x5b, - 0xf6, 0xd3, 0xc4, 0x6a, 0x0f, 0x57, 0x29, 0x72, 0x57, 0x9b, 0xcd, 0x8f, 0x88, 0x4b, 0x45, 0x83, - 0x01, 0xf7, 0x96, 0xc3, 0x46, 0xcf, 0x8f, 0xcb, 0x12, 0x26, 0x55, 0x0d, 0x7e, 0x84, 0x76, 0x24, - 0x08, 0x46, 0x83, 0xf3, 0x78, 0x3a, 0x02, 0x61, 0x36, 0x75, 0x4f, 0x2e, 0x6f, 0x72, 0x58, 0xe1, - 0xc8, 0x8a, 0xd2, 0xe9, 0xdd, 0xdc, 0x76, 0x36, 0x5e, 0xdd, 0x76, 0x36, 0x5e, 0xdf, 0x76, 0x36, - 0x7e, 0x49, 0x3b, 0xb5, 0x9b, 0xb4, 0x53, 0x7b, 0x95, 0x76, 0x6a, 0xaf, 0xd3, 0x4e, 0xed, 0x8f, - 0xb4, 0x53, 0xfb, 0xf5, 0xcf, 0xce, 0xc6, 0x8b, 0x07, 0xb3, 0xe3, 0x7f, 0x03, 0x00, 0x00, 0xff, - 0xff, 0x71, 0x7b, 0xcc, 0x87, 0x8c, 0x07, 0x00, 0x00, + // 962 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x41, 0x6f, 0xe3, 0x44, + 0x18, 0x6d, 0x36, 0x69, 0x9b, 0x4c, 0xda, 0x46, 0x4c, 0x41, 0x58, 0x15, 0xc4, 0x25, 0x48, 0xab, + 0xb2, 0xa8, 0x0e, 0xad, 0x16, 0xb1, 0x8b, 0xc4, 0x61, 0x5d, 0x56, 0xa8, 0x50, 0xda, 0x32, 0xe9, + 0x4a, 0xab, 0xe5, 0x80, 0x26, 0xf6, 0x17, 0x77, 0xa8, 0xe3, 0xb1, 0x66, 0xc6, 0x81, 0xec, 0x89, + 0x9f, 0xc0, 0x8d, 0x9f, 0x44, 0x8f, 0xcb, 0x6d, 0x4f, 0x16, 0x35, 0xff, 0x62, 0x2f, 0xa0, 0x19, + 0x3b, 0xb1, 0xb3, 0x8d, 0x60, 0xc5, 0xcd, 0xf3, 0xde, 0xfb, 0xde, 0x8c, 0xe7, 0x7b, 0xf3, 0xa1, + 0xfd, 0xab, 0x31, 0xf7, 0x93, 0x10, 0xa4, 0xf3, 0xf3, 0xf4, 0x79, 0xdf, 0x0b, 0x19, 0x44, 0x6a, + 0x3f, 0xe0, 0x7d, 0x1a, 0xb3, 0xfe, 0xe4, 0xa0, 0x1f, 0x40, 0x04, 0x82, 0x2a, 0xf0, 0x9d, 0x58, + 0x70, 0xc5, 0xf1, 0xfb, 0x55, 0xb9, 0x93, 0xcb, 0x7f, 0x08, 0xb8, 0x43, 0x63, 0xe6, 0x4c, 0x0e, + 0x76, 0xf6, 0x03, 0xa6, 0x2e, 0x93, 0xa1, 0xe3, 0xf1, 0x71, 0x3f, 0xe0, 0x01, 0xef, 0x9b, 0xaa, + 0x61, 0x32, 0x32, 0x2b, 0xb3, 0x30, 0x5f, 0xb9, 0xdb, 0x4e, 0xef, 0xea, 0x81, 0x74, 0x58, 0xbe, + 0x99, 0xc7, 0x05, 0x2c, 0xd9, 0x71, 0xe7, 0x7e, 0xa9, 0x19, 0x53, 0xef, 0x92, 0x45, 0x20, 0xa6, + 0xfd, 0xf8, 0x2a, 0xd0, 0x80, 0xec, 0x8f, 0x41, 0xd1, 0x25, 0x55, 0xbd, 0xef, 0xd1, 0x3b, 0x47, + 0x20, 0x14, 0x1b, 0x31, 0x8f, 0x2a, 0x38, 0x17, 0x6c, 0x42, 0x15, 0x7c, 0x03, 0x53, 0xec, 0xa2, + 0x26, 0x44, 0x1e, 0xf7, 0x59, 0x14, 0x58, 0xb5, 0xdd, 0xda, 0x5e, 0xcb, 0xbd, 0x7b, 0x9d, 0xda, + 0x2b, 0x59, 0x6a, 0x37, 0x1f, 0x17, 0xf8, 0xab, 0xd4, 0xc6, 0x65, 0xc5, 0x0c, 0x25, 0xf3, 0xba, + 0xde, 0x6f, 0xab, 0xa8, 0x53, 0x71, 0x1f, 0xc4, 0xe0, 0xe1, 0x0f, 0xd1, 0x2a, 0x0d, 0x19, 0x95, + 0x85, 0xe9, 0x66, 0x61, 0xba, 0xfa, 0x48, 0x83, 0x24, 0xe7, 0xf0, 0x21, 0x42, 0x12, 0x3c, 0x01, + 0xea, 0x94, 0x8e, 0xc1, 0xba, 0x63, 0x94, 0xb8, 0x50, 0xa2, 0xc1, 0x9c, 0x21, 0x15, 0x15, 0xfe, + 0x0e, 0xad, 0xcb, 0x64, 0xf8, 0x23, 0x78, 0xca, 0xaa, 0xef, 0xd6, 0xf6, 0xda, 0x87, 0xf7, 0x9c, + 0x7f, 0xed, 0x81, 0xf3, 0xf4, 0xd3, 0x4f, 0x1e, 0x0e, 0xf2, 0x0a, 0xb7, 0x9d, 0xa5, 0xf6, 0x7a, + 0xb1, 0x20, 0x33, 0x1f, 0xfc, 0x14, 0x35, 0xfd, 0x44, 0x50, 0xc5, 0x78, 0x64, 0x35, 0x8c, 0xa7, + 0xe3, 0xe4, 0xb7, 0xec, 0x54, 0x6f, 0xd9, 0x89, 0xaf, 0x02, 0x0d, 0x48, 0x47, 0xdf, 0xb2, 0xb6, + 0xfe, 0xb2, 0xa8, 0x72, 0x37, 0xf4, 0x7d, 0xcd, 0x56, 0x64, 0xee, 0x86, 0x29, 0x6a, 0x0b, 0x88, + 0xe0, 0x27, 0x17, 0x46, 0x5c, 0x80, 0xb5, 0xfa, 0xbf, 0xcc, 0x3b, 0x59, 0x6a, 0xb7, 0x49, 0x69, + 0x43, 0xaa, 0x9e, 0x78, 0x0f, 0x35, 0xfd, 0x48, 0xea, 0xab, 0x91, 0xd6, 0xda, 0x6e, 0x7d, 0xaf, + 0x55, 0x1c, 0xe6, 0x74, 0x60, 0x30, 0x32, 0x67, 0xf1, 0x01, 0x6a, 0xb3, 0xf8, 0x91, 0xef, 0x0b, + 0x90, 0x12, 0xa4, 0xb5, 0x6e, 0xc4, 0xc6, 0xfc, 0xf8, 0x7c, 0x0e, 0x93, 0xaa, 0x06, 0xbf, 0x87, + 0x1a, 0x89, 0x60, 0xd2, 0x6a, 0x1a, 0x6d, 0x33, 0x4b, 0xed, 0xc6, 0x13, 0x72, 0x2c, 0x89, 0x41, + 0xf1, 0xe7, 0x68, 0x0b, 0xc6, 0x94, 0x85, 0xa5, 0x67, 0xcb, 0xe8, 0x70, 0x96, 0xda, 0x5b, 0x8f, + 0x17, 0x18, 0xf2, 0x9a, 0x12, 0xfb, 0x08, 0xc5, 0xf3, 0x4c, 0x59, 0xc8, 0x5c, 0xcc, 0xfd, 0xff, + 0xe8, 0xe4, 0xd2, 0x04, 0xbb, 0x5b, 0x3a, 0x2c, 0xe5, 0x9a, 0x54, 0x7c, 0x7b, 0x7f, 0xdf, 0x41, + 0xad, 0x23, 0x1e, 0xf9, 0xcc, 0x74, 0x63, 0x17, 0x35, 0xd4, 0x34, 0x86, 0x22, 0x92, 0x1b, 0x45, + 0xd0, 0x1a, 0x17, 0xd3, 0x18, 0x88, 0x61, 0xf0, 0x43, 0xb4, 0x26, 0x15, 0x55, 0x89, 0x2c, 0xc2, + 0xf8, 0x41, 0xa1, 0x59, 0x1b, 0x18, 0xf4, 0x55, 0x6a, 0x77, 0xe6, 0x76, 0x39, 0x44, 0x8a, 0x02, + 0xfc, 0x35, 0xc2, 0x7c, 0x28, 0x41, 0x4c, 0xc0, 0xff, 0x2a, 0x7f, 0x7c, 0x3a, 0x4e, 0x3a, 0xa2, + 0x75, 0x77, 0xa7, 0xb0, 0xc1, 0x67, 0xb7, 0x14, 0x64, 0x49, 0x15, 0x9e, 0x20, 0x1c, 0x52, 0xa9, + 0x2e, 0x04, 0x8d, 0xa4, 0xd9, 0xeb, 0x82, 0x8d, 0xa1, 0x88, 0xe6, 0xbd, 0x37, 0x4b, 0x8f, 0xae, + 0x28, 0xf7, 0x3d, 0xb9, 0xe5, 0x46, 0x96, 0xec, 0x80, 0xef, 0xa2, 0x35, 0x01, 0x54, 0xf2, 0xc8, + 0x24, 0xb5, 0xe5, 0x6e, 0xcd, 0x7e, 0x9f, 0x18, 0x94, 0x14, 0x2c, 0xfe, 0x08, 0xad, 0x8f, 0x41, + 0x4a, 0x1a, 0x80, 0xb5, 0x66, 0x84, 0x9d, 0x42, 0xb8, 0xfe, 0x6d, 0x0e, 0x93, 0x19, 0xdf, 0xfb, + 0xa3, 0x86, 0x5a, 0x17, 0x27, 0x83, 0x23, 0x1e, 0x8d, 0x58, 0x80, 0x9f, 0xa1, 0x16, 0x93, 0x32, + 0x01, 0x41, 0x60, 0x64, 0xda, 0xd0, 0x3e, 0xdc, 0xaf, 0xfc, 0x8f, 0xa3, 0x87, 0x9e, 0x39, 0xfd, + 0x34, 0x06, 0xff, 0x84, 0x7b, 0x34, 0x3c, 0xcb, 0xdf, 0x2a, 0x8c, 0x40, 0x40, 0xe4, 0x81, 0xbb, + 0x99, 0xa5, 0x76, 0xeb, 0x78, 0xe6, 0x41, 0x4a, 0x3b, 0x7c, 0x89, 0x36, 0xbc, 0x32, 0x20, 0xba, + 0x83, 0xf5, 0xfc, 0xb1, 0xbd, 0x69, 0xa6, 0xf4, 0xdc, 0x72, 0xdf, 0x2e, 0xfe, 0x64, 0xa3, 0x42, + 0x48, 0xb2, 0xe0, 0xdc, 0xfb, 0xbd, 0x8e, 0xda, 0x95, 0xa9, 0x82, 0x3f, 0x43, 0x9b, 0x5c, 0x04, + 0x34, 0x62, 0xcf, 0x4d, 0xfb, 0xf4, 0xcc, 0xd3, 0xcf, 0xe0, 0xad, 0x2c, 0xb5, 0x37, 0xcf, 0xaa, + 0x04, 0x59, 0xd4, 0xe1, 0x8f, 0x51, 0xcb, 0xe3, 0x49, 0xa4, 0x04, 0x2b, 0xce, 0xdb, 0xca, 0xff, + 0xef, 0x68, 0x06, 0x92, 0x92, 0xc7, 0xc7, 0x68, 0xbb, 0x5a, 0x4d, 0xc3, 0x27, 0x11, 0x53, 0xd2, + 0xaa, 0x9b, 0xb2, 0x77, 0xb3, 0xd4, 0xde, 0x3e, 0xbb, 0x4d, 0x93, 0x65, 0x35, 0xd8, 0x41, 0x28, + 0xd4, 0x97, 0xcb, 0x94, 0xde, 0xb8, 0x61, 0x1c, 0xcc, 0x33, 0x3a, 0x99, 0xa3, 0xa4, 0xa2, 0xd0, + 0xe7, 0x8c, 0x05, 0x9f, 0xb0, 0xc8, 0x03, 0x69, 0xad, 0x96, 0xe7, 0x3c, 0x9f, 0x81, 0xa4, 0xe4, + 0xf1, 0x17, 0xa8, 0x23, 0x95, 0x00, 0x50, 0xe5, 0x58, 0xc8, 0xe7, 0xd2, 0x76, 0x96, 0xda, 0x9d, + 0xc1, 0x22, 0x45, 0x5e, 0xd7, 0xea, 0x29, 0x15, 0x73, 0xa9, 0x68, 0x78, 0xc4, 0xfd, 0xc5, 0x29, + 0x75, 0x5e, 0xc2, 0xa4, 0xaa, 0xc1, 0x0f, 0xd0, 0x86, 0x04, 0xc1, 0x68, 0x78, 0x9a, 0x8c, 0x87, + 0x20, 0xac, 0xa6, 0xc9, 0xe4, 0xbc, 0x93, 0x83, 0x0a, 0x47, 0x16, 0x94, 0xee, 0xde, 0xf5, 0x4d, + 0x77, 0xe5, 0xc5, 0x4d, 0x77, 0xe5, 0xe5, 0x4d, 0x77, 0xe5, 0x97, 0xac, 0x5b, 0xbb, 0xce, 0xba, + 0xb5, 0x17, 0x59, 0xb7, 0xf6, 0x32, 0xeb, 0xd6, 0xfe, 0xcc, 0xba, 0xb5, 0x5f, 0xff, 0xea, 0xae, + 0x3c, 0xbb, 0x33, 0x39, 0xf8, 0x27, 0x00, 0x00, 0xff, 0xff, 0xcf, 0x50, 0x28, 0xcf, 0x18, 0x08, + 0x00, 0x00, +} + +func (m *CertificatePrivateKey) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CertificatePrivateKey) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CertificatePrivateKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Encoding) + copy(dAtA[i:], m.Encoding) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Encoding))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *CertificateSpec) Marshal() (dAtA []byte, err error) { @@ -248,13 +308,25 @@ func (m *CertificateSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.PrivateKey != nil { + { + size, err := m.PrivateKey.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } if len(m.EmailAddresses) > 0 { for iNdEx := len(m.EmailAddresses) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.EmailAddresses[iNdEx]) copy(dAtA[i:], m.EmailAddresses[iNdEx]) i = encodeVarintGenerated(dAtA, i, uint64(len(m.EmailAddresses[iNdEx]))) i-- - dAtA[i] = 0x52 + dAtA[i] = 0x4a } } if len(m.URIs) > 0 { @@ -263,7 +335,7 @@ func (m *CertificateSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.URIs[iNdEx]) i = encodeVarintGenerated(dAtA, i, uint64(len(m.URIs[iNdEx]))) i-- - dAtA[i] = 0x4a + dAtA[i] = 0x42 } } if len(m.IPAddresses) > 0 { @@ -272,7 +344,7 @@ func (m *CertificateSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.IPAddresses[iNdEx]) i = encodeVarintGenerated(dAtA, i, uint64(len(m.IPAddresses[iNdEx]))) i-- - dAtA[i] = 0x42 + dAtA[i] = 0x3a } } if len(m.DNSNames) > 0 { @@ -281,7 +353,7 @@ func (m *CertificateSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.DNSNames[iNdEx]) i = encodeVarintGenerated(dAtA, i, uint64(len(m.DNSNames[iNdEx]))) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x32 } } if m.RenewBefore != nil { @@ -294,7 +366,7 @@ func (m *CertificateSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x32 + dAtA[i] = 0x2a } if m.Duration != nil { { @@ -306,7 +378,7 @@ func (m *CertificateSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 } if m.Subject != nil { { @@ -318,13 +390,8 @@ func (m *CertificateSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } - i -= len(m.KeyEncoding) - copy(dAtA[i:], m.KeyEncoding) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.KeyEncoding))) - i-- - dAtA[i] = 0x1a i -= len(m.SecretName) copy(dAtA[i:], m.SecretName) i = encodeVarintGenerated(dAtA, i, uint64(len(m.SecretName))) @@ -545,6 +612,17 @@ func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } +func (m *CertificatePrivateKey) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Encoding) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *CertificateSpec) Size() (n int) { if m == nil { return 0 @@ -555,8 +633,6 @@ func (m *CertificateSpec) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = len(m.SecretName) n += 1 + l + sovGenerated(uint64(l)) - l = len(m.KeyEncoding) - n += 1 + l + sovGenerated(uint64(l)) if m.Subject != nil { l = m.Subject.Size() n += 1 + l + sovGenerated(uint64(l)) @@ -593,6 +669,10 @@ func (m *CertificateSpec) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } + if m.PrivateKey != nil { + l = m.PrivateKey.Size() + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -694,6 +774,16 @@ func sovGenerated(x uint64) (n int) { func sozGenerated(x uint64) (n int) { return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (this *CertificatePrivateKey) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CertificatePrivateKey{`, + `Encoding:` + fmt.Sprintf("%v", this.Encoding) + `,`, + `}`, + }, "") + return s +} func (this *CertificateSpec) String() string { if this == nil { return "nil" @@ -701,7 +791,6 @@ func (this *CertificateSpec) String() string { s := strings.Join([]string{`&CertificateSpec{`, `Alias:` + fmt.Sprintf("%v", this.Alias) + `,`, `SecretName:` + fmt.Sprintf("%v", this.SecretName) + `,`, - `KeyEncoding:` + fmt.Sprintf("%v", this.KeyEncoding) + `,`, `Subject:` + strings.Replace(this.Subject.String(), "X509Subject", "X509Subject", 1) + `,`, `Duration:` + strings.Replace(fmt.Sprintf("%v", this.Duration), "Duration", "v1.Duration", 1) + `,`, `RenewBefore:` + strings.Replace(fmt.Sprintf("%v", this.RenewBefore), "Duration", "v1.Duration", 1) + `,`, @@ -709,6 +798,7 @@ func (this *CertificateSpec) String() string { `IPAddresses:` + fmt.Sprintf("%v", this.IPAddresses) + `,`, `URIs:` + fmt.Sprintf("%v", this.URIs) + `,`, `EmailAddresses:` + fmt.Sprintf("%v", this.EmailAddresses) + `,`, + `PrivateKey:` + strings.Replace(this.PrivateKey.String(), "CertificatePrivateKey", "CertificatePrivateKey", 1) + `,`, `}`, }, "") return s @@ -769,7 +859,7 @@ func valueToStringGenerated(v interface{}) string { pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } -func (m *CertificateSpec) Unmarshal(dAtA []byte) error { +func (m *CertificatePrivateKey) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -792,15 +882,15 @@ func (m *CertificateSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CertificateSpec: wiretype end group for non-group") + return fmt.Errorf("proto: CertificatePrivateKey: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CertificateSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CertificatePrivateKey: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Alias", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Encoding", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -828,11 +918,64 @@ func (m *CertificateSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Alias = string(dAtA[iNdEx:postIndex]) + m.Encoding = PrivateKeyEncoding(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CertificateSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CertificateSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CertificateSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SecretName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Alias", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -860,11 +1003,11 @@ func (m *CertificateSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SecretName = string(dAtA[iNdEx:postIndex]) + m.Alias = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KeyEncoding", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SecretName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -892,9 +1035,9 @@ func (m *CertificateSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.KeyEncoding = string(dAtA[iNdEx:postIndex]) + m.SecretName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) } @@ -930,7 +1073,7 @@ func (m *CertificateSpec) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) } @@ -966,7 +1109,7 @@ func (m *CertificateSpec) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 6: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RenewBefore", wireType) } @@ -1002,7 +1145,7 @@ func (m *CertificateSpec) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 7: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DNSNames", wireType) } @@ -1034,7 +1177,7 @@ func (m *CertificateSpec) Unmarshal(dAtA []byte) error { } m.DNSNames = append(m.DNSNames, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 8: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field IPAddresses", wireType) } @@ -1066,7 +1209,7 @@ func (m *CertificateSpec) Unmarshal(dAtA []byte) error { } m.IPAddresses = append(m.IPAddresses, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 9: + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field URIs", wireType) } @@ -1098,7 +1241,7 @@ func (m *CertificateSpec) Unmarshal(dAtA []byte) error { } m.URIs = append(m.URIs, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 10: + case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EmailAddresses", wireType) } @@ -1130,6 +1273,42 @@ func (m *CertificateSpec) Unmarshal(dAtA []byte) error { } m.EmailAddresses = append(m.EmailAddresses, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PrivateKey", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PrivateKey == nil { + m.PrivateKey = &CertificatePrivateKey{} + } + if err := m.PrivateKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/vendor/kmodules.xyz/client-go/api/v1/generated.proto b/vendor/kmodules.xyz/client-go/api/v1/generated.proto index 79943f098..8ae2fb28d 100644 --- a/vendor/kmodules.xyz/client-go/api/v1/generated.proto +++ b/vendor/kmodules.xyz/client-go/api/v1/generated.proto @@ -27,6 +27,20 @@ import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1"; +// CertificatePrivateKey contains configuration options for private keys +// used by the Certificate controller. +// This allows control of how private keys are rotated. +message CertificatePrivateKey { + // The private key cryptography standards (PKCS) encoding for this + // certificate's private key to be encoded in. + // If provided, allowed values are "pkcs1" and "pkcs8" standing for PKCS#1 + // and PKCS#8, respectively. + // Defaults to PKCS#1 if not specified. + // See here for the difference between the formats: https://stackoverflow.com/a/48960291 + // +optional + optional string encoding = 1; +} + message CertificateSpec { // Alias represents the identifier of the certificate. optional string alias = 1; @@ -36,40 +50,37 @@ message CertificateSpec { // +optional optional string secretName = 2; - // KeyEncoding is the private key cryptography standards (PKCS) - // for this certificate's private key to be encoded in. - // If provided, allowed values are "pkcs1" and "pkcs8". - // If KeyEncoding is not specified, then PKCS#1 will be used by default. - // +optional - optional string keyEncoding = 3; - // Full X509 name specification (https://golang.org/pkg/crypto/x509/pkix/#Name). // +optional - optional X509Subject subject = 4; + optional X509Subject subject = 3; // Certificate default Duration // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Duration duration = 5; + optional k8s.io.apimachinery.pkg.apis.meta.v1.Duration duration = 4; // Certificate renew before expiration duration // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Duration renewBefore = 6; + optional k8s.io.apimachinery.pkg.apis.meta.v1.Duration renewBefore = 5; // DNSNames is a list of subject alt names to be used on the Certificate. // +optional - repeated string dnsNames = 7; + repeated string dnsNames = 6; // IPAddresses is a list of IP addresses to be used on the Certificate // +optional - repeated string ipAddresses = 8; + repeated string ipAddresses = 7; // URIs is a list of URI subjectAltNames to be set on the Certificate. // +optional - repeated string uris = 9; + repeated string uris = 8; // EmailAddresses is a list of email subjectAltNames to be set on the Certificate. // +optional - repeated string emailAddresses = 10; + repeated string emailAddresses = 9; + + // Options to control private keys used for the Certificate. + // +optional + optional CertificatePrivateKey privateKey = 10; } message Condition { diff --git a/vendor/kmodules.xyz/client-go/api/v1/openapi_generated.go b/vendor/kmodules.xyz/client-go/api/v1/openapi_generated.go index dce82e213..47628f05b 100644 --- a/vendor/kmodules.xyz/client-go/api/v1/openapi_generated.go +++ b/vendor/kmodules.xyz/client-go/api/v1/openapi_generated.go @@ -29,11 +29,32 @@ import ( func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { return map[string]common.OpenAPIDefinition{ - "kmodules.xyz/client-go/api/v1.CertificateSpec": schema_kmodulesxyz_client_go_api_v1_CertificateSpec(ref), - "kmodules.xyz/client-go/api/v1.Condition": schema_kmodulesxyz_client_go_api_v1_Condition(ref), - "kmodules.xyz/client-go/api/v1.TLSConfig": schema_kmodulesxyz_client_go_api_v1_TLSConfig(ref), - "kmodules.xyz/client-go/api/v1.X509Subject": schema_kmodulesxyz_client_go_api_v1_X509Subject(ref), - "kmodules.xyz/client-go/api/v1.stringSetMerger": schema_kmodulesxyz_client_go_api_v1_stringSetMerger(ref), + "kmodules.xyz/client-go/api/v1.CertificatePrivateKey": schema_kmodulesxyz_client_go_api_v1_CertificatePrivateKey(ref), + "kmodules.xyz/client-go/api/v1.CertificateSpec": schema_kmodulesxyz_client_go_api_v1_CertificateSpec(ref), + "kmodules.xyz/client-go/api/v1.Condition": schema_kmodulesxyz_client_go_api_v1_Condition(ref), + "kmodules.xyz/client-go/api/v1.TLSConfig": schema_kmodulesxyz_client_go_api_v1_TLSConfig(ref), + "kmodules.xyz/client-go/api/v1.X509Subject": schema_kmodulesxyz_client_go_api_v1_X509Subject(ref), + "kmodules.xyz/client-go/api/v1.stringSetMerger": schema_kmodulesxyz_client_go_api_v1_stringSetMerger(ref), + } +} + +func schema_kmodulesxyz_client_go_api_v1_CertificatePrivateKey(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CertificatePrivateKey contains configuration options for private keys used by the Certificate controller. This allows control of how private keys are rotated.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "encoding": { + SchemaProps: spec.SchemaProps{ + Description: "The private key cryptography standards (PKCS) encoding for this certificate's private key to be encoded in. If provided, allowed values are \"pkcs1\" and \"pkcs8\" standing for PKCS#1 and PKCS#8, respectively. Defaults to PKCS#1 if not specified. See here for the difference between the formats: https://stackoverflow.com/a/48960291", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, } } @@ -57,13 +78,6 @@ func schema_kmodulesxyz_client_go_api_v1_CertificateSpec(ref common.ReferenceCal Format: "", }, }, - "keyEncoding": { - SchemaProps: spec.SchemaProps{ - Description: "KeyEncoding is the private key cryptography standards (PKCS) for this certificate's private key to be encoded in. If provided, allowed values are \"pkcs1\" and \"pkcs8\". If KeyEncoding is not specified, then PKCS#1 will be used by default.", - Type: []string{"string"}, - Format: "", - }, - }, "subject": { SchemaProps: spec.SchemaProps{ Description: "Full X509 name specification (https://golang.org/pkg/crypto/x509/pkix/#Name).", @@ -138,12 +152,18 @@ func schema_kmodulesxyz_client_go_api_v1_CertificateSpec(ref common.ReferenceCal }, }, }, + "privateKey": { + SchemaProps: spec.SchemaProps{ + Description: "Options to control private keys used for the Certificate.", + Ref: ref("kmodules.xyz/client-go/api/v1.CertificatePrivateKey"), + }, + }, }, Required: []string{"alias"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "kmodules.xyz/client-go/api/v1.X509Subject"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "kmodules.xyz/client-go/api/v1.CertificatePrivateKey", "kmodules.xyz/client-go/api/v1.X509Subject"}, } } diff --git a/vendor/kmodules.xyz/client-go/api/v1/zz_generated.deepcopy.go b/vendor/kmodules.xyz/client-go/api/v1/zz_generated.deepcopy.go index e21123916..99caf8d43 100644 --- a/vendor/kmodules.xyz/client-go/api/v1/zz_generated.deepcopy.go +++ b/vendor/kmodules.xyz/client-go/api/v1/zz_generated.deepcopy.go @@ -25,6 +25,22 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CertificatePrivateKey) DeepCopyInto(out *CertificatePrivateKey) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificatePrivateKey. +func (in *CertificatePrivateKey) DeepCopy() *CertificatePrivateKey { + if in == nil { + return nil + } + out := new(CertificatePrivateKey) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CertificateSpec) DeepCopyInto(out *CertificateSpec) { *out = *in @@ -63,6 +79,11 @@ func (in *CertificateSpec) DeepCopyInto(out *CertificateSpec) { *out = make([]string, len(*in)) copy(*out, *in) } + if in.PrivateKey != nil { + in, out := &in.PrivateKey, &out.PrivateKey + *out = new(CertificatePrivateKey) + **out = **in + } return } diff --git a/vendor/kmodules.xyz/client-go/core/v1/kubernetes.go b/vendor/kmodules.xyz/client-go/core/v1/kubernetes.go index 703db2852..1ac6cb833 100644 --- a/vendor/kmodules.xyz/client-go/core/v1/kubernetes.go +++ b/vendor/kmodules.xyz/client-go/core/v1/kubernetes.go @@ -300,6 +300,20 @@ func IsOwnedBy(dependent metav1.Object, owner metav1.Object) (owned bool, contro return false, false } +func IsOwnerOfGroup(ctrl *metav1.OwnerReference, group string) (bool, string, error) { + if ctrl == nil { + return false, "", nil + } + gv, err := schema.ParseGroupVersion(ctrl.APIVersion) + if err != nil { + return false, "", err + } + if gv.Group != group { + return false, "", nil + } + return true, ctrl.Kind, nil +} + func IsOwnerOfGroupKind(ctrl *metav1.OwnerReference, group, kind string) (bool, error) { if ctrl == nil { return false, nil diff --git a/vendor/kmodules.xyz/client-go/go.mod b/vendor/kmodules.xyz/client-go/go.mod index f1688fa96..b8f399dc9 100644 --- a/vendor/kmodules.xyz/client-go/go.mod +++ b/vendor/kmodules.xyz/client-go/go.mod @@ -3,9 +3,9 @@ module kmodules.xyz/client-go go 1.12 require ( - github.com/appscode/go v0.0.0-20200323182826-54e98e09185a + github.com/appscode/go v0.0.0-20200928211031-cc0c23082d91 github.com/davecgh/go-spew v1.1.1 - github.com/evanphx/json-patch v4.5.0+incompatible + github.com/evanphx/json-patch v4.9.0+incompatible github.com/fatih/structs v1.1.0 github.com/fsnotify/fsnotify v1.4.7 github.com/go-openapi/spec v0.19.3 @@ -26,14 +26,14 @@ require ( github.com/yudai/pp v2.0.1+incompatible // indirect gomodules.xyz/jsonpatch/v2 v2.1.0 gomodules.xyz/version v0.1.0 - k8s.io/api v0.18.3 - k8s.io/apiextensions-apiserver v0.18.3 - k8s.io/apimachinery v0.18.3 - k8s.io/apiserver v0.18.3 - k8s.io/cli-runtime v0.18.3 - k8s.io/client-go v0.18.3 + k8s.io/api v0.18.9 + k8s.io/apiextensions-apiserver v0.18.9 + k8s.io/apimachinery v0.18.9 + k8s.io/apiserver v0.18.9 + k8s.io/cli-runtime v0.18.9 + k8s.io/client-go v0.18.9 k8s.io/klog v1.0.0 - k8s.io/kube-aggregator v0.18.3 + k8s.io/kube-aggregator v0.18.9 k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6 sigs.k8s.io/yaml v1.2.0 ) diff --git a/vendor/kmodules.xyz/client-go/go.sum b/vendor/kmodules.xyz/client-go/go.sum index 3b8930b78..47a29d3cd 100644 --- a/vendor/kmodules.xyz/client-go/go.sum +++ b/vendor/kmodules.xyz/client-go/go.sum @@ -31,8 +31,8 @@ github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4Rq github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/appscode/go v0.0.0-20200323182826-54e98e09185a h1:cZ80NKoLRaW1PVCWXAJE+YFkBAmLZ8BnrJmH0ClY1Gs= -github.com/appscode/go v0.0.0-20200323182826-54e98e09185a/go.mod h1:lIcm8Z6VPuvcw/a3EeOWcG6R3I13iHMLYbtVP7TKufY= +github.com/appscode/go v0.0.0-20200928211031-cc0c23082d91 h1:a5T6J190+3yXrGoq7qjng7EnseLj/IMoRhmV48+Y1iU= +github.com/appscode/go v0.0.0-20200928211031-cc0c23082d91/go.mod h1:oWiTjcudxE2UxyEDtsgJl3d84JD75S7j3UsrLKC7U68= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= @@ -84,10 +84,11 @@ github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v4.2.0+incompatible h1:fUDGZCv/7iAN7u0puUVhvKCcsR6vRfwrJatElLBEf0I= -github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= +github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= @@ -446,6 +447,7 @@ golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.1.0 h1:Phva6wqu+xR//Njw6iorylFFgn/z547tw5Ne3HZPQ+k= gomodules.xyz/jsonpatch/v2 v2.1.0/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= +gomodules.xyz/password-generator v0.2.3/go.mod h1:TvwYYTx9+P1pPwKQKfZgB/wr2Id9MqAQ3B5auY7reNg= gomodules.xyz/version v0.1.0 h1:inGItCg/egI0jPMeIE0SQkiDIJaodOMoCrxYqasQLR0= gomodules.xyz/version v0.1.0/go.mod h1:Y8xuV02mL/45psyPKG3NCVOwvAOy6T5Kx0l3rCjKSjU= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= @@ -488,29 +490,29 @@ gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81 honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/api v0.18.3 h1:2AJaUQdgUZLoDZHrun21PW2Nx9+ll6cUzvn3IKhSIn0= -k8s.io/api v0.18.3/go.mod h1:UOaMwERbqJMfeeeHc8XJKawj4P9TgDRnViIqqBeH2QA= -k8s.io/apiextensions-apiserver v0.18.3 h1:h6oZO+iAgg0HjxmuNnguNdKNB9+wv3O1EBDdDWJViQ0= -k8s.io/apiextensions-apiserver v0.18.3/go.mod h1:TMsNGs7DYpMXd+8MOCX8KzPOCx8fnZMoIGB24m03+JE= -k8s.io/apimachinery v0.18.3 h1:pOGcbVAhxADgUYnjS08EFXs9QMl8qaH5U4fr5LGUrSk= -k8s.io/apimachinery v0.18.3/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= -k8s.io/apiserver v0.18.3 h1:BVjccwKP/kEqY+ResOyWs0EKs7f4XL0d0E5GkU3uiqI= -k8s.io/apiserver v0.18.3/go.mod h1:tHQRmthRPLUtwqsOnJJMoI8SW3lnoReZeE861lH8vUw= -k8s.io/cli-runtime v0.18.3 h1:8IBtaTYmXiXipKdx2FAKotvnQMjcF0kSLvX4szY340c= -k8s.io/cli-runtime v0.18.3/go.mod h1:pqbbi4nqRIQhUWAVzen8uE8DD/zcZLwf+8sQYO4lwLk= -k8s.io/client-go v0.18.3 h1:QaJzz92tsN67oorwzmoB0a9r9ZVHuD5ryjbCKP0U22k= -k8s.io/client-go v0.18.3/go.mod h1:4a/dpQEvzAhT1BbuWW09qvIaGw6Gbu1gZYiQZIi1DMw= -k8s.io/code-generator v0.18.3/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= -k8s.io/component-base v0.18.3 h1:QXq+P4lgi4LCIREya1RDr5gTcBaVFhxEcALir3QCSDA= -k8s.io/component-base v0.18.3/go.mod h1:bp5GzGR0aGkYEfTj+eTY0AN/vXTgkJdQXjNTTVUaa3k= +k8s.io/api v0.18.9 h1:7VDtivqwbvLOf8hmXSd/PDSSbpCBq49MELg84EYBYiQ= +k8s.io/api v0.18.9/go.mod h1:9u/h6sUh6FxfErv7QqetX1EB3yBMIYOBXzdcf0Gf0rc= +k8s.io/apiextensions-apiserver v0.18.9 h1:tVEf8rVKh5BnXORnYYCztjbf6CSyGNMt/rAIEyfU00Q= +k8s.io/apiextensions-apiserver v0.18.9/go.mod h1:JagmAhU0TVENzgUZqHJsjCSDh7YuV5o6g01G1Fwh7zI= +k8s.io/apimachinery v0.18.9 h1:3ZABKQx3F3xPWlsGhCfUl8W+JXRRblV6Wo2A3zn0pvY= +k8s.io/apimachinery v0.18.9/go.mod h1:PF5taHbXgTEJLU+xMypMmYTXTWPJ5LaW8bfsisxnEXk= +k8s.io/apiserver v0.18.9 h1:ziivCosB28MltECzhDBLLVKW01zCghl/lXke3B62y8g= +k8s.io/apiserver v0.18.9/go.mod h1:vXQzMtUCLsGg1Bh+7Jo2mZKHpHZFCZn8eTNSepcIA1M= +k8s.io/cli-runtime v0.18.9 h1:ko+hFWGCgB3Ue3CPB/525btshO+Sya/D4qNSZ1Nu7J8= +k8s.io/cli-runtime v0.18.9/go.mod h1:Pw7UPmZd/wIlGd7DWGTUWA7qn92jCeybNeiS5WYJI6A= +k8s.io/client-go v0.18.9 h1:sPHX49yOtUqv1fl49TwV3f8cC0N3etSnwgFGsIsXnZc= +k8s.io/client-go v0.18.9/go.mod h1:UjkEetDmr40P9NX0Ok3Idt08FCf2I4mIHgjFsot77uY= +k8s.io/code-generator v0.18.9/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= +k8s.io/component-base v0.18.9 h1:7G0D/PUKrVxyUxjT5HV4aTqYqhPj60erA1ab1JUw7m8= +k8s.io/component-base v0.18.9/go.mod h1:tUo4qZtV8m7t/U+0DgY+fcnn4BFZ480fZdzxOkWH4zk= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -k8s.io/kube-aggregator v0.18.3 h1:zAKL1YuI6KULjvsXFQl0W3pQQt73bGXU20+GzYDtdhc= -k8s.io/kube-aggregator v0.18.3/go.mod h1:fux0WabUOggW2yAACL4jQGVd6kv7mSgBnJ3GgCXCris= +k8s.io/kube-aggregator v0.18.9 h1:kqwbA15uygYfLfdMUlyBm/q3OHaYbnirFrg7tGUTVZk= +k8s.io/kube-aggregator v0.18.9/go.mod h1:ik5Mf6JaP2M9XbWZR/AYgXx2Nj4EDBrHyakUx7C8cdw= k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6 h1:Oh3Mzx5pJ+yIumsAD0MOECPVeXsVot0UkiaCGVyfGQY= k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 h1:d4vVOjXm687F1iLSP2q3lyPPuyvTUt3aVoBpi2DqRsU= diff --git a/vendor/kmodules.xyz/crd-schema-fuzz/go.mod b/vendor/kmodules.xyz/crd-schema-fuzz/go.mod index 316e9298c..7f2c614d3 100644 --- a/vendor/kmodules.xyz/crd-schema-fuzz/go.mod +++ b/vendor/kmodules.xyz/crd-schema-fuzz/go.mod @@ -4,6 +4,6 @@ go 1.12 require ( github.com/google/go-cmp v0.3.0 - k8s.io/apiextensions-apiserver v0.18.3 - k8s.io/apimachinery v0.18.3 + k8s.io/apiextensions-apiserver v0.18.9 + k8s.io/apimachinery v0.18.9 ) diff --git a/vendor/kmodules.xyz/crd-schema-fuzz/go.sum b/vendor/kmodules.xyz/crd-schema-fuzz/go.sum index e2284349b..5f68e1918 100644 --- a/vendor/kmodules.xyz/crd-schema-fuzz/go.sum +++ b/vendor/kmodules.xyz/crd-schema-fuzz/go.sum @@ -58,7 +58,7 @@ github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -374,15 +374,15 @@ gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81 honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/api v0.18.3/go.mod h1:UOaMwERbqJMfeeeHc8XJKawj4P9TgDRnViIqqBeH2QA= -k8s.io/apiextensions-apiserver v0.18.3 h1:h6oZO+iAgg0HjxmuNnguNdKNB9+wv3O1EBDdDWJViQ0= -k8s.io/apiextensions-apiserver v0.18.3/go.mod h1:TMsNGs7DYpMXd+8MOCX8KzPOCx8fnZMoIGB24m03+JE= -k8s.io/apimachinery v0.18.3 h1:pOGcbVAhxADgUYnjS08EFXs9QMl8qaH5U4fr5LGUrSk= -k8s.io/apimachinery v0.18.3/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= -k8s.io/apiserver v0.18.3/go.mod h1:tHQRmthRPLUtwqsOnJJMoI8SW3lnoReZeE861lH8vUw= -k8s.io/client-go v0.18.3/go.mod h1:4a/dpQEvzAhT1BbuWW09qvIaGw6Gbu1gZYiQZIi1DMw= -k8s.io/code-generator v0.18.3/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= -k8s.io/component-base v0.18.3/go.mod h1:bp5GzGR0aGkYEfTj+eTY0AN/vXTgkJdQXjNTTVUaa3k= +k8s.io/api v0.18.9/go.mod h1:9u/h6sUh6FxfErv7QqetX1EB3yBMIYOBXzdcf0Gf0rc= +k8s.io/apiextensions-apiserver v0.18.9 h1:tVEf8rVKh5BnXORnYYCztjbf6CSyGNMt/rAIEyfU00Q= +k8s.io/apiextensions-apiserver v0.18.9/go.mod h1:JagmAhU0TVENzgUZqHJsjCSDh7YuV5o6g01G1Fwh7zI= +k8s.io/apimachinery v0.18.9 h1:3ZABKQx3F3xPWlsGhCfUl8W+JXRRblV6Wo2A3zn0pvY= +k8s.io/apimachinery v0.18.9/go.mod h1:PF5taHbXgTEJLU+xMypMmYTXTWPJ5LaW8bfsisxnEXk= +k8s.io/apiserver v0.18.9/go.mod h1:vXQzMtUCLsGg1Bh+7Jo2mZKHpHZFCZn8eTNSepcIA1M= +k8s.io/client-go v0.18.9/go.mod h1:UjkEetDmr40P9NX0Ok3Idt08FCf2I4mIHgjFsot77uY= +k8s.io/code-generator v0.18.9/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= +k8s.io/component-base v0.18.9/go.mod h1:tUo4qZtV8m7t/U+0DgY+fcnn4BFZ480fZdzxOkWH4zk= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= diff --git a/vendor/kmodules.xyz/custom-resources/LICENSE b/vendor/kmodules.xyz/custom-resources/LICENSE index 261eeb9e9..8dada3eda 100644 --- a/vendor/kmodules.xyz/custom-resources/LICENSE +++ b/vendor/kmodules.xyz/custom-resources/LICENSE @@ -178,7 +178,7 @@ APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" + boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/custom-resources/apis/appcatalog/register.go b/vendor/kmodules.xyz/custom-resources/apis/appcatalog/register.go index 62c2cddce..2212b912b 100644 --- a/vendor/kmodules.xyz/custom-resources/apis/appcatalog/register.go +++ b/vendor/kmodules.xyz/custom-resources/apis/appcatalog/register.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/appbinding_helpers.go b/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/appbinding_helpers.go index 871bd58f9..b6dbf848d 100644 --- a/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/appbinding_helpers.go +++ b/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/appbinding_helpers.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/appbinding_types.go b/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/appbinding_types.go index 6c2092445..41f055dc7 100644 --- a/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/appbinding_types.go +++ b/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/appbinding_types.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/doc.go b/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/doc.go index d20090b01..b7c345b51 100644 --- a/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/doc.go +++ b/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -13,6 +13,7 @@ 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 v1alpha1 is the v1alpha1 version of the API. // +k8s:deepcopy-gen=package,register diff --git a/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/generated.pb.go b/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/generated.pb.go index 0ade8d261..0ea6c5ad0 100644 --- a/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/generated.pb.go +++ b/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/generated.proto b/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/generated.proto index c6b760061..48da8bd79 100644 --- a/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/generated.proto +++ b/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/openapi_generated.go b/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/openapi_generated.go index 798d3dc6d..53af85290 100644 --- a/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/openapi_generated.go +++ b/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/openapi_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/register.go b/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/register.go index c6fb4546b..1a29cc97f 100644 --- a/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/register.go +++ b/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/register.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/zz_generated.deepcopy.go b/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/zz_generated.deepcopy.go index b4455db3a..8384c0990 100644 --- a/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/clientset.go b/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/clientset.go index afa8ca9e1..42ad90e0f 100644 --- a/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/clientset.go +++ b/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/clientset.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/doc.go b/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/doc.go index 4ff4c96b4..cf823008b 100644 --- a/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/doc.go +++ b/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/doc.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/scheme/doc.go b/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/scheme/doc.go index 46bf2660e..47c55e403 100644 --- a/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/scheme/doc.go +++ b/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/scheme/doc.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/scheme/register.go b/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/scheme/register.go index dc0628c88..f48c8f565 100644 --- a/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/scheme/register.go +++ b/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/scheme/register.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/typed/appcatalog/v1alpha1/appbinding.go b/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/typed/appcatalog/v1alpha1/appbinding.go index 62968fcfd..dd8570c5d 100644 --- a/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/typed/appcatalog/v1alpha1/appbinding.go +++ b/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/typed/appcatalog/v1alpha1/appbinding.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/typed/appcatalog/v1alpha1/appcatalog_client.go b/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/typed/appcatalog/v1alpha1/appcatalog_client.go index 11a0a7244..0b16af380 100644 --- a/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/typed/appcatalog/v1alpha1/appcatalog_client.go +++ b/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/typed/appcatalog/v1alpha1/appcatalog_client.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/typed/appcatalog/v1alpha1/doc.go b/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/typed/appcatalog/v1alpha1/doc.go index 5d9132eff..50f524220 100644 --- a/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/typed/appcatalog/v1alpha1/doc.go +++ b/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/typed/appcatalog/v1alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/typed/appcatalog/v1alpha1/generated_expansion.go b/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/typed/appcatalog/v1alpha1/generated_expansion.go index b358f332b..b1cedaa67 100644 --- a/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/typed/appcatalog/v1alpha1/generated_expansion.go +++ b/vendor/kmodules.xyz/custom-resources/client/clientset/versioned/typed/appcatalog/v1alpha1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/custom-resources/crds/doc.go b/vendor/kmodules.xyz/custom-resources/crds/doc.go index ee5057789..c75b247de 100644 --- a/vendor/kmodules.xyz/custom-resources/crds/doc.go +++ b/vendor/kmodules.xyz/custom-resources/crds/doc.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/custom-resources/crds/lib.go b/vendor/kmodules.xyz/custom-resources/crds/lib.go index fe8f9dee5..3a9ee7370 100644 --- a/vendor/kmodules.xyz/custom-resources/crds/lib.go +++ b/vendor/kmodules.xyz/custom-resources/crds/lib.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/objectstore-api/LICENSE b/vendor/kmodules.xyz/objectstore-api/LICENSE index 261eeb9e9..8dada3eda 100644 --- a/vendor/kmodules.xyz/objectstore-api/LICENSE +++ b/vendor/kmodules.xyz/objectstore-api/LICENSE @@ -178,7 +178,7 @@ APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" + boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/objectstore-api/api/v1/doc.go b/vendor/kmodules.xyz/objectstore-api/api/v1/doc.go index b9d0b3f4a..c5c9e2115 100644 --- a/vendor/kmodules.xyz/objectstore-api/api/v1/doc.go +++ b/vendor/kmodules.xyz/objectstore-api/api/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -13,6 +13,7 @@ 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. */ + // +k8s:deepcopy-gen=package // +k8s:openapi-gen=true package v1 // import "kmodules.xyz/objectstore-api/api/v1" diff --git a/vendor/kmodules.xyz/objectstore-api/api/v1/generated.pb.go b/vendor/kmodules.xyz/objectstore-api/api/v1/generated.pb.go index 79c56788f..a80c33867 100644 --- a/vendor/kmodules.xyz/objectstore-api/api/v1/generated.pb.go +++ b/vendor/kmodules.xyz/objectstore-api/api/v1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/objectstore-api/api/v1/generated.proto b/vendor/kmodules.xyz/objectstore-api/api/v1/generated.proto index 90252be1c..b5058da94 100644 --- a/vendor/kmodules.xyz/objectstore-api/api/v1/generated.proto +++ b/vendor/kmodules.xyz/objectstore-api/api/v1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/objectstore-api/api/v1/helpers.go b/vendor/kmodules.xyz/objectstore-api/api/v1/helpers.go index 0d23dcdfa..d24d54344 100644 --- a/vendor/kmodules.xyz/objectstore-api/api/v1/helpers.go +++ b/vendor/kmodules.xyz/objectstore-api/api/v1/helpers.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/objectstore-api/api/v1/openapi_generated.go b/vendor/kmodules.xyz/objectstore-api/api/v1/openapi_generated.go index bd6d1f55d..90d7bb390 100644 --- a/vendor/kmodules.xyz/objectstore-api/api/v1/openapi_generated.go +++ b/vendor/kmodules.xyz/objectstore-api/api/v1/openapi_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/objectstore-api/api/v1/types.go b/vendor/kmodules.xyz/objectstore-api/api/v1/types.go index 0e2fe8f02..137c884d6 100644 --- a/vendor/kmodules.xyz/objectstore-api/api/v1/types.go +++ b/vendor/kmodules.xyz/objectstore-api/api/v1/types.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/objectstore-api/api/v1/zz_generated.deepcopy.go b/vendor/kmodules.xyz/objectstore-api/api/v1/zz_generated.deepcopy.go index f6c7408f3..50a995675 100644 --- a/vendor/kmodules.xyz/objectstore-api/api/v1/zz_generated.deepcopy.go +++ b/vendor/kmodules.xyz/objectstore-api/api/v1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/offshoot-api/LICENSE b/vendor/kmodules.xyz/offshoot-api/LICENSE index 261eeb9e9..8dada3eda 100644 --- a/vendor/kmodules.xyz/offshoot-api/LICENSE +++ b/vendor/kmodules.xyz/offshoot-api/LICENSE @@ -178,7 +178,7 @@ APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" + boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/offshoot-api/api/v1/constants.go b/vendor/kmodules.xyz/offshoot-api/api/v1/constants.go index 36dcea160..8e1a7739f 100644 --- a/vendor/kmodules.xyz/offshoot-api/api/v1/constants.go +++ b/vendor/kmodules.xyz/offshoot-api/api/v1/constants.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/offshoot-api/api/v1/doc.go b/vendor/kmodules.xyz/offshoot-api/api/v1/doc.go index 31157672b..a1edc59af 100644 --- a/vendor/kmodules.xyz/offshoot-api/api/v1/doc.go +++ b/vendor/kmodules.xyz/offshoot-api/api/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/offshoot-api/api/v1/generated.pb.go b/vendor/kmodules.xyz/offshoot-api/api/v1/generated.pb.go index a9cbbb43a..242d1f45d 100644 --- a/vendor/kmodules.xyz/offshoot-api/api/v1/generated.pb.go +++ b/vendor/kmodules.xyz/offshoot-api/api/v1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/offshoot-api/api/v1/generated.proto b/vendor/kmodules.xyz/offshoot-api/api/v1/generated.proto index fc8800b87..9e476b804 100644 --- a/vendor/kmodules.xyz/offshoot-api/api/v1/generated.proto +++ b/vendor/kmodules.xyz/offshoot-api/api/v1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/offshoot-api/api/v1/openapi_generated.go b/vendor/kmodules.xyz/offshoot-api/api/v1/openapi_generated.go index ea1a59cbd..a66f93db3 100644 --- a/vendor/kmodules.xyz/offshoot-api/api/v1/openapi_generated.go +++ b/vendor/kmodules.xyz/offshoot-api/api/v1/openapi_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/offshoot-api/api/v1/pvc.go b/vendor/kmodules.xyz/offshoot-api/api/v1/pvc.go index 551751815..87c9176e1 100644 --- a/vendor/kmodules.xyz/offshoot-api/api/v1/pvc.go +++ b/vendor/kmodules.xyz/offshoot-api/api/v1/pvc.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/offshoot-api/api/v1/runtime_settings_types.go b/vendor/kmodules.xyz/offshoot-api/api/v1/runtime_settings_types.go index 9c9eb18ec..83a380530 100644 --- a/vendor/kmodules.xyz/offshoot-api/api/v1/runtime_settings_types.go +++ b/vendor/kmodules.xyz/offshoot-api/api/v1/runtime_settings_types.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/offshoot-api/api/v1/types.go b/vendor/kmodules.xyz/offshoot-api/api/v1/types.go index e656273cc..e477edf4e 100644 --- a/vendor/kmodules.xyz/offshoot-api/api/v1/types.go +++ b/vendor/kmodules.xyz/offshoot-api/api/v1/types.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/offshoot-api/api/v1/zz_generated.deepcopy.go b/vendor/kmodules.xyz/offshoot-api/api/v1/zz_generated.deepcopy.go index bed899c9f..fdd32a4cd 100644 --- a/vendor/kmodules.xyz/offshoot-api/api/v1/zz_generated.deepcopy.go +++ b/vendor/kmodules.xyz/offshoot-api/api/v1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/prober/LICENSE b/vendor/kmodules.xyz/prober/LICENSE index 261eeb9e9..8dada3eda 100644 --- a/vendor/kmodules.xyz/prober/LICENSE +++ b/vendor/kmodules.xyz/prober/LICENSE @@ -178,7 +178,7 @@ APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" + boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/prober/api/v1/doc.go b/vendor/kmodules.xyz/prober/api/v1/doc.go index fbf0207f2..da5db8add 100644 --- a/vendor/kmodules.xyz/prober/api/v1/doc.go +++ b/vendor/kmodules.xyz/prober/api/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/prober/api/v1/generated.pb.go b/vendor/kmodules.xyz/prober/api/v1/generated.pb.go index d882c6273..bc56dc58d 100644 --- a/vendor/kmodules.xyz/prober/api/v1/generated.pb.go +++ b/vendor/kmodules.xyz/prober/api/v1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/prober/api/v1/generated.proto b/vendor/kmodules.xyz/prober/api/v1/generated.proto index 8a5648e61..b85bd8761 100644 --- a/vendor/kmodules.xyz/prober/api/v1/generated.proto +++ b/vendor/kmodules.xyz/prober/api/v1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/prober/api/v1/openapi_generated.go b/vendor/kmodules.xyz/prober/api/v1/openapi_generated.go index 423a4d2ff..8324aef22 100644 --- a/vendor/kmodules.xyz/prober/api/v1/openapi_generated.go +++ b/vendor/kmodules.xyz/prober/api/v1/openapi_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/prober/api/v1/types.go b/vendor/kmodules.xyz/prober/api/v1/types.go index d832c4c39..70a9c4afd 100644 --- a/vendor/kmodules.xyz/prober/api/v1/types.go +++ b/vendor/kmodules.xyz/prober/api/v1/types.go @@ -1,5 +1,5 @@ /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/kmodules.xyz/prober/api/v1/zz_generated.deepcopy.go b/vendor/kmodules.xyz/prober/api/v1/zz_generated.deepcopy.go index bd7d3de26..7869f6c5a 100644 --- a/vendor/kmodules.xyz/prober/api/v1/zz_generated.deepcopy.go +++ b/vendor/kmodules.xyz/prober/api/v1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright The Kmodules Authors. +Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/modules.txt b/vendor/modules.txt index 0cb3628ff..38145863e 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -19,7 +19,7 @@ github.com/NYTimes/gziphandler github.com/PuerkitoBio/purell # github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 github.com/PuerkitoBio/urlesc -# github.com/appscode/go v0.0.0-20200323182826-54e98e09185a +# github.com/appscode/go v0.0.0-20200928211031-cc0c23082d91 github.com/appscode/go/analytics github.com/appscode/go/context github.com/appscode/go/encoding/json/types @@ -55,17 +55,15 @@ github.com/dgrijalva/jwt-go # github.com/emicklei/go-restful v2.9.5+incompatible github.com/emicklei/go-restful github.com/emicklei/go-restful/log -# github.com/evanphx/json-patch v4.5.0+incompatible +# github.com/evanphx/json-patch v4.9.0+incompatible github.com/evanphx/json-patch # github.com/fatih/structs v1.1.0 github.com/fatih/structs -# github.com/go-logr/logr v0.1.0 -github.com/go-logr/logr # github.com/go-openapi/jsonpointer v0.19.3 github.com/go-openapi/jsonpointer # github.com/go-openapi/jsonreference v0.19.3 github.com/go-openapi/jsonreference -# github.com/go-openapi/spec v0.19.7 +# github.com/go-openapi/spec v0.19.8 github.com/go-openapi/spec # github.com/go-openapi/swag v0.19.9 github.com/go-openapi/swag @@ -364,7 +362,7 @@ honnef.co/go/tools/staticcheck/vrp honnef.co/go/tools/stylecheck honnef.co/go/tools/unused honnef.co/go/tools/version -# k8s.io/api v0.18.5 => github.com/kmodules/api v0.18.4-0.20200524125823-c8bc107809b9 +# k8s.io/api v0.18.9 => github.com/kmodules/api v0.18.10-0.20200922195318-d60fe725dea0 k8s.io/api/admission/v1 k8s.io/api/admission/v1beta1 k8s.io/api/admissionregistration/v1 @@ -407,7 +405,7 @@ k8s.io/api/settings/v1alpha1 k8s.io/api/storage/v1 k8s.io/api/storage/v1alpha1 k8s.io/api/storage/v1beta1 -# k8s.io/apiextensions-apiserver v0.18.5 +# k8s.io/apiextensions-apiserver v0.18.9 k8s.io/apiextensions-apiserver/pkg/apis/apiextensions k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/install k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1 @@ -418,7 +416,7 @@ k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1 k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1 -# k8s.io/apimachinery v0.18.5 => github.com/kmodules/apimachinery v0.19.0-alpha.0.0.20200520235721-10b58e57a423 +# k8s.io/apimachinery v0.18.9 => github.com/kmodules/apimachinery v0.19.0-alpha.0.0.20200922195535-0c9a1b86beec k8s.io/apimachinery/pkg/api/apitesting k8s.io/apimachinery/pkg/api/apitesting/fuzzer k8s.io/apimachinery/pkg/api/apitesting/roundtrip @@ -475,7 +473,7 @@ k8s.io/apimachinery/pkg/version k8s.io/apimachinery/pkg/watch k8s.io/apimachinery/third_party/forked/golang/json k8s.io/apimachinery/third_party/forked/golang/reflect -# k8s.io/apiserver v0.18.5 => github.com/kmodules/apiserver v0.18.4-0.20200521000930-14c5f6df9625 +# k8s.io/apiserver v0.18.9 => github.com/kmodules/apiserver v0.18.10-0.20200922195747-1bd1cc8f00d1 k8s.io/apiserver/pkg/admission k8s.io/apiserver/pkg/admission/configuration k8s.io/apiserver/pkg/admission/initializer @@ -596,7 +594,7 @@ k8s.io/apiserver/plugin/pkg/audit/truncate k8s.io/apiserver/plugin/pkg/audit/webhook k8s.io/apiserver/plugin/pkg/authenticator/token/webhook k8s.io/apiserver/plugin/pkg/authorizer/webhook -# k8s.io/client-go v12.0.0+incompatible => k8s.io/client-go v0.18.3 +# k8s.io/client-go v12.0.0+incompatible => github.com/kmodules/k8s-client-go v0.18.10-0.20200922201634-73fedf3d677e k8s.io/client-go/discovery k8s.io/client-go/discovery/fake k8s.io/client-go/dynamic @@ -812,7 +810,7 @@ k8s.io/client-go/util/homedir k8s.io/client-go/util/jsonpath k8s.io/client-go/util/keyutil k8s.io/client-go/util/workqueue -# k8s.io/component-base v0.18.5 => k8s.io/component-base v0.18.3 +# k8s.io/component-base v0.18.9 => k8s.io/component-base v0.18.9 k8s.io/component-base/cli/flag k8s.io/component-base/featuregate k8s.io/component-base/metrics @@ -821,9 +819,7 @@ k8s.io/component-base/metrics/testutil k8s.io/component-base/version # k8s.io/klog v1.0.0 k8s.io/klog -# k8s.io/klog/v2 v2.0.0 -k8s.io/klog/v2 -# k8s.io/kube-aggregator v0.18.5 +# k8s.io/kube-aggregator v0.18.9 k8s.io/kube-aggregator/pkg/apis/apiregistration k8s.io/kube-aggregator/pkg/apis/apiregistration/v1 k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1 @@ -838,16 +834,16 @@ k8s.io/kube-openapi/pkg/handler k8s.io/kube-openapi/pkg/schemaconv k8s.io/kube-openapi/pkg/util k8s.io/kube-openapi/pkg/util/proto -# k8s.io/kubernetes v1.18.3 => github.com/kmodules/kubernetes v1.19.0-alpha.0.0.20200521033432-49d3646051ad +# k8s.io/kubernetes v1.18.9 => github.com/kmodules/kubernetes v1.19.0-alpha.0.0.20200922200158-8b13196d8dc4 k8s.io/kubernetes/pkg/util/hash -# k8s.io/utils v0.0.0-20200414100711-2df71ebbae66 +# k8s.io/utils v0.0.0-20200414100711-2df71ebbae66 => k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 k8s.io/utils/buffer k8s.io/utils/integer k8s.io/utils/net k8s.io/utils/path k8s.io/utils/pointer k8s.io/utils/trace -# kmodules.xyz/client-go v0.0.0-20200915091229-7df16c29f4e8 +# kmodules.xyz/client-go v0.0.0-20200929030759-cce6a3c623c1 kmodules.xyz/client-go kmodules.xyz/client-go/api/v1 kmodules.xyz/client-go/apiextensions @@ -862,20 +858,20 @@ kmodules.xyz/client-go/openapi kmodules.xyz/client-go/tools/analytics kmodules.xyz/client-go/tools/cli kmodules.xyz/client-go/tools/clusterid -# kmodules.xyz/crd-schema-fuzz v0.0.0-20200521005638-2433a187de95 +# kmodules.xyz/crd-schema-fuzz v0.0.0-20200922204806-c1426cd7fcf4 kmodules.xyz/crd-schema-fuzz -# kmodules.xyz/custom-resources v0.0.0-20200604135349-9e9f5c4fdba9 +# kmodules.xyz/custom-resources v0.0.0-20200922210108-70f2815a43bb kmodules.xyz/custom-resources/apis/appcatalog kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1 kmodules.xyz/custom-resources/client/clientset/versioned kmodules.xyz/custom-resources/client/clientset/versioned/scheme kmodules.xyz/custom-resources/client/clientset/versioned/typed/appcatalog/v1alpha1 kmodules.xyz/custom-resources/crds -# kmodules.xyz/objectstore-api v0.0.0-20200521103120-92080446e04d +# kmodules.xyz/objectstore-api v0.0.0-20200922210707-59bab27e5d41 kmodules.xyz/objectstore-api/api/v1 -# kmodules.xyz/offshoot-api v0.0.0-20200521035628-e135bf07b226 +# kmodules.xyz/offshoot-api v0.0.0-20200922211229-36acc531abab kmodules.xyz/offshoot-api/api/v1 -# kmodules.xyz/prober v0.0.0-20200521101241-adf06150535c +# kmodules.xyz/prober v0.0.0-20200922212142-743a6514664e kmodules.xyz/prober/api/v1 # kubedb.dev/apimachinery v0.14.0-beta.2 kubedb.dev/apimachinery/apis/config