diff --git a/go.mod b/go.mod index e3891bbb..6605701a 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/rancher/rke -go 1.12 +go 1.13 replace ( github.com/knative/pkg => github.com/rancher/pkg v0.0.0-20190514055449-b30ab9de040e @@ -9,6 +9,7 @@ replace ( require ( github.com/Masterminds/sprig/v3 v3.0.0 + github.com/Microsoft/go-winio v0.4.14 // indirect github.com/blang/semver v3.5.1+incompatible github.com/containerd/containerd v1.3.0-beta.0.0.20190808172034-23faecfb66ab // indirect github.com/coreos/etcd v3.3.17+incompatible @@ -24,9 +25,10 @@ require ( github.com/mattn/go-colorable v0.1.2 github.com/mcuadros/go-version v0.0.0-20180611085657-6d5863ca60fa github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c // indirect - github.com/pkg/errors v0.8.1 - github.com/rancher/norman v0.0.0-20200326201949-eb806263e8ad - github.com/rancher/types v0.0.0-20200326224235-0d1e1dcc8d55 + github.com/opencontainers/image-spec v1.0.1 // indirect + github.com/pkg/errors v0.9.1 + github.com/rancher/norman v0.0.0-20200517050325-f53cae161640 + github.com/rancher/types v0.0.0-20200602180723-12f6c0979333 github.com/sirupsen/logrus v1.4.2 github.com/stretchr/testify v1.4.0 github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 // indirect diff --git a/go.sum b/go.sum index 076c9f0b..c8916827 100644 --- a/go.sum +++ b/go.sum @@ -1,8 +1,6 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= @@ -14,15 +12,11 @@ cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7 cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.3.0/go.mod h1:9IAwXhoyBJ7z9LcAwkj0/7NnPzYaPeZxxVp3zm+5IqA= -contrib.go.opencensus.io/exporter/ocagent v0.4.12/go.mod h1:450APlNTSR6FrvC3CTRqYosuDstRB9un7SOx2k/9ckA= contrib.go.opencensus.io/exporter/ocagent v0.6.0/go.mod h1:zmKjrJcdo0aYcVS7bmEeSEBLPA9YJp5bjrofdU3pIXs= -contrib.go.opencensus.io/exporter/prometheus v0.1.0/go.mod h1:cGFniUXGZlKRjzOyuZJ6mgB+PgBcCIa79kEKR8YCW+A= -contrib.go.opencensus.io/exporter/stackdriver v0.12.7/go.mod h1:ZOhmSfHIoyVaQ+bKN+lR4h7K2olTIJsrdOwWHsNGw4w= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= github.com/Azure/azure-sdk-for-go v23.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v32.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v36.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-storage-blob-go v0.8.0/go.mod h1:lPI3aLPpuLTeUwh1sViKXFxwl2B6teiRqI0deQUvsw0= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= @@ -30,7 +24,6 @@ github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX github.com/Azure/go-autorest v11.2.8+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest v0.9.3-0.20191028180845-3492b2aff503/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest/adal v0.1.0/go.mod h1:MeS4XhScH55IST095THyTxElntu7WqB7pNbZo8Q5G3E= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.1-0.20191028180845-3492b2aff503/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= @@ -38,17 +31,13 @@ github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+v github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= -github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= github.com/Azure/go-autorest/autorest/to v0.3.1-0.20191028180845-3492b2aff503/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= -github.com/Azure/go-autorest/autorest/validation v0.2.0/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI= github.com/Azure/go-autorest/autorest/validation v0.2.1-0.20191028180845-3492b2aff503/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/tracing v0.1.0/go.mod h1:ROEEAFwXycQw7Sn3DXNtEedEvdeRAgDr0izn4z5Ij88= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/Jeffail/gabs v1.1.1/go.mod h1:6xMvQMK4k33lb7GUUpaAPh6nKMmemQeg5d4gn7/bOXc= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd h1:sjQovDkwrZp8u+gxLtPgKGjk5hCxuy2hrRejBTA9xFU= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= github.com/Masterminds/goutils v1.1.0 h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg= @@ -57,11 +46,10 @@ github.com/Masterminds/semver/v3 v3.0.1 h1:2kKm5lb7dKVrt5TYUiAavE6oFc1cFT0057UVG github.com/Masterminds/semver/v3 v3.0.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Masterminds/sprig/v3 v3.0.0 h1:KSQz7Nb08/3VU9E4ns29dDxcczhOD1q7O1UfM4G3t3g= github.com/Masterminds/sprig/v3 v3.0.0/go.mod h1:NEUY/Qq8Gdm2xgYA+NwJM6wmfdRV9xkh8h/Rld20R0U= -github.com/Microsoft/go-winio v0.4.12 h1:xAfWHN1IrQ0NJ9TBC0KBZoqLjzDTr1ML+4MywiUOryc= -github.com/Microsoft/go-winio v0.4.12/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= +github.com/Microsoft/go-winio v0.4.14 h1:+hMXMk01us9KgxGb7ftKQt2Xpf5hH/yky+TDA+qxleU= +github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= -github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OneOfOne/xxhash v1.2.6/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= @@ -71,11 +59,8 @@ github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbt github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/SAP/go-hdb v0.14.1/go.mod h1:7fdQLVC2lER3urZLjZCm0AuMQfApof92n3aylBPEkMo= -github.com/SermoDigital/jose v0.9.1/go.mod h1:ARgCUhI1MHQH+ONky/PAtmVHQrP5JlGY0F3poXOp/fA= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/Venafi/vcert v0.0.0-20190613103158-62139eb19b25/go.mod h1:3sXw16DKVded/kLVDma2veqEUQC7O37h98ims7cIvN4= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -94,8 +79,6 @@ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= 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= -github.com/aws/aws-sdk-go v1.22.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.24.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -103,17 +86,13 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA= github.com/brancz/gojsontoyaml v0.0.0-20190425155809-e8bd32d46b3d/go.mod h1:IyUJYN1gvWjtLF5ZuygmxbnsAyP3aJS6cHzIuZY50B0= github.com/campoy/embedmd v1.0.0/go.mod h1:oxyr9RCiSXg0M3VJ3ks0UGfp98BpSSGr0kpiX3MzVl8= github.com/cenkalti/backoff v0.0.0-20181003080854-62661b46c409/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff v2.1.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v0.0.0-20181017004759-096ff4a8a059/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= @@ -125,17 +104,12 @@ github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1 github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/cloudflare-go v0.8.5/go.mod h1:8KhU6K+zHUEWOSU++mEQYf7D9UZOcQcibUoSm6vCUz4= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/containerd/containerd v1.3.0-beta.0.0.20190808172034-23faecfb66ab h1:lLoKpH/jolCo6LOWonSg8psTvcGAF7qklWRhcfvVsqc= github.com/containerd/containerd v1.3.0-beta.0.0.20190808172034-23faecfb66ab/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/continuity v0.0.0-20181203112020-004b46473808/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/coreos/bbolt v1.3.1-coreos.6/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/bbolt v1.3.3 h1:n6AiVyVRKQFNb6mJlwESEvvLoDyiTzXX7ORAUlkeBdY= -github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.15+incompatible h1:+9RjdC18gMxNQVvSiXvObLu29mOFmkgdsB4cRTlV+EE= github.com/coreos/etcd v3.3.15+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.17+incompatible h1:f/Z3EoDSx1yjaIjLQGo1diYUlQYSBrrAQ5vP8NjwXwo= github.com/coreos/etcd v3.3.17+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -145,15 +119,11 @@ github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/prometheus-operator v0.36.0 h1:ayzkQoqfbnEne+ZMOZl30ZzSymY6KFpzA58QLz+4wlw= github.com/coreos/prometheus-operator v0.36.0/go.mod h1:b1ydz/Rg9TqDtHu2MDXKfiX/Hv0Bogy1iY82fRbhEFg= -github.com/cpu/goacmedns v0.0.0-20180701200144-565ecf2a84df/go.mod h1:sesf/pNnCYwUevQEQfEwY0Y3DydlQWSGZbaMElOWxok= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -161,12 +131,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1:dv4zxwHi5C/8AeI+4gX4dCWOIvNi7I6JCSX0HvlKPgE= -github.com/deislabs/smi-sdk-go v0.2.0/go.mod h1:0k1wou4pOCBNFoyxOkTUoB9XDtB2RBvJ03S5aJREHCI= -github.com/denisenkom/go-mssqldb v0.0.0-20190412130859-3b1d194e553a/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM= -github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20190329191031-25c5027a8c7b/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/digitalocean/godo v1.6.0/go.mod h1:h6faOIcZ8lWIwNQ+DN7b3CgX4Kwby5T+nbpNqkUIozU= github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= @@ -180,7 +146,6 @@ github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96 h1:cenwrSVm+Z7QLSV/BsnenAOcDXdX4cMv4wP0B/5QbPg= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/duosecurity/duo_api_golang v0.0.0-20190308151101-6c680f768e74/go.mod h1:UqXY1lYT/ERa4OEAywUqdok1T4RCRdArkhic1Opuavo= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= @@ -192,7 +157,6 @@ github.com/elastic/go-sysinfo v1.1.1/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6 github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU= github.com/elastic/go-windows v1.0.1/go.mod h1:FoVvqWSun28vaDQPbj2Elfc0JahhPB7WQEGa3c814Ss= github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= @@ -200,7 +164,6 @@ github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= 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= @@ -209,10 +172,8 @@ github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZM 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= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/fatih/structtag v1.1.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -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/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= @@ -229,8 +190,6 @@ github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= -github.com/go-logr/zapr v0.1.1/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.17.2/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= @@ -290,28 +249,19 @@ github.com/go-openapi/validate v0.17.2/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+ github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= -github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gobuffalo/envy v1.6.5/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= github.com/gobuffalo/flect v0.1.5/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= -github.com/gocql/gocql v0.0.0-20190402132108-0e1d5de854df/go.mod h1:4Fw1eo5iaEhDUs8XyuhSVCVy52Jq3L+/3GJgYkwc+/0= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d h1:3PaI8p3seN09VjbTYC/QWlUZdZ1qS1zGjy7LH2Wt07I= github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.2.2-0.20190730201129-28a6bbf47e48/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef h1:veQD95Isof8w9/WXiA+pa3tz3fJXkt5B7QaRBrM62gk= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9 h1:uHTyIjqVhYRhLbJ8nIiOJHkEZZ+5YoOsAbD3sk82NiE= github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -321,13 +271,11 @@ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangplus/bytes v0.0.0-20160111154220-45c989fe5450/go.mod h1:Bk6SMAONeMXrxql8uvOKuAZSu8aM5RUGv+1C6IJaEho= github.com/golangplus/fmt v0.0.0-20150411045040-2a5d6d7d2995/go.mod h1:lJgMEyOkYFkPcDKwRXegd+iM6E7matEszMG5HhwytU8= github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk= -github.com/google/addlicense v0.0.0-20190510175307-22550fa7c1b0/go.mod h1:QtPG26W17m+OIQgE6gQ24gC1M6pUaMBAbFrTIDtwG/E= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -336,10 +284,8 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= -github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -358,7 +304,6 @@ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5m github.com/googleapis/gnostic v0.0.0-20170426233943-68f4ded48ba9/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.2.0 h1:l6N3VoaVzTncYYW+9yOz2LJJammFZGBO13sqgEhpy9g= github.com/googleapis/gnostic v0.2.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.3.1 h1:WeAefnSUHlBb0iJKwxFDZdbfGwkd7xRNuV+IpXMJhYk= github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= @@ -366,34 +311,22 @@ github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEo github.com/gophercloud/gophercloud v0.3.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gophercloud/gophercloud v0.6.0/go.mod h1:GICNByuaEBibcjmjvI7QvYJSZEbGkcYwAR7EZK2WMqM= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gopherjs/gopherjs v0.0.0-20191106031601-ce3c9ade29de h1:F7WD09S8QB4LrkEpka0dFPLSotH11HRpCsLIbIcJ7sU= github.com/gopherjs/gopherjs v0.0.0-20191106031601-ce3c9ade29de/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/gregjones/httpcache v0.0.0-20190212212710-3befbb6ad0cc h1:f8eY6cV/x1x+HLjOp4r72s/31/V2aTUtg5oKRRPf8/Q= -github.com/gregjones/httpcache v0.0.0-20190212212710-3befbb6ad0cc/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v0.0.0-20190222133341-cfaf5686ec79/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4 h1:z53tR0945TRRQO/fLEVPI6SMv7ZflF0TEaTAoU7tOzg= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 h1:THDBEeQ9xZ8JEaCLyLQqXMMdRqNr0QAUJTIkQAUtFjg= github.com/grpc-ecosystem/go-grpc-middleware v1.1.0/go.mod h1:f5nM7jw/oeRSadq3xCzHAvxcr8HZnzsqU6ILg/0NiiE= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.3.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= -github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.4/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.5 h1:UImYN5qQ8tuGpGE16ZmjvcTtTw24zw1QAp/SlnNrZhI= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.12.1 h1:zCy2xE9ablevUOrUZc3Dl72Dt+ya2FNAvC2yLYMHzi4= github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= -github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= @@ -401,15 +334,11 @@ github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyN github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= -github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.1.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-memdb v1.0.0/go.mod h1:I6dKdmYhZqU0RJSheVEWgTNWdVQH5QvTgIUQ0t/t32M= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-plugin v1.0.0/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= @@ -421,11 +350,9 @@ github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.3 h1:YPkqC67at8FYaadspW/6uE0COsBxS2656RLEr8Bppgk= github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/golang-math-big v0.0.0-20180316142257-561262b71329/go.mod h1:eBwVNKMPVQvPzsL2kU1sgH+Wf3xcmgFCvFSyGDEUSgc= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= @@ -433,10 +360,6 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p github.com/hashicorp/memberlist v0.1.5/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/serf v0.8.5/go.mod h1:UpNcs7fFbpKIyZaUuSW6EPiH+eZC7OuyFD+wc1oal+k= -github.com/hashicorp/vault v0.9.6/go.mod h1:KfSyffbKxoVyspOdlaGVjIuwLobi07qD1bAbosPMpP0= -github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= -github.com/howeyc/gopass v0.0.0-20170109162249-bf9dde6d0d2c/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.2.0 h1:yPeWdRnmynF7p+lLYz0H2tthW9lqhMJrQV/U7yy4wX0= github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= @@ -447,14 +370,10 @@ github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb v1.7.7/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= -github.com/jefferai/jsonx v1.0.0/go.mod h1:OGmqmi2tTeI/PS+qQfBDToLHHJIy/RMp24fPo8vFvoQ= github.com/jessevdk/go-flags v0.0.0-20180331124232-1c38ed7ad0cc/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jetstack/cert-manager v0.12.0/go.mod h1:jslhqEXKW8D9U/EYSX1Eb9Iy7yZ69O3wfhznNV7Gokg= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -466,30 +385,23 @@ github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/jsonnet-bundler/jsonnet-bundler v0.2.0/go.mod h1:/by7P/OoohkI3q4CgSFqcoFsVY+IaNbzOVDknEsKDeU= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/keybase/go-crypto v0.0.0-20190403132359-d65b6b94177f/go.mod h1:ghbZscTyKdM07+Fw3KSi0hcJm+AlEUWj8QLlPtijN/M= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -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= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kubernetes-client/go v0.0.0-20190516163813-075b33afc74f/go.mod h1:ks4KCmmxdXksTSu2dlnUanEOqNd/dsoyS6/7bay2RQ8= github.com/kylelemons/godebug v0.0.0-20160406211939-eadb3ce320cb/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/leanovate/gopter v0.2.4/go.mod h1:gNcbPWNEWRe4lm+bycKqxUYoH5uoVje5SkOJ3uoLer8= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= @@ -504,12 +416,9 @@ github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0 h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= -github.com/markbates/inflect v1.0.4/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs= github.com/maruel/panicparse v0.0.0-20171209025017-c0182c169410/go.mod h1:nty42YY5QByNC5MM7q/nj938VbgPU7avs45z6NClpxI= github.com/maruel/ut v1.0.0/go.mod h1:I68ffiAt5qre9obEVTy7S2/fj2dJku2NYLvzPuY0gqE= -github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd h1:HvFwW+cm9bCbZ/+vuGNq7CRWXql8c0y8nGeYpqmpvmk= github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= -github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a/go.mod h1:M1qoD/MqPgTZIk0EWKB38wE28ACRfVcn+cU08jyArI0= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -518,7 +427,6 @@ github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HN github.com/mattn/go-ieproxy v0.0.0-20191113090002-7c0f6868bffe/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.6 h1:SrwhHcpV4nWrMGdNcC2kXpMfcBVYGDuTArqyhocJgvA= github.com/mattn/go-isatty v0.0.6/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= @@ -529,9 +437,6 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0j github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mcuadros/go-version v0.0.0-20180611085657-6d5863ca60fa h1:XvNrttGMJfVrUqblGju4IkjYXwx6l5OAAyjaIsydzsk= github.com/mcuadros/go-version v0.0.0-20180611085657-6d5863ca60fa/go.mod h1:76rfSfYPWj01Z85hUf/ituArm797mNKcvINh1OlsZKo= -github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= -github.com/mgutz/logxi v0.0.0-20161027140823-aebf8a7d67ab/go.mod h1:y1pL58r5z2VvAjeG1VLGc8zOQgSOzbKN7kMHPvFXJ+8= -github.com/miekg/dns v0.0.0-20170721150254-0f3adef2e220/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.15/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.22/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= @@ -542,7 +447,6 @@ github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMK github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= @@ -560,13 +464,10 @@ github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lN github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c h1:nXxl5PrvVm2L/wCy8dQu6DMTwH4oIuGN8GJDAlqDdVE= github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mozillazg/go-cos v0.13.0/go.mod h1:Zp6DvvXn0RUOXGJ2chmWt2bLEqRAnJnS3DnAZsJsoaE= github.com/mozillazg/go-httpheader v0.2.1/go.mod h1:jJ8xECTlalr6ValeXYdOF8fFUISeBAdw6E61aqQma60= -github.com/munnerz/crd-schema-fuzz v0.0.0-20191114184610-fbd148d44a0a/go.mod h1:fVs1Mso4ZxhlygBEUDgOcyLtp5/DnLuCb8H5GI3CzS4= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/munnerz/goautoneg v0.0.0-20190414153302-2ae31c8b6b30/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -581,42 +482,36 @@ github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.3 h1:OoxbjfXVZyod1fmWYhI7SEyaD8B00ynP3T+D5GiyHOY= github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.1 h1:K0jcRCwNQM3vFGh1ppMtDh/+7ApJrjldlX8fA0jDTLQ= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/openshift/prom-label-proxy v0.1.1-0.20191016113035-b8153a7f39f1/go.mod h1:p5MuxzsYP1JPsNGwtjtcgRHHlGziCJJfztff91nNixw= github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9/go.mod h1:PLldrQSroqzH70Xl+1DQcGnefIbqsKR7UDaiux3zV+w= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/ory/dockertest v3.3.4+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -656,20 +551,26 @@ github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+Gx github.com/prometheus/prometheus v0.0.0-20180315085919-58e2a31db8de/go.mod h1:oAIUtOny2rjMX0OWN5vPR5/q/twIROJvdqnQKDdil/s= github.com/prometheus/prometheus v1.8.2-0.20200107122003-4708915ac6ef/go.mod h1:7U90zPoLkWjEIQcy/rweQla82OCTUzxVHE51G3OhJbI= github.com/prometheus/prometheus v2.3.2+incompatible/go.mod h1:oAIUtOny2rjMX0OWN5vPR5/q/twIROJvdqnQKDdil/s= -github.com/rancher/norman v0.0.0-20200211155126-fc45a55d4dfd h1:96iahn2n4qq7EuJ6QNrW2iqm1xVUktzjHSyNPPm/6YU= -github.com/rancher/norman v0.0.0-20200211155126-fc45a55d4dfd/go.mod h1:b+483H276jRBXYosdWrNKFpxH+JYMs3UIdlV60dhdg0= -github.com/rancher/norman v0.0.0-20200326201949-eb806263e8ad h1:Ha6G8j9yfKrvJQeKmPpNzyloJ+98GuD4a3zMwASlgbs= +github.com/rancher/lasso v0.0.0-20200515155337-a34e1e26ad91 h1:p4VVl0tr6YAeUILFMCn+0DKzbUOS0ah9biSsL7Sy6S4= +github.com/rancher/lasso v0.0.0-20200515155337-a34e1e26ad91/go.mod h1:G6Vv2aj6xB2YjTVagmu4NkhBvbE8nBcGykHRENH6arI= github.com/rancher/norman v0.0.0-20200326201949-eb806263e8ad/go.mod h1:g72A7RbW+GCqXicpQumVjmyHz2tP9AiiuRGRm+Ewnyo= -github.com/rancher/pkg v0.0.0-20190514055449-b30ab9de040e h1:j6+HqCET/NLPBtew2m5apL7jWw/PStQ7iGwXjgAqdvo= +github.com/rancher/norman v0.0.0-20200517050325-f53cae161640 h1:wZT4IWBeMfKewJ+ZSCuOFjHh+voTJWYQo7jTd/ZtE90= +github.com/rancher/norman v0.0.0-20200517050325-f53cae161640/go.mod h1:92rz/7QN7DOeLQZlJY/8aFBOmF085igIVguR0wpxLas= github.com/rancher/pkg v0.0.0-20190514055449-b30ab9de040e/go.mod h1:XbYHTPaXuw8ZY9bylhYKQh/nJxDaTKk3YhAxPl4Qy/k= -github.com/rancher/types v0.0.0-20200326224235-0d1e1dcc8d55 h1:0F1WNqBBZKIQAUKEjqSw1xGVwdyBoAy0SIJVVkWkKGI= -github.com/rancher/types v0.0.0-20200326224235-0d1e1dcc8d55/go.mod h1:k5LoTlUpefw0eAzFSJsZI0gf+C4WE41yrc1jm/MS1nM= -github.com/rancher/wrangler v0.4.1/go.mod h1:1cR91WLhZgkZ+U4fV9nVuXqKurWbgXcIReU4wnQvTN8= -github.com/rancher/wrangler v0.5.0 h1:zTchAfY9DzchLvXpRpQuNB0PbNfl/HSuvFL1wHN6mDU= -github.com/rancher/wrangler v0.5.0/go.mod h1:txHSBkPtVgNH/0pUCvdP0Ak0HptAOc9ffBmFxQnL4z4= -github.com/rancher/wrangler v0.5.4-0.20200326191509-4054411d9736 h1:hqpVLgNUxU5sQUV6SzJPMY8Fy7T9Qht2QkA2Q7O/SH0= +github.com/rancher/types v0.0.0-20200602180723-12f6c0979333 h1:rForEXPG3BAlYxx6fVQnWy4nRQq4gsJB1Suy8+lWJdU= +github.com/rancher/types v0.0.0-20200602180723-12f6c0979333/go.mod h1:1f9IG3X8ZreqsCNnt60wcEpGC4p8k9qYp/UZflb1DYw= github.com/rancher/wrangler v0.5.4-0.20200326191509-4054411d9736/go.mod h1:L4HtjPeX8iqLgsxfJgz+JjKMcX2q3qbRXSeTlC/CSd4= -github.com/rancher/wrangler-api v0.5.0/go.mod h1:Ne7fjNRBDdUYPqltLUCW8eiaQwuKXIyAJH6wsuGK80w= +github.com/rancher/wrangler v0.6.2-0.20200515155908-1923f3f8ec3f h1:QPOlhiY3YCPLsEtOmPam+ghtqip/f/zsfz4F4PF70D8= +github.com/rancher/wrangler v0.6.2-0.20200515155908-1923f3f8ec3f/go.mod h1:NmtmlLkchboIksYJuBemwcP4RBfv8FpeyhVoWXB9Wdc= +github.com/rancher/wrangler-api v0.6.1-0.20200515193802-dcf70881b087/go.mod h1:s95VCVHV19b+EUo7BAwwe6nhaDx2/lHu91hxxDHbZs0= +github.com/rawmind0/types v0.0.0-20200526161211-12c4c8f9f382 h1:MOAWPa87U2rsi5NPKNLkdR0NqRZIzJ00GrvJb4cBS7o= +github.com/rawmind0/types v0.0.0-20200526161211-12c4c8f9f382/go.mod h1:sNZ54djEEcWsgbg1zObN7RgRs7vDdTCU8Ot4ismwzds= +github.com/rawmind0/types v0.0.0-20200528200251-7df10f2d33a8 h1:bvNrX+fPSq2aOxT2KD3pTPAauhavTYkY3VMTsrYnUcY= +github.com/rawmind0/types v0.0.0-20200528200251-7df10f2d33a8/go.mod h1:1f9IG3X8ZreqsCNnt60wcEpGC4p8k9qYp/UZflb1DYw= +github.com/rawmind0/types v0.0.0-20200529003624-3371a5cfcfde h1:GaSzPyqXzsdVDEHxzrLUGyGUyf+hqcjXLnhjWDfoy64= +github.com/rawmind0/types v0.0.0-20200529003624-3371a5cfcfde/go.mod h1:1f9IG3X8ZreqsCNnt60wcEpGC4p8k9qYp/UZflb1DYw= +github.com/rawmind0/types v0.0.0-20200602174311-7aaf7f29d0c3 h1:404f14Szu27wnXB1Miy88RXZU29x0x0F1CrA4TLeQQs= +github.com/rawmind0/types v0.0.0-20200602174311-7aaf7f29d0c3/go.mod h1:1f9IG3X8ZreqsCNnt60wcEpGC4p8k9qYp/UZflb1DYw= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= @@ -680,7 +581,6 @@ github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNue github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= github.com/samuel/go-zookeeper v0.0.0-20190810000440-0ceca61e4d75/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/santhosh-tekuri/jsonschema v1.2.4/go.mod h1:TEAUOeZSmIxTTuHatJzrvARHiuO9LYd+cIxzgEHCQI4= @@ -688,23 +588,19 @@ github.com/satori/go.uuid v0.0.0-20160603004225-b111a074d5ef/go.mod h1:dA0hQrYB0 github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/sethgrid/pester v0.0.0-20190127155807-68a33a018ad0/go.mod h1:Ad7IjTpvzZO8Fl0vh9AzQ+j/jYZfyp2diGwI8m5q+ns= github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= github.com/shurcooL/vfsgen v0.0.0-20180825020608-02ddb050ef6b/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/assertions v1.0.1 h1:voD4ITNjPL5jjBfgR/r8fPIIBrliWrWHeiJApdr3r4w= github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.3/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -730,12 +626,9 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/tektoncd/pipeline v0.9.1/go.mod h1:IZzJdiX9EqEMuUcgdnElozdYYRh0/ZRC+NKMLj1K3Yw= -github.com/tent/http-link-go v0.0.0-20130702225549-ac974c61c2f9/go.mod h1:RHkNRtSLfOK7qBTHaeSX1D6BNpI3qw7NTxsmNr4RvN8= github.com/thanos-io/thanos v0.10.1/go.mod h1:usT/TxtJQ7DzinTt+G9kinDQmRS5sxwu0unVKZ9vdcw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/uber/jaeger-client-go v2.20.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= @@ -745,7 +638,6 @@ github.com/urfave/cli v1.20.0 h1:fDqGv3UG/4jbVl/QkFwEdddtEDjh/5Ov6X+0B/3bPaw= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/handysort v0.0.0-20150421192137-fb3537ed64a1/go.mod h1:QcJo0QPSfTONNIgpN5RA8prR7fF8nkF6cTWTcNerRO8= github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= @@ -754,7 +646,6 @@ go.elastic.co/apm v1.5.0/go.mod h1:OdB9sPtM6Vt7oz3VXt7+KR96i9li74qrxBGHTQygFvk= go.elastic.co/apm/module/apmhttp v1.5.0/go.mod h1:1FbmNuyD3ddauwzgVwFB0fqY6KbZt3JkV187tGCYYhY= go.elastic.co/apm/module/apmot v1.5.0/go.mod h1:d2KYwhJParTpyw2WnTNy8geNlHKKFX+4oK3YLlsesWE= go.elastic.co/fastjson v1.0.0/go.mod h1:PmeUOMMtLHQr9ZS9J9owrAVg0FkaZDRZJEFTTGHtchs= -go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= @@ -766,18 +657,13 @@ go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v0.0.0-20181018215023-8dc6146f7569/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.0 h1:OI5t8sDa1Or+q8AeE+yKeB/SDYioSHAgcVljj9JIETY= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/automaxprocs v1.2.0/go.mod h1:YfO3fm683kQpzETxlTGZhGIVmXAhaw3gxeBADbpZtnU= go.uber.org/multierr v0.0.0-20180122172545-ddea229ff1df/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v0.0.0-20180814183419-67bc79d13d15/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -785,18 +671,13 @@ golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190424203555-c05e17bb3b2d/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7 h1:0hQKqeLdqlt5iIwVOBErRisrHJAN57yOiPRQItI20fU= golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= -golang.org/x/crypto v0.0.0-20191112222119-e1110fd1c708 h1:pXVtWnwHkrWD9ru3sDxY/qFK/bfc0egRovX91EjWjf4= golang.org/x/crypto v0.0.0-20191112222119-e1110fd1c708/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 h1:/Tl7pH94bvbAAHBdZJT947M/+gp0+CqQXDtMRC0fseo= golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -815,7 +696,6 @@ golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTk golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= @@ -849,13 +729,11 @@ golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 h1:rjwSpXsdiK0dV8/Naq3kAw9ymfAeJIyd0upUIElB+lI= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191112182307-2180aed22343 h1:00ohfJ4K98s3m6BGUoBd8nyfp4Yl0GoIKvw5abItTjI= golang.org/x/net v0.0.0-20191112182307-2180aed22343/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -875,7 +753,6 @@ golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -884,7 +761,6 @@ golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190425045458-9f0b1ff7b46a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190425145619-16072639606e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -893,7 +769,6 @@ golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -913,7 +788,6 @@ golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -949,13 +823,9 @@ golang.org/x/tools v0.0.0-20191017205301-920acffc3e65/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191111182352-50fa39b762bc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2 h1:EtTFh6h4SAKemS+CURDMTDIANuduG5zKEXShyy18bGA= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ= @@ -969,16 +839,13 @@ google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsb google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873 h1:nfPFGzJkUDX6uBmpN/pSw7MbOAWegH5QDQuoXFHedLg= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= @@ -989,46 +856,35 @@ google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBr google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9 h1:6XzpBoANz1NqMNfDXzc2QmHmbb1vyMsvRfoP5rM+K1I= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1 h1:q4XQuHFC6I28BKZpo6IYyb3mNO+l7lSOxRuYTCiDfXk= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= -google.golang.org/grpc v1.25.1 h1:wdKvqQk7IttEw92GoRyKG2IDrUIpgpj6H6m81yfeMW0= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/fsnotify/fsnotify.v1 v1.4.7/go.mod h1:Fyux9zXlo4rWoMSIzpn9fDAYjalPqJ/K1qJ27s+7ltE= gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.38.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/ory-am/dockertest.v3 v3.3.4/go.mod h1:s9mmoLkaGeAh97qygnNj4xWkiN7e1SKekYC6CovU+ek= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.1.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1036,12 +892,10 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5 h1:ymVxjfMaHvXD8RqPRmzHHsB3VvucivSkIAvJFDI5O3c= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1050,82 +904,42 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= -k8s.io/api v0.0.0-20181213150558-05914d821849/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA= k8s.io/api v0.0.0-20190813020757-36bff7324fb7/go.mod h1:3Iy+myeAORNCLgjd/Xu9ebwN7Vh59Bw0vh9jhoX+V58= k8s.io/api v0.0.0-20190918155943-95b840bb6a1f/go.mod h1:uWuOHnjmNrtQomJrvEBg0c0HRNyQ+8KTEERVsK0PW48= -k8s.io/api v0.0.0-20191016110408-35e52d86657a/go.mod h1:/L5qH+AD540e7Cetbui1tuJeXdmNhO8jM6VkXeDdDhQ= -k8s.io/api v0.0.0-20191114100352-16d7abae0d2a/go.mod h1:qetVJgs5i8jwdFIdoOZ70ks0ecgU+dYwqZ2uD1srwOU= k8s.io/api v0.0.0-20191115095533-47f6de673b26/go.mod h1:iA/8arsvelvo4IDqIhX4IbjTEKBGgvsf2OraTuRtLFU= -k8s.io/api v0.17.0/go.mod h1:npsyOePkeP0CPwyGfXDHxvypiYMJxBWAMpQxCaJ4ZxI= -k8s.io/api v0.17.2 h1:NF1UFXcKN7/OOv1uxdRz3qfra8AHsPav5M93hlV9+Dc= -k8s.io/api v0.17.2/go.mod h1:BS9fjjLc4CMuqfSO8vgbHPKMt5+SF0ET6u/RVDihTo4= k8s.io/api v0.18.0 h1:lwYk8Vt7rsVTwjRU6pzEsa9YNhThbmbocQlKvNBB4EQ= k8s.io/api v0.18.0/go.mod h1:q2HRQkfDzHMBZL9l/y9rH63PkQl4vae0xRT+8prbrK8= k8s.io/apiextensions-apiserver v0.0.0-20190918161926-8f644eb6e783/go.mod h1:xvae1SZB3E17UpV59AWc271W/Ph25N+bjPyR63X6tPY= -k8s.io/apiextensions-apiserver v0.0.0-20191016113550-5357c4baaf65/go.mod h1:5BINdGqggRXXKnDgpwoJ7PyQH8f+Ypp02fvVNcIFy9s= -k8s.io/apiextensions-apiserver v0.0.0-20191114105449-027877536833/go.mod h1:Gb1G2W/kXMizbVTnA9oh2ybQ4cM3COr3r5JDj+DzKGw= -k8s.io/apiextensions-apiserver v0.17.0/go.mod h1:XiIFUakZywkUl54fVXa7QTEHcqQz9HG55nHd1DCoHj8= -k8s.io/apiextensions-apiserver v0.17.2/go.mod h1:4KdMpjkEjjDI2pPfBA15OscyNldHWdBCfsWMDWAmSTs= k8s.io/apiextensions-apiserver v0.18.0/go.mod h1:18Cwn1Xws4xnWQNC00FLq1E350b9lUF+aOdIWDOZxgo= -k8s.io/apimachinery v0.0.0-20181127025237-2b1284ed4c93/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= k8s.io/apimachinery v0.0.0-20190809020650-423f5d784010/go.mod h1:Waf/xTS2FGRrgXCkO5FP3XxTOWh0qLf2QhL1qFZZ/R8= k8s.io/apimachinery v0.0.0-20190913080033-27d36303b655/go.mod h1:nL6pwRT8NgfF8TT68DBI8uEePRt89cSvoXUVqbkWHq4= -k8s.io/apimachinery v0.0.0-20191004115801-a2eda9f80ab8/go.mod h1:llRdnznGEAqC3DcNm6yEj472xaFVfLM7hnYofMb12tQ= -k8s.io/apimachinery v0.0.0-20191028221656-72ed19daf4bb/go.mod h1:llRdnznGEAqC3DcNm6yEj472xaFVfLM7hnYofMb12tQ= k8s.io/apimachinery v0.0.0-20191115015347-3c7067801da2/go.mod h1:dXFS2zaQR8fyzuvRdJDHw2Aerij/yVGJSre0bZQSVJA= -k8s.io/apimachinery v0.17.0/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg= -k8s.io/apimachinery v0.17.2 h1:hwDQQFbdRlpnnsR64Asdi55GyCaIP/3WQpMmbNBeWr4= -k8s.io/apimachinery v0.17.2/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg= k8s.io/apimachinery v0.18.0 h1:fuPfYpk3cs1Okp/515pAf0dNhL66+8zk8RLbSX+EgAE= k8s.io/apimachinery v0.18.0/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= k8s.io/apiserver v0.0.0-20190918160949-bfa5e2e684ad/go.mod h1:XPCXEwhjaFN29a8NldXA901ElnKeKLrLtREO9ZhFyhg= -k8s.io/apiserver v0.0.0-20191016112112-5190913f932d/go.mod h1:7OqfAolfWxUM/jJ/HBLyE+cdaWFBUoo5Q5pHgJVj2ws= -k8s.io/apiserver v0.0.0-20191114103151-9ca1dc586682/go.mod h1:Idob8Va6/sMX5SmwPLsU0pdvFlkwxuJ5x+fXMG8NbKE= -k8s.io/apiserver v0.17.0/go.mod h1:ABM+9x/prjINN6iiffRVNCBR2Wk7uY4z+EtEGZD48cg= -k8s.io/apiserver v0.17.2 h1:NssVvPALll6SSeNgo1Wk1h2myU1UHNwmhxV0Oxbcl8Y= -k8s.io/apiserver v0.17.2/go.mod h1:lBmw/TtQdtxvrTk0e2cgtOxHizXI+d0mmGQURIHQZlo= k8s.io/apiserver v0.18.0 h1:ELAWpGWC6XdbRLi5lwAbEbvksD7hkXxPdxaJsdpist4= k8s.io/apiserver v0.18.0/go.mod h1:3S2O6FeBBd6XTo0njUrLxiqk8GNy6wWOftjhJcXYnjw= k8s.io/cli-runtime v0.18.0 h1:jG8XpSqQ5TrV0N+EZ3PFz6+gqlCk71dkggWCCq9Mq34= k8s.io/cli-runtime v0.18.0/go.mod h1:1eXfmBsIJosjn9LjEBUd2WVPoPAY9XGTqTFcPMIBsUQ= k8s.io/client-go v0.18.0 h1:yqKw4cTUQraZK3fcVCMeSa+lqKwcjZ5wtcOIPnxQno4= k8s.io/client-go v0.18.0/go.mod h1:uQSYDYs4WhVZ9i6AIoEZuwUggLVEF64HOD37boKAtF8= -k8s.io/code-generator v0.0.0-20181114232248-ae218e241252/go.mod h1:IPqxl/YHk05nodzupwjke6ctMjyNRdV2zZ5/j3/F204= k8s.io/code-generator v0.0.0-20190912054826-cd179ad6a269/go.mod h1:V5BD6M4CyaN5m+VthcclXWsVcT1Hu+glwa1bi3MIsyE= -k8s.io/code-generator v0.0.0-20191004115455-8e001e5d1894/go.mod h1:mJUgkl06XV4kstAnLHAIzJPVCOzVR+ZcfPIv4fUsFCY= -k8s.io/code-generator v0.17.0/go.mod h1:DVmfPQgxQENqDIzVR2ddLXMH34qeszkKSdH/N+s+38s= -k8s.io/code-generator v0.17.2/go.mod h1:DVmfPQgxQENqDIzVR2ddLXMH34qeszkKSdH/N+s+38s= k8s.io/code-generator v0.18.0/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= k8s.io/component-base v0.0.0-20190918160511-547f6c5d7090/go.mod h1:933PBGtQFJky3TEwYx4aEPZ4IxqhWh3R6DCmzqIn1hA= -k8s.io/component-base v0.0.0-20191016111319-039242c015a9/go.mod h1:SuWowIgd/dtU/m/iv8OD9eOxp3QZBBhTIiWMsBQvKjI= -k8s.io/component-base v0.0.0-20191114102325-35a9586014f7/go.mod h1:9rNMvrwbqPF4MxI+VQYETrWqMKxi8yAd8YZLdSJ9EDw= -k8s.io/component-base v0.17.0/go.mod h1:rKuRAokNMY2nn2A6LP/MiwpoaMRHpfRnrPaUJJj1Yoc= -k8s.io/component-base v0.17.2/go.mod h1:zMPW3g5aH7cHJpKYQ/ZsGMcgbsA/VyhEugF3QT1awLs= k8s.io/component-base v0.18.0 h1:I+lP0fNfsEdTDpHaL61bCAqTZLoiWjEEP304Mo5ZQgE= k8s.io/component-base v0.18.0/go.mod h1:u3BCg0z1uskkzrnAKFzulmYaEpZF7XC9Pf/uFyb1v2c= -k8s.io/gengo v0.0.0-20181106084056-51747d6e00da/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= 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-20191120174120-e74f70b9b27e h1:HqlU9dKk5YVs7R84jmq6U3Wo/XslpkxHpBv2iWHLtLc= -k8s.io/gengo v0.0.0-20191120174120-e74f70b9b27e/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20200114144118-36b2048a9120 h1:RPscN6KhmG54S33L+lr3GS+oD1jmchIU0ll519K6FA4= 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.0.0-20190306015804-8e90cee79f82/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.3.2/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.4.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= 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.0.0-20191114103820-f023614fb9ea/go.mod h1:LlqyQuTxPHvUzmEgT71Cl/BB86o5+UcbN1LiGgSz94U= -k8s.io/kube-aggregator v0.17.0/go.mod h1:Vw104PtCEuT12WTVuhRFWCHXGiVqXsTzFtrvoaHxpk4= -k8s.io/kube-aggregator v0.17.2 h1:3E94T8cVy3Zsh75wffsyuk04CiQ8gLzsjlaFwb1wHRA= -k8s.io/kube-aggregator v0.17.2/go.mod h1:8xQTzaH0GrcKPiSB4YYWwWbeQ0j/4zRsbQt8usEMbRg= -k8s.io/kube-openapi v0.0.0-20190502190224-411b2483e503/go.mod h1:iU+ZGYsNlvU9XKUSso6SQfKTCCw7lFduMZy26Mgr2Fw= +k8s.io/kube-aggregator v0.18.0/go.mod h1:ateewQ5QbjMZF/dihEFXwaEwoA4v/mayRvzfmvb6eqI= k8s.io/kube-openapi v0.0.0-20190709113604-33be087ad058/go.mod h1:nfDlWeOsu3pUf4yWGL+ERqohP4YsZcBJXWMK+gkzOA4= k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= -k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a h1:UcxjrRMyNx/i/y8G7kPvLyy7rfbeuf1PYyBf973pgyU= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c h1:/KUFqjjqAcY4Us6luF5RDNZ16KJtb49HfR3ZHB9qYXM= k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= @@ -1133,14 +947,9 @@ k8s.io/kubectl v0.18.0 h1:hu52Ndq/d099YW+3sS3VARxFz61Wheiq8K9S7oa82Dk= k8s.io/kubectl v0.18.0/go.mod h1:LOkWx9Z5DXMEg5KtOjHhRiC1fqJPLyCr3KtQgEolCkU= k8s.io/metrics v0.18.0/go.mod h1:8aYTW18koXqjLVKL7Ds05RPMX9ipJZI3mywYvBOxXd4= k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20191114184206-e782cd3c129f h1:GiPwtSzdP43eI1hpPCbROQCCIgCuiMMNF8YUVLF3vJo= -k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20191114200735-6ca3b61696b6 h1:p0Ai3qVtkbCG/Af26dBmU0E1W58NID3hSSh7cMyylpM= 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= -knative.dev/pkg v0.0.0-20191024223035-2a3fc371d326/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q= -launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= @@ -1148,23 +957,16 @@ modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= -sigs.k8s.io/controller-runtime v0.3.1-0.20191022174215-ad57a976ffa1/go.mod h1:p2vzQ3RuSVv9YR4AcM0y8TKHQA+0oLXazKFt6Z0OdS8= -sigs.k8s.io/controller-tools v0.2.2/go.mod h1:8SNGuj163x/sMwydREj7ld5mIMJu1cDanIfnx6xsU70= sigs.k8s.io/controller-tools v0.2.4/go.mod h1:m/ztfQNocGYBgTTCmFdnK94uVvgxeZeE3LtJvd/jIzA= sigs.k8s.io/kustomize v2.0.3+incompatible h1:JUufWFNlI44MdtnjUqVnvh29rR37PQFzPbLXqhyOyX0= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= -sigs.k8s.io/structured-merge-diff v0.0.0-20190426204423-ea680f03cc65/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= +sigs.k8s.io/structured-merge-diff v0.0.0-20190817042607-6149e4549fca h1:6dsH6AYQWbyZmtttJNe8Gq1cXOeS1BdV3eW37zHilAQ= sigs.k8s.io/structured-merge-diff v0.0.0-20190817042607-6149e4549fca/go.mod h1:IIgPezJWb76P0hotTxzDbWsMYB8APh18qZnxkomBpxA= -sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06 h1:zD2IemQ4LmOcAumeiyDWXKUI2SO0NYDe3H6QGvPOVgU= -sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06/go.mod h1:/ULNhyfzRopfcjskuui0cTITekDduZ7ycKN3oUT9R18= sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= sigs.k8s.io/structured-merge-diff/v3 v3.0.0 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E= sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/testing_frameworks v0.1.1/go.mod h1:VVBKrHmJ6Ekkfz284YKhQePcdycOzNH9qL6ht1zEr/U= -sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= -software.sslmate.com/src/go-pkcs12 v0.0.0-20180114231543-2291e8f0f237/go.mod h1:/xvNRWUqm0+/ZMiF4EX00vrSCMsE4/NHb+Pt3freEeQ= vbom.ml/util v0.0.0-20160121211510-db5cfe13f5cc/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj6uzU2+8OWDFv/HxUSs7kI= diff --git a/vendor/github.com/Microsoft/go-winio/file.go b/vendor/github.com/Microsoft/go-winio/file.go index 4334ff1c..0385e410 100644 --- a/vendor/github.com/Microsoft/go-winio/file.go +++ b/vendor/github.com/Microsoft/go-winio/file.go @@ -16,6 +16,7 @@ import ( //sys createIoCompletionPort(file syscall.Handle, port syscall.Handle, key uintptr, threadCount uint32) (newport syscall.Handle, err error) = CreateIoCompletionPort //sys getQueuedCompletionStatus(port syscall.Handle, bytes *uint32, key *uintptr, o **ioOperation, timeout uint32) (err error) = GetQueuedCompletionStatus //sys setFileCompletionNotificationModes(h syscall.Handle, flags uint8) (err error) = SetFileCompletionNotificationModes +//sys wsaGetOverlappedResult(h syscall.Handle, o *syscall.Overlapped, bytes *uint32, wait bool, flags *uint32) (err error) = ws2_32.WSAGetOverlappedResult type atomicBool int32 @@ -79,6 +80,7 @@ type win32File struct { wg sync.WaitGroup wgLock sync.RWMutex closing atomicBool + socket bool readDeadline deadlineHandler writeDeadline deadlineHandler } @@ -109,7 +111,13 @@ func makeWin32File(h syscall.Handle) (*win32File, error) { } func MakeOpenFile(h syscall.Handle) (io.ReadWriteCloser, error) { - return makeWin32File(h) + // If we return the result of makeWin32File directly, it can result in an + // interface-wrapped nil, rather than a nil interface value. + f, err := makeWin32File(h) + if err != nil { + return nil, err + } + return f, nil } // closeHandle closes the resources associated with a Win32 handle @@ -190,6 +198,10 @@ func (f *win32File) asyncIo(c *ioOperation, d *deadlineHandler, bytes uint32, er if f.closing.isSet() { err = ErrFileClosed } + } else if err != nil && f.socket { + // err is from Win32. Query the overlapped structure to get the winsock error. + var bytes, flags uint32 + err = wsaGetOverlappedResult(f.handle, &c.o, &bytes, false, &flags) } case <-timeout: cancelIoEx(f.handle, &c.o) @@ -265,6 +277,10 @@ func (f *win32File) Flush() error { return syscall.FlushFileBuffers(f.handle) } +func (f *win32File) Fd() uintptr { + return uintptr(f.handle) +} + func (d *deadlineHandler) set(deadline time.Time) error { d.setLock.Lock() defer d.setLock.Unlock() diff --git a/vendor/github.com/Microsoft/go-winio/go.mod b/vendor/github.com/Microsoft/go-winio/go.mod new file mode 100644 index 00000000..b3846826 --- /dev/null +++ b/vendor/github.com/Microsoft/go-winio/go.mod @@ -0,0 +1,9 @@ +module github.com/Microsoft/go-winio + +go 1.12 + +require ( + github.com/pkg/errors v0.8.1 + github.com/sirupsen/logrus v1.4.1 + golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b +) diff --git a/vendor/github.com/Microsoft/go-winio/go.sum b/vendor/github.com/Microsoft/go-winio/go.sum new file mode 100644 index 00000000..babb4a70 --- /dev/null +++ b/vendor/github.com/Microsoft/go-winio/go.sum @@ -0,0 +1,16 @@ +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +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/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/sirupsen/logrus v1.4.1 h1:GL2rEmy6nsikmW0r8opw9JIRScdMF5hA8cOYLH7In1k= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b h1:ag/x1USPSsqHud38I9BAC88qdNLDHHtQ4mlgQIZPPNA= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/vendor/github.com/Microsoft/go-winio/hvsock.go b/vendor/github.com/Microsoft/go-winio/hvsock.go new file mode 100644 index 00000000..dbfe790e --- /dev/null +++ b/vendor/github.com/Microsoft/go-winio/hvsock.go @@ -0,0 +1,305 @@ +package winio + +import ( + "fmt" + "io" + "net" + "os" + "syscall" + "time" + "unsafe" + + "github.com/Microsoft/go-winio/pkg/guid" +) + +//sys bind(s syscall.Handle, name unsafe.Pointer, namelen int32) (err error) [failretval==socketError] = ws2_32.bind + +const ( + afHvSock = 34 // AF_HYPERV + + socketError = ^uintptr(0) +) + +// An HvsockAddr is an address for a AF_HYPERV socket. +type HvsockAddr struct { + VMID guid.GUID + ServiceID guid.GUID +} + +type rawHvsockAddr struct { + Family uint16 + _ uint16 + VMID guid.GUID + ServiceID guid.GUID +} + +// Network returns the address's network name, "hvsock". +func (addr *HvsockAddr) Network() string { + return "hvsock" +} + +func (addr *HvsockAddr) String() string { + return fmt.Sprintf("%s:%s", &addr.VMID, &addr.ServiceID) +} + +// VsockServiceID returns an hvsock service ID corresponding to the specified AF_VSOCK port. +func VsockServiceID(port uint32) guid.GUID { + g, _ := guid.FromString("00000000-facb-11e6-bd58-64006a7986d3") + g.Data1 = port + return g +} + +func (addr *HvsockAddr) raw() rawHvsockAddr { + return rawHvsockAddr{ + Family: afHvSock, + VMID: addr.VMID, + ServiceID: addr.ServiceID, + } +} + +func (addr *HvsockAddr) fromRaw(raw *rawHvsockAddr) { + addr.VMID = raw.VMID + addr.ServiceID = raw.ServiceID +} + +// HvsockListener is a socket listener for the AF_HYPERV address family. +type HvsockListener struct { + sock *win32File + addr HvsockAddr +} + +// HvsockConn is a connected socket of the AF_HYPERV address family. +type HvsockConn struct { + sock *win32File + local, remote HvsockAddr +} + +func newHvSocket() (*win32File, error) { + fd, err := syscall.Socket(afHvSock, syscall.SOCK_STREAM, 1) + if err != nil { + return nil, os.NewSyscallError("socket", err) + } + f, err := makeWin32File(fd) + if err != nil { + syscall.Close(fd) + return nil, err + } + f.socket = true + return f, nil +} + +// ListenHvsock listens for connections on the specified hvsock address. +func ListenHvsock(addr *HvsockAddr) (_ *HvsockListener, err error) { + l := &HvsockListener{addr: *addr} + sock, err := newHvSocket() + if err != nil { + return nil, l.opErr("listen", err) + } + sa := addr.raw() + err = bind(sock.handle, unsafe.Pointer(&sa), int32(unsafe.Sizeof(sa))) + if err != nil { + return nil, l.opErr("listen", os.NewSyscallError("socket", err)) + } + err = syscall.Listen(sock.handle, 16) + if err != nil { + return nil, l.opErr("listen", os.NewSyscallError("listen", err)) + } + return &HvsockListener{sock: sock, addr: *addr}, nil +} + +func (l *HvsockListener) opErr(op string, err error) error { + return &net.OpError{Op: op, Net: "hvsock", Addr: &l.addr, Err: err} +} + +// Addr returns the listener's network address. +func (l *HvsockListener) Addr() net.Addr { + return &l.addr +} + +// Accept waits for the next connection and returns it. +func (l *HvsockListener) Accept() (_ net.Conn, err error) { + sock, err := newHvSocket() + if err != nil { + return nil, l.opErr("accept", err) + } + defer func() { + if sock != nil { + sock.Close() + } + }() + c, err := l.sock.prepareIo() + if err != nil { + return nil, l.opErr("accept", err) + } + defer l.sock.wg.Done() + + // AcceptEx, per documentation, requires an extra 16 bytes per address. + const addrlen = uint32(16 + unsafe.Sizeof(rawHvsockAddr{})) + var addrbuf [addrlen * 2]byte + + var bytes uint32 + err = syscall.AcceptEx(l.sock.handle, sock.handle, &addrbuf[0], 0, addrlen, addrlen, &bytes, &c.o) + _, err = l.sock.asyncIo(c, nil, bytes, err) + if err != nil { + return nil, l.opErr("accept", os.NewSyscallError("acceptex", err)) + } + conn := &HvsockConn{ + sock: sock, + } + conn.local.fromRaw((*rawHvsockAddr)(unsafe.Pointer(&addrbuf[0]))) + conn.remote.fromRaw((*rawHvsockAddr)(unsafe.Pointer(&addrbuf[addrlen]))) + sock = nil + return conn, nil +} + +// Close closes the listener, causing any pending Accept calls to fail. +func (l *HvsockListener) Close() error { + return l.sock.Close() +} + +/* Need to finish ConnectEx handling +func DialHvsock(ctx context.Context, addr *HvsockAddr) (*HvsockConn, error) { + sock, err := newHvSocket() + if err != nil { + return nil, err + } + defer func() { + if sock != nil { + sock.Close() + } + }() + c, err := sock.prepareIo() + if err != nil { + return nil, err + } + defer sock.wg.Done() + var bytes uint32 + err = windows.ConnectEx(windows.Handle(sock.handle), sa, nil, 0, &bytes, &c.o) + _, err = sock.asyncIo(ctx, c, nil, bytes, err) + if err != nil { + return nil, err + } + conn := &HvsockConn{ + sock: sock, + remote: *addr, + } + sock = nil + return conn, nil +} +*/ + +func (conn *HvsockConn) opErr(op string, err error) error { + return &net.OpError{Op: op, Net: "hvsock", Source: &conn.local, Addr: &conn.remote, Err: err} +} + +func (conn *HvsockConn) Read(b []byte) (int, error) { + c, err := conn.sock.prepareIo() + if err != nil { + return 0, conn.opErr("read", err) + } + defer conn.sock.wg.Done() + buf := syscall.WSABuf{Buf: &b[0], Len: uint32(len(b))} + var flags, bytes uint32 + err = syscall.WSARecv(conn.sock.handle, &buf, 1, &bytes, &flags, &c.o, nil) + n, err := conn.sock.asyncIo(c, &conn.sock.readDeadline, bytes, err) + if err != nil { + if _, ok := err.(syscall.Errno); ok { + err = os.NewSyscallError("wsarecv", err) + } + return 0, conn.opErr("read", err) + } else if n == 0 { + err = io.EOF + } + return n, err +} + +func (conn *HvsockConn) Write(b []byte) (int, error) { + t := 0 + for len(b) != 0 { + n, err := conn.write(b) + if err != nil { + return t + n, err + } + t += n + b = b[n:] + } + return t, nil +} + +func (conn *HvsockConn) write(b []byte) (int, error) { + c, err := conn.sock.prepareIo() + if err != nil { + return 0, conn.opErr("write", err) + } + defer conn.sock.wg.Done() + buf := syscall.WSABuf{Buf: &b[0], Len: uint32(len(b))} + var bytes uint32 + err = syscall.WSASend(conn.sock.handle, &buf, 1, &bytes, 0, &c.o, nil) + n, err := conn.sock.asyncIo(c, &conn.sock.writeDeadline, bytes, err) + if err != nil { + if _, ok := err.(syscall.Errno); ok { + err = os.NewSyscallError("wsasend", err) + } + return 0, conn.opErr("write", err) + } + return n, err +} + +// Close closes the socket connection, failing any pending read or write calls. +func (conn *HvsockConn) Close() error { + return conn.sock.Close() +} + +func (conn *HvsockConn) shutdown(how int) error { + err := syscall.Shutdown(conn.sock.handle, syscall.SHUT_RD) + if err != nil { + return os.NewSyscallError("shutdown", err) + } + return nil +} + +// CloseRead shuts down the read end of the socket. +func (conn *HvsockConn) CloseRead() error { + err := conn.shutdown(syscall.SHUT_RD) + if err != nil { + return conn.opErr("close", err) + } + return nil +} + +// CloseWrite shuts down the write end of the socket, notifying the other endpoint that +// no more data will be written. +func (conn *HvsockConn) CloseWrite() error { + err := conn.shutdown(syscall.SHUT_WR) + if err != nil { + return conn.opErr("close", err) + } + return nil +} + +// LocalAddr returns the local address of the connection. +func (conn *HvsockConn) LocalAddr() net.Addr { + return &conn.local +} + +// RemoteAddr returns the remote address of the connection. +func (conn *HvsockConn) RemoteAddr() net.Addr { + return &conn.remote +} + +// SetDeadline implements the net.Conn SetDeadline method. +func (conn *HvsockConn) SetDeadline(t time.Time) error { + conn.SetReadDeadline(t) + conn.SetWriteDeadline(t) + return nil +} + +// SetReadDeadline implements the net.Conn SetReadDeadline method. +func (conn *HvsockConn) SetReadDeadline(t time.Time) error { + return conn.sock.SetReadDeadline(t) +} + +// SetWriteDeadline implements the net.Conn SetWriteDeadline method. +func (conn *HvsockConn) SetWriteDeadline(t time.Time) error { + return conn.sock.SetWriteDeadline(t) +} diff --git a/vendor/github.com/Microsoft/go-winio/pipe.go b/vendor/github.com/Microsoft/go-winio/pipe.go index d99eedb6..d6a46f6a 100644 --- a/vendor/github.com/Microsoft/go-winio/pipe.go +++ b/vendor/github.com/Microsoft/go-winio/pipe.go @@ -3,10 +3,13 @@ package winio import ( + "context" "errors" + "fmt" "io" "net" "os" + "runtime" "syscall" "time" "unsafe" @@ -18,6 +21,48 @@ import ( //sys getNamedPipeInfo(pipe syscall.Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) = GetNamedPipeInfo //sys getNamedPipeHandleState(pipe syscall.Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) = GetNamedPipeHandleStateW //sys localAlloc(uFlags uint32, length uint32) (ptr uintptr) = LocalAlloc +//sys ntCreateNamedPipeFile(pipe *syscall.Handle, access uint32, oa *objectAttributes, iosb *ioStatusBlock, share uint32, disposition uint32, options uint32, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (status ntstatus) = ntdll.NtCreateNamedPipeFile +//sys rtlNtStatusToDosError(status ntstatus) (winerr error) = ntdll.RtlNtStatusToDosErrorNoTeb +//sys rtlDosPathNameToNtPathName(name *uint16, ntName *unicodeString, filePart uintptr, reserved uintptr) (status ntstatus) = ntdll.RtlDosPathNameToNtPathName_U +//sys rtlDefaultNpAcl(dacl *uintptr) (status ntstatus) = ntdll.RtlDefaultNpAcl + +type ioStatusBlock struct { + Status, Information uintptr +} + +type objectAttributes struct { + Length uintptr + RootDirectory uintptr + ObjectName *unicodeString + Attributes uintptr + SecurityDescriptor *securityDescriptor + SecurityQoS uintptr +} + +type unicodeString struct { + Length uint16 + MaximumLength uint16 + Buffer uintptr +} + +type securityDescriptor struct { + Revision byte + Sbz1 byte + Control uint16 + Owner uintptr + Group uintptr + Sacl uintptr + Dacl uintptr +} + +type ntstatus int32 + +func (status ntstatus) Err() error { + if status >= 0 { + return nil + } + return rtlNtStatusToDosError(status) +} const ( cERROR_PIPE_BUSY = syscall.Errno(231) @@ -25,21 +70,20 @@ const ( cERROR_PIPE_CONNECTED = syscall.Errno(535) cERROR_SEM_TIMEOUT = syscall.Errno(121) - cPIPE_ACCESS_DUPLEX = 0x3 - cFILE_FLAG_FIRST_PIPE_INSTANCE = 0x80000 - cSECURITY_SQOS_PRESENT = 0x100000 - cSECURITY_ANONYMOUS = 0 - - cPIPE_REJECT_REMOTE_CLIENTS = 0x8 - - cPIPE_UNLIMITED_INSTANCES = 255 - - cNMPWAIT_USE_DEFAULT_WAIT = 0 - cNMPWAIT_NOWAIT = 1 + cSECURITY_SQOS_PRESENT = 0x100000 + cSECURITY_ANONYMOUS = 0 cPIPE_TYPE_MESSAGE = 4 cPIPE_READMODE_MESSAGE = 2 + + cFILE_OPEN = 1 + cFILE_CREATE = 2 + + cFILE_PIPE_MESSAGE_TYPE = 1 + cFILE_PIPE_REJECT_REMOTE_CLIENTS = 2 + + cSE_DACL_PRESENT = 4 ) var ( @@ -137,9 +181,30 @@ func (s pipeAddress) String() string { return string(s) } +// tryDialPipe attempts to dial the pipe at `path` until `ctx` cancellation or timeout. +func tryDialPipe(ctx context.Context, path *string) (syscall.Handle, error) { + for { + select { + case <-ctx.Done(): + return syscall.Handle(0), ctx.Err() + default: + h, err := createFile(*path, syscall.GENERIC_READ|syscall.GENERIC_WRITE, 0, nil, syscall.OPEN_EXISTING, syscall.FILE_FLAG_OVERLAPPED|cSECURITY_SQOS_PRESENT|cSECURITY_ANONYMOUS, 0) + if err == nil { + return h, nil + } + if err != cERROR_PIPE_BUSY { + return h, &os.PathError{Err: err, Op: "open", Path: *path} + } + // Wait 10 msec and try again. This is a rather simplistic + // view, as we always try each 10 milliseconds. + time.Sleep(time.Millisecond * 10) + } + } +} + // DialPipe connects to a named pipe by path, timing out if the connection // takes longer than the specified duration. If timeout is nil, then we use -// a default timeout of 5 seconds. (We do not use WaitNamedPipe.) +// a default timeout of 2 seconds. (We do not use WaitNamedPipe.) func DialPipe(path string, timeout *time.Duration) (net.Conn, error) { var absTimeout time.Time if timeout != nil { @@ -147,23 +212,22 @@ func DialPipe(path string, timeout *time.Duration) (net.Conn, error) { } else { absTimeout = time.Now().Add(time.Second * 2) } + ctx, _ := context.WithDeadline(context.Background(), absTimeout) + conn, err := DialPipeContext(ctx, path) + if err == context.DeadlineExceeded { + return nil, ErrTimeout + } + return conn, err +} + +// DialPipeContext attempts to connect to a named pipe by `path` until `ctx` +// cancellation or timeout. +func DialPipeContext(ctx context.Context, path string) (net.Conn, error) { var err error var h syscall.Handle - for { - h, err = createFile(path, syscall.GENERIC_READ|syscall.GENERIC_WRITE, 0, nil, syscall.OPEN_EXISTING, syscall.FILE_FLAG_OVERLAPPED|cSECURITY_SQOS_PRESENT|cSECURITY_ANONYMOUS, 0) - if err != cERROR_PIPE_BUSY { - break - } - if time.Now().After(absTimeout) { - return nil, ErrTimeout - } - - // Wait 10 msec and try again. This is a rather simplistic - // view, as we always try each 10 milliseconds. - time.Sleep(time.Millisecond * 10) - } + h, err = tryDialPipe(ctx, &path) if err != nil { - return nil, &os.PathError{Op: "open", Path: path, Err: err} + return nil, err } var flags uint32 @@ -194,43 +258,87 @@ type acceptResponse struct { } type win32PipeListener struct { - firstHandle syscall.Handle - path string - securityDescriptor []byte - config PipeConfig - acceptCh chan (chan acceptResponse) - closeCh chan int - doneCh chan int + firstHandle syscall.Handle + path string + config PipeConfig + acceptCh chan (chan acceptResponse) + closeCh chan int + doneCh chan int } -func makeServerPipeHandle(path string, securityDescriptor []byte, c *PipeConfig, first bool) (syscall.Handle, error) { - var flags uint32 = cPIPE_ACCESS_DUPLEX | syscall.FILE_FLAG_OVERLAPPED - if first { - flags |= cFILE_FLAG_FIRST_PIPE_INSTANCE - } - - var mode uint32 = cPIPE_REJECT_REMOTE_CLIENTS - if c.MessageMode { - mode |= cPIPE_TYPE_MESSAGE - } - - sa := &syscall.SecurityAttributes{} - sa.Length = uint32(unsafe.Sizeof(*sa)) - if securityDescriptor != nil { - len := uint32(len(securityDescriptor)) - sa.SecurityDescriptor = localAlloc(0, len) - defer localFree(sa.SecurityDescriptor) - copy((*[0xffff]byte)(unsafe.Pointer(sa.SecurityDescriptor))[:], securityDescriptor) - } - h, err := createNamedPipe(path, flags, mode, cPIPE_UNLIMITED_INSTANCES, uint32(c.OutputBufferSize), uint32(c.InputBufferSize), 0, sa) +func makeServerPipeHandle(path string, sd []byte, c *PipeConfig, first bool) (syscall.Handle, error) { + path16, err := syscall.UTF16FromString(path) if err != nil { return 0, &os.PathError{Op: "open", Path: path, Err: err} } + + var oa objectAttributes + oa.Length = unsafe.Sizeof(oa) + + var ntPath unicodeString + if err := rtlDosPathNameToNtPathName(&path16[0], &ntPath, 0, 0).Err(); err != nil { + return 0, &os.PathError{Op: "open", Path: path, Err: err} + } + defer localFree(ntPath.Buffer) + oa.ObjectName = &ntPath + + // The security descriptor is only needed for the first pipe. + if first { + if sd != nil { + len := uint32(len(sd)) + sdb := localAlloc(0, len) + defer localFree(sdb) + copy((*[0xffff]byte)(unsafe.Pointer(sdb))[:], sd) + oa.SecurityDescriptor = (*securityDescriptor)(unsafe.Pointer(sdb)) + } else { + // Construct the default named pipe security descriptor. + var dacl uintptr + if err := rtlDefaultNpAcl(&dacl).Err(); err != nil { + return 0, fmt.Errorf("getting default named pipe ACL: %s", err) + } + defer localFree(dacl) + + sdb := &securityDescriptor{ + Revision: 1, + Control: cSE_DACL_PRESENT, + Dacl: dacl, + } + oa.SecurityDescriptor = sdb + } + } + + typ := uint32(cFILE_PIPE_REJECT_REMOTE_CLIENTS) + if c.MessageMode { + typ |= cFILE_PIPE_MESSAGE_TYPE + } + + disposition := uint32(cFILE_OPEN) + access := uint32(syscall.GENERIC_READ | syscall.GENERIC_WRITE | syscall.SYNCHRONIZE) + if first { + disposition = cFILE_CREATE + // By not asking for read or write access, the named pipe file system + // will put this pipe into an initially disconnected state, blocking + // client connections until the next call with first == false. + access = syscall.SYNCHRONIZE + } + + timeout := int64(-50 * 10000) // 50ms + + var ( + h syscall.Handle + iosb ioStatusBlock + ) + err = ntCreateNamedPipeFile(&h, access, &oa, &iosb, syscall.FILE_SHARE_READ|syscall.FILE_SHARE_WRITE, disposition, 0, typ, 0, 0, 0xffffffff, uint32(c.InputBufferSize), uint32(c.OutputBufferSize), &timeout).Err() + if err != nil { + return 0, &os.PathError{Op: "open", Path: path, Err: err} + } + + runtime.KeepAlive(ntPath) return h, nil } func (l *win32PipeListener) makeServerPipe() (*win32File, error) { - h, err := makeServerPipeHandle(l.path, l.securityDescriptor, &l.config, false) + h, err := makeServerPipeHandle(l.path, nil, &l.config, false) if err != nil { return nil, err } @@ -341,32 +449,13 @@ func ListenPipe(path string, c *PipeConfig) (net.Listener, error) { if err != nil { return nil, err } - // Create a client handle and connect it. This results in the pipe - // instance always existing, so that clients see ERROR_PIPE_BUSY - // rather than ERROR_FILE_NOT_FOUND. This ties the first instance - // up so that no other instances can be used. This would have been - // cleaner if the Win32 API matched CreateFile with ConnectNamedPipe - // instead of CreateNamedPipe. (Apparently created named pipes are - // considered to be in listening state regardless of whether any - // active calls to ConnectNamedPipe are outstanding.) - h2, err := createFile(path, 0, 0, nil, syscall.OPEN_EXISTING, cSECURITY_SQOS_PRESENT|cSECURITY_ANONYMOUS, 0) - if err != nil { - syscall.Close(h) - return nil, err - } - // Close the client handle. The server side of the instance will - // still be busy, leading to ERROR_PIPE_BUSY instead of - // ERROR_NOT_FOUND, as long as we don't close the server handle, - // or disconnect the client with DisconnectNamedPipe. - syscall.Close(h2) l := &win32PipeListener{ - firstHandle: h, - path: path, - securityDescriptor: sd, - config: *c, - acceptCh: make(chan (chan acceptResponse)), - closeCh: make(chan int), - doneCh: make(chan int), + firstHandle: h, + path: path, + config: *c, + acceptCh: make(chan (chan acceptResponse)), + closeCh: make(chan int), + doneCh: make(chan int), } go l.listenerRoutine() return l, nil diff --git a/vendor/github.com/Microsoft/go-winio/pkg/guid/guid.go b/vendor/github.com/Microsoft/go-winio/pkg/guid/guid.go new file mode 100644 index 00000000..58640657 --- /dev/null +++ b/vendor/github.com/Microsoft/go-winio/pkg/guid/guid.go @@ -0,0 +1,235 @@ +// Package guid provides a GUID type. The backing structure for a GUID is +// identical to that used by the golang.org/x/sys/windows GUID type. +// There are two main binary encodings used for a GUID, the big-endian encoding, +// and the Windows (mixed-endian) encoding. See here for details: +// https://en.wikipedia.org/wiki/Universally_unique_identifier#Encoding +package guid + +import ( + "crypto/rand" + "crypto/sha1" + "encoding" + "encoding/binary" + "fmt" + "strconv" + + "golang.org/x/sys/windows" +) + +// Variant specifies which GUID variant (or "type") of the GUID. It determines +// how the entirety of the rest of the GUID is interpreted. +type Variant uint8 + +// The variants specified by RFC 4122. +const ( + // VariantUnknown specifies a GUID variant which does not conform to one of + // the variant encodings specified in RFC 4122. + VariantUnknown Variant = iota + VariantNCS + VariantRFC4122 + VariantMicrosoft + VariantFuture +) + +// Version specifies how the bits in the GUID were generated. For instance, a +// version 4 GUID is randomly generated, and a version 5 is generated from the +// hash of an input string. +type Version uint8 + +var _ = (encoding.TextMarshaler)(GUID{}) +var _ = (encoding.TextUnmarshaler)(&GUID{}) + +// GUID represents a GUID/UUID. It has the same structure as +// golang.org/x/sys/windows.GUID so that it can be used with functions expecting +// that type. It is defined as its own type so that stringification and +// marshaling can be supported. The representation matches that used by native +// Windows code. +type GUID windows.GUID + +// NewV4 returns a new version 4 (pseudorandom) GUID, as defined by RFC 4122. +func NewV4() (GUID, error) { + var b [16]byte + if _, err := rand.Read(b[:]); err != nil { + return GUID{}, err + } + + g := FromArray(b) + g.setVersion(4) // Version 4 means randomly generated. + g.setVariant(VariantRFC4122) + + return g, nil +} + +// NewV5 returns a new version 5 (generated from a string via SHA-1 hashing) +// GUID, as defined by RFC 4122. The RFC is unclear on the encoding of the name, +// and the sample code treats it as a series of bytes, so we do the same here. +// +// Some implementations, such as those found on Windows, treat the name as a +// big-endian UTF16 stream of bytes. If that is desired, the string can be +// encoded as such before being passed to this function. +func NewV5(namespace GUID, name []byte) (GUID, error) { + b := sha1.New() + namespaceBytes := namespace.ToArray() + b.Write(namespaceBytes[:]) + b.Write(name) + + a := [16]byte{} + copy(a[:], b.Sum(nil)) + + g := FromArray(a) + g.setVersion(5) // Version 5 means generated from a string. + g.setVariant(VariantRFC4122) + + return g, nil +} + +func fromArray(b [16]byte, order binary.ByteOrder) GUID { + var g GUID + g.Data1 = order.Uint32(b[0:4]) + g.Data2 = order.Uint16(b[4:6]) + g.Data3 = order.Uint16(b[6:8]) + copy(g.Data4[:], b[8:16]) + return g +} + +func (g GUID) toArray(order binary.ByteOrder) [16]byte { + b := [16]byte{} + order.PutUint32(b[0:4], g.Data1) + order.PutUint16(b[4:6], g.Data2) + order.PutUint16(b[6:8], g.Data3) + copy(b[8:16], g.Data4[:]) + return b +} + +// FromArray constructs a GUID from a big-endian encoding array of 16 bytes. +func FromArray(b [16]byte) GUID { + return fromArray(b, binary.BigEndian) +} + +// ToArray returns an array of 16 bytes representing the GUID in big-endian +// encoding. +func (g GUID) ToArray() [16]byte { + return g.toArray(binary.BigEndian) +} + +// FromWindowsArray constructs a GUID from a Windows encoding array of bytes. +func FromWindowsArray(b [16]byte) GUID { + return fromArray(b, binary.LittleEndian) +} + +// ToWindowsArray returns an array of 16 bytes representing the GUID in Windows +// encoding. +func (g GUID) ToWindowsArray() [16]byte { + return g.toArray(binary.LittleEndian) +} + +func (g GUID) String() string { + return fmt.Sprintf( + "%08x-%04x-%04x-%04x-%012x", + g.Data1, + g.Data2, + g.Data3, + g.Data4[:2], + g.Data4[2:]) +} + +// FromString parses a string containing a GUID and returns the GUID. The only +// format currently supported is the `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` +// format. +func FromString(s string) (GUID, error) { + if len(s) != 36 { + return GUID{}, fmt.Errorf("invalid GUID %q", s) + } + if s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-' { + return GUID{}, fmt.Errorf("invalid GUID %q", s) + } + + var g GUID + + data1, err := strconv.ParseUint(s[0:8], 16, 32) + if err != nil { + return GUID{}, fmt.Errorf("invalid GUID %q", s) + } + g.Data1 = uint32(data1) + + data2, err := strconv.ParseUint(s[9:13], 16, 16) + if err != nil { + return GUID{}, fmt.Errorf("invalid GUID %q", s) + } + g.Data2 = uint16(data2) + + data3, err := strconv.ParseUint(s[14:18], 16, 16) + if err != nil { + return GUID{}, fmt.Errorf("invalid GUID %q", s) + } + g.Data3 = uint16(data3) + + for i, x := range []int{19, 21, 24, 26, 28, 30, 32, 34} { + v, err := strconv.ParseUint(s[x:x+2], 16, 8) + if err != nil { + return GUID{}, fmt.Errorf("invalid GUID %q", s) + } + g.Data4[i] = uint8(v) + } + + return g, nil +} + +func (g *GUID) setVariant(v Variant) { + d := g.Data4[0] + switch v { + case VariantNCS: + d = (d & 0x7f) + case VariantRFC4122: + d = (d & 0x3f) | 0x80 + case VariantMicrosoft: + d = (d & 0x1f) | 0xc0 + case VariantFuture: + d = (d & 0x0f) | 0xe0 + case VariantUnknown: + fallthrough + default: + panic(fmt.Sprintf("invalid variant: %d", v)) + } + g.Data4[0] = d +} + +// Variant returns the GUID variant, as defined in RFC 4122. +func (g GUID) Variant() Variant { + b := g.Data4[0] + if b&0x80 == 0 { + return VariantNCS + } else if b&0xc0 == 0x80 { + return VariantRFC4122 + } else if b&0xe0 == 0xc0 { + return VariantMicrosoft + } else if b&0xe0 == 0xe0 { + return VariantFuture + } + return VariantUnknown +} + +func (g *GUID) setVersion(v Version) { + g.Data3 = (g.Data3 & 0x0fff) | (uint16(v) << 12) +} + +// Version returns the GUID version, as defined in RFC 4122. +func (g GUID) Version() Version { + return Version((g.Data3 & 0xF000) >> 12) +} + +// MarshalText returns the textual representation of the GUID. +func (g GUID) MarshalText() ([]byte, error) { + return []byte(g.String()), nil +} + +// UnmarshalText takes the textual representation of a GUID, and unmarhals it +// into this GUID. +func (g *GUID) UnmarshalText(text []byte) error { + g2, err := FromString(string(text)) + if err != nil { + return err + } + *g = g2 + return nil +} diff --git a/vendor/github.com/Microsoft/go-winio/syscall.go b/vendor/github.com/Microsoft/go-winio/syscall.go index 20d64cf4..5cb52bc7 100644 --- a/vendor/github.com/Microsoft/go-winio/syscall.go +++ b/vendor/github.com/Microsoft/go-winio/syscall.go @@ -1,3 +1,3 @@ package winio -//go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go file.go pipe.go sd.go fileinfo.go privilege.go backup.go +//go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go file.go pipe.go sd.go fileinfo.go privilege.go backup.go hvsock.go diff --git a/vendor/github.com/Microsoft/go-winio/zsyscall_windows.go b/vendor/github.com/Microsoft/go-winio/zsyscall_windows.go index 3f527639..e26b01fa 100644 --- a/vendor/github.com/Microsoft/go-winio/zsyscall_windows.go +++ b/vendor/github.com/Microsoft/go-winio/zsyscall_windows.go @@ -1,4 +1,4 @@ -// MACHINE GENERATED BY 'go generate' COMMAND; DO NOT EDIT +// Code generated by 'go generate'; DO NOT EDIT. package winio @@ -38,19 +38,25 @@ func errnoErr(e syscall.Errno) error { var ( modkernel32 = windows.NewLazySystemDLL("kernel32.dll") + modws2_32 = windows.NewLazySystemDLL("ws2_32.dll") + modntdll = windows.NewLazySystemDLL("ntdll.dll") modadvapi32 = windows.NewLazySystemDLL("advapi32.dll") procCancelIoEx = modkernel32.NewProc("CancelIoEx") procCreateIoCompletionPort = modkernel32.NewProc("CreateIoCompletionPort") procGetQueuedCompletionStatus = modkernel32.NewProc("GetQueuedCompletionStatus") procSetFileCompletionNotificationModes = modkernel32.NewProc("SetFileCompletionNotificationModes") + procWSAGetOverlappedResult = modws2_32.NewProc("WSAGetOverlappedResult") procConnectNamedPipe = modkernel32.NewProc("ConnectNamedPipe") procCreateNamedPipeW = modkernel32.NewProc("CreateNamedPipeW") procCreateFileW = modkernel32.NewProc("CreateFileW") - procWaitNamedPipeW = modkernel32.NewProc("WaitNamedPipeW") procGetNamedPipeInfo = modkernel32.NewProc("GetNamedPipeInfo") procGetNamedPipeHandleStateW = modkernel32.NewProc("GetNamedPipeHandleStateW") procLocalAlloc = modkernel32.NewProc("LocalAlloc") + procNtCreateNamedPipeFile = modntdll.NewProc("NtCreateNamedPipeFile") + procRtlNtStatusToDosErrorNoTeb = modntdll.NewProc("RtlNtStatusToDosErrorNoTeb") + procRtlDosPathNameToNtPathName_U = modntdll.NewProc("RtlDosPathNameToNtPathName_U") + procRtlDefaultNpAcl = modntdll.NewProc("RtlDefaultNpAcl") procLookupAccountNameW = modadvapi32.NewProc("LookupAccountNameW") procConvertSidToStringSidW = modadvapi32.NewProc("ConvertSidToStringSidW") procConvertStringSecurityDescriptorToSecurityDescriptorW = modadvapi32.NewProc("ConvertStringSecurityDescriptorToSecurityDescriptorW") @@ -69,6 +75,7 @@ var ( procLookupPrivilegeDisplayNameW = modadvapi32.NewProc("LookupPrivilegeDisplayNameW") procBackupRead = modkernel32.NewProc("BackupRead") procBackupWrite = modkernel32.NewProc("BackupWrite") + procbind = modws2_32.NewProc("bind") ) func cancelIoEx(file syscall.Handle, o *syscall.Overlapped) (err error) { @@ -120,6 +127,24 @@ func setFileCompletionNotificationModes(h syscall.Handle, flags uint8) (err erro return } +func wsaGetOverlappedResult(h syscall.Handle, o *syscall.Overlapped, bytes *uint32, wait bool, flags *uint32) (err error) { + var _p0 uint32 + if wait { + _p0 = 1 + } else { + _p0 = 0 + } + r1, _, e1 := syscall.Syscall6(procWSAGetOverlappedResult.Addr(), 5, uintptr(h), uintptr(unsafe.Pointer(o)), uintptr(unsafe.Pointer(bytes)), uintptr(_p0), uintptr(unsafe.Pointer(flags)), 0) + if r1 == 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + func connectNamedPipe(pipe syscall.Handle, o *syscall.Overlapped) (err error) { r1, _, e1 := syscall.Syscall(procConnectNamedPipe.Addr(), 2, uintptr(pipe), uintptr(unsafe.Pointer(o)), 0) if r1 == 0 { @@ -176,27 +201,6 @@ func _createFile(name *uint16, access uint32, mode uint32, sa *syscall.SecurityA return } -func waitNamedPipe(name string, timeout uint32) (err error) { - var _p0 *uint16 - _p0, err = syscall.UTF16PtrFromString(name) - if err != nil { - return - } - return _waitNamedPipe(_p0, timeout) -} - -func _waitNamedPipe(name *uint16, timeout uint32) (err error) { - r1, _, e1 := syscall.Syscall(procWaitNamedPipeW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(timeout), 0) - if r1 == 0 { - if e1 != 0 { - err = errnoErr(e1) - } else { - err = syscall.EINVAL - } - } - return -} - func getNamedPipeInfo(pipe syscall.Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) { r1, _, e1 := syscall.Syscall6(procGetNamedPipeInfo.Addr(), 5, uintptr(pipe), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(outSize)), uintptr(unsafe.Pointer(inSize)), uintptr(unsafe.Pointer(maxInstances)), 0) if r1 == 0 { @@ -227,6 +231,32 @@ func localAlloc(uFlags uint32, length uint32) (ptr uintptr) { return } +func ntCreateNamedPipeFile(pipe *syscall.Handle, access uint32, oa *objectAttributes, iosb *ioStatusBlock, share uint32, disposition uint32, options uint32, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (status ntstatus) { + r0, _, _ := syscall.Syscall15(procNtCreateNamedPipeFile.Addr(), 14, uintptr(unsafe.Pointer(pipe)), uintptr(access), uintptr(unsafe.Pointer(oa)), uintptr(unsafe.Pointer(iosb)), uintptr(share), uintptr(disposition), uintptr(options), uintptr(typ), uintptr(readMode), uintptr(completionMode), uintptr(maxInstances), uintptr(inboundQuota), uintptr(outputQuota), uintptr(unsafe.Pointer(timeout)), 0) + status = ntstatus(r0) + return +} + +func rtlNtStatusToDosError(status ntstatus) (winerr error) { + r0, _, _ := syscall.Syscall(procRtlNtStatusToDosErrorNoTeb.Addr(), 1, uintptr(status), 0, 0) + if r0 != 0 { + winerr = syscall.Errno(r0) + } + return +} + +func rtlDosPathNameToNtPathName(name *uint16, ntName *unicodeString, filePart uintptr, reserved uintptr) (status ntstatus) { + r0, _, _ := syscall.Syscall6(procRtlDosPathNameToNtPathName_U.Addr(), 4, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(ntName)), uintptr(filePart), uintptr(reserved), 0, 0) + status = ntstatus(r0) + return +} + +func rtlDefaultNpAcl(dacl *uintptr) (status ntstatus) { + r0, _, _ := syscall.Syscall(procRtlDefaultNpAcl.Addr(), 1, uintptr(unsafe.Pointer(dacl)), 0, 0) + status = ntstatus(r0) + return +} + func lookupAccountName(systemName *uint16, accountName string, sid *byte, sidSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) { var _p0 *uint16 _p0, err = syscall.UTF16PtrFromString(accountName) @@ -518,3 +548,15 @@ func backupWrite(h syscall.Handle, b []byte, bytesWritten *uint32, abort bool, p } return } + +func bind(s syscall.Handle, name unsafe.Pointer, namelen int32) (err error) { + r1, _, e1 := syscall.Syscall(procbind.Addr(), 3, uintptr(s), uintptr(name), uintptr(namelen)) + if r1 == socketError { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} diff --git a/vendor/github.com/gregjones/httpcache/.travis.yml b/vendor/github.com/gregjones/httpcache/.travis.yml index 597bc999..b5ffbe03 100644 --- a/vendor/github.com/gregjones/httpcache/.travis.yml +++ b/vendor/github.com/gregjones/httpcache/.travis.yml @@ -1,18 +1,19 @@ sudo: false language: go +go: + - 1.6.x + - 1.7.x + - 1.8.x + - 1.9.x + - master matrix: allow_failures: - go: master fast_finish: true - include: - - go: 1.10.x - - go: 1.11.x - env: GOFMT=1 - - go: master install: - # Do nothing. This is needed to prevent default install action "go get -t -v ./..." from happening here (we want it to happen inside script step). script: - go get -t -v ./... - - if test -n "${GOFMT}"; then gofmt -w -s . && git diff --exit-code; fi + - diff -u <(echo -n) <(gofmt -d .) - go tool vet . - go test -v -race ./... diff --git a/vendor/github.com/gregjones/httpcache/httpcache.go b/vendor/github.com/gregjones/httpcache/httpcache.go index b41a63d1..f6a2ec4a 100644 --- a/vendor/github.com/gregjones/httpcache/httpcache.go +++ b/vendor/github.com/gregjones/httpcache/httpcache.go @@ -416,14 +416,14 @@ func canStaleOnError(respHeaders, reqHeaders http.Header) bool { func getEndToEndHeaders(respHeaders http.Header) []string { // These headers are always hop-by-hop hopByHopHeaders := map[string]struct{}{ - "Connection": {}, - "Keep-Alive": {}, - "Proxy-Authenticate": {}, - "Proxy-Authorization": {}, - "Te": {}, - "Trailers": {}, - "Transfer-Encoding": {}, - "Upgrade": {}, + "Connection": struct{}{}, + "Keep-Alive": struct{}{}, + "Proxy-Authenticate": struct{}{}, + "Proxy-Authorization": struct{}{}, + "Te": struct{}{}, + "Trailers": struct{}{}, + "Transfer-Encoding": struct{}{}, + "Upgrade": struct{}{}, } for _, extra := range strings.Split(respHeaders.Get("connection"), ",") { @@ -433,7 +433,7 @@ func getEndToEndHeaders(respHeaders http.Header) []string { } } endToEndHeaders := []string{} - for respHeader := range respHeaders { + for respHeader, _ := range respHeaders { if _, ok := hopByHopHeaders[respHeader]; !ok { endToEndHeaders = append(endToEndHeaders, respHeader) } diff --git a/vendor/github.com/pkg/errors/.travis.yml b/vendor/github.com/pkg/errors/.travis.yml index d4b92663..9159de03 100644 --- a/vendor/github.com/pkg/errors/.travis.yml +++ b/vendor/github.com/pkg/errors/.travis.yml @@ -1,15 +1,10 @@ language: go go_import_path: github.com/pkg/errors go: - - 1.4.x - - 1.5.x - - 1.6.x - - 1.7.x - - 1.8.x - - 1.9.x - - 1.10.x - 1.11.x + - 1.12.x + - 1.13.x - tip script: - - go test -v ./... + - make check diff --git a/vendor/github.com/pkg/errors/Makefile b/vendor/github.com/pkg/errors/Makefile new file mode 100644 index 00000000..ce9d7cde --- /dev/null +++ b/vendor/github.com/pkg/errors/Makefile @@ -0,0 +1,44 @@ +PKGS := github.com/pkg/errors +SRCDIRS := $(shell go list -f '{{.Dir}}' $(PKGS)) +GO := go + +check: test vet gofmt misspell unconvert staticcheck ineffassign unparam + +test: + $(GO) test $(PKGS) + +vet: | test + $(GO) vet $(PKGS) + +staticcheck: + $(GO) get honnef.co/go/tools/cmd/staticcheck + staticcheck -checks all $(PKGS) + +misspell: + $(GO) get github.com/client9/misspell/cmd/misspell + misspell \ + -locale GB \ + -error \ + *.md *.go + +unconvert: + $(GO) get github.com/mdempsky/unconvert + unconvert -v $(PKGS) + +ineffassign: + $(GO) get github.com/gordonklaus/ineffassign + find $(SRCDIRS) -name '*.go' | xargs ineffassign + +pedantic: check errcheck + +unparam: + $(GO) get mvdan.cc/unparam + unparam ./... + +errcheck: + $(GO) get github.com/kisielk/errcheck + errcheck $(PKGS) + +gofmt: + @echo Checking code is gofmted + @test -z "$(shell gofmt -s -l -d -e $(SRCDIRS) | tee /dev/stderr)" diff --git a/vendor/github.com/pkg/errors/README.md b/vendor/github.com/pkg/errors/README.md index 6483ba2a..54dfdcb1 100644 --- a/vendor/github.com/pkg/errors/README.md +++ b/vendor/github.com/pkg/errors/README.md @@ -41,11 +41,18 @@ default: [Read the package documentation for more information](https://godoc.org/github.com/pkg/errors). +## Roadmap + +With the upcoming [Go2 error proposals](https://go.googlesource.com/proposal/+/master/design/go2draft.md) this package is moving into maintenance mode. The roadmap for a 1.0 release is as follows: + +- 0.9. Remove pre Go 1.9 and Go 1.10 support, address outstanding pull requests (if possible) +- 1.0. Final release. + ## Contributing -We welcome pull requests, bug fixes and issue reports. With that said, the bar for adding new symbols to this package is intentionally set high. +Because of the Go2 errors changes, this package is not accepting proposals for new functionality. With that said, we welcome pull requests, bug fixes and issue reports. -Before proposing a change, please discuss your change by raising an issue. +Before sending a PR, please discuss your change by raising an issue. ## License diff --git a/vendor/github.com/pkg/errors/errors.go b/vendor/github.com/pkg/errors/errors.go index 7421f326..161aea25 100644 --- a/vendor/github.com/pkg/errors/errors.go +++ b/vendor/github.com/pkg/errors/errors.go @@ -82,7 +82,7 @@ // // if err, ok := err.(stackTracer); ok { // for _, f := range err.StackTrace() { -// fmt.Printf("%+s:%d", f) +// fmt.Printf("%+s:%d\n", f, f) // } // } // @@ -159,6 +159,9 @@ type withStack struct { func (w *withStack) Cause() error { return w.error } +// Unwrap provides compatibility for Go 1.13 error chains. +func (w *withStack) Unwrap() error { return w.error } + func (w *withStack) Format(s fmt.State, verb rune) { switch verb { case 'v': @@ -241,6 +244,9 @@ type withMessage struct { func (w *withMessage) Error() string { return w.msg + ": " + w.cause.Error() } func (w *withMessage) Cause() error { return w.cause } +// Unwrap provides compatibility for Go 1.13 error chains. +func (w *withMessage) Unwrap() error { return w.cause } + func (w *withMessage) Format(s fmt.State, verb rune) { switch verb { case 'v': diff --git a/vendor/github.com/pkg/errors/go113.go b/vendor/github.com/pkg/errors/go113.go new file mode 100644 index 00000000..be0d10d0 --- /dev/null +++ b/vendor/github.com/pkg/errors/go113.go @@ -0,0 +1,38 @@ +// +build go1.13 + +package errors + +import ( + stderrors "errors" +) + +// Is reports whether any error in err's chain matches target. +// +// The chain consists of err itself followed by the sequence of errors obtained by +// repeatedly calling Unwrap. +// +// An error is considered to match a target if it is equal to that target or if +// it implements a method Is(error) bool such that Is(target) returns true. +func Is(err, target error) bool { return stderrors.Is(err, target) } + +// As finds the first error in err's chain that matches target, and if so, sets +// target to that error value and returns true. +// +// The chain consists of err itself followed by the sequence of errors obtained by +// repeatedly calling Unwrap. +// +// An error matches target if the error's concrete value is assignable to the value +// pointed to by target, or if the error has a method As(interface{}) bool such that +// As(target) returns true. In the latter case, the As method is responsible for +// setting target. +// +// As will panic if target is not a non-nil pointer to either a type that implements +// error, or to any interface type. As returns false if err is nil. +func As(err error, target interface{}) bool { return stderrors.As(err, target) } + +// Unwrap returns the result of calling the Unwrap method on err, if err's +// type contains an Unwrap method returning error. +// Otherwise, Unwrap returns nil. +func Unwrap(err error) error { + return stderrors.Unwrap(err) +} diff --git a/vendor/github.com/pkg/errors/stack.go b/vendor/github.com/pkg/errors/stack.go index 2874a048..779a8348 100644 --- a/vendor/github.com/pkg/errors/stack.go +++ b/vendor/github.com/pkg/errors/stack.go @@ -5,10 +5,13 @@ import ( "io" "path" "runtime" + "strconv" "strings" ) // Frame represents a program counter inside a stack frame. +// For historical reasons if Frame is interpreted as a uintptr +// its value represents the program counter + 1. type Frame uintptr // pc returns the program counter for this frame; @@ -37,6 +40,15 @@ func (f Frame) line() int { return line } +// name returns the name of this function, if known. +func (f Frame) name() string { + fn := runtime.FuncForPC(f.pc()) + if fn == nil { + return "unknown" + } + return fn.Name() +} + // Format formats the frame according to the fmt.Formatter interface. // // %s source file @@ -54,22 +66,16 @@ func (f Frame) Format(s fmt.State, verb rune) { case 's': switch { case s.Flag('+'): - pc := f.pc() - fn := runtime.FuncForPC(pc) - if fn == nil { - io.WriteString(s, "unknown") - } else { - file, _ := fn.FileLine(pc) - fmt.Fprintf(s, "%s\n\t%s", fn.Name(), file) - } + io.WriteString(s, f.name()) + io.WriteString(s, "\n\t") + io.WriteString(s, f.file()) default: io.WriteString(s, path.Base(f.file())) } case 'd': - fmt.Fprintf(s, "%d", f.line()) + io.WriteString(s, strconv.Itoa(f.line())) case 'n': - name := runtime.FuncForPC(f.pc()).Name() - io.WriteString(s, funcname(name)) + io.WriteString(s, funcname(f.name())) case 'v': f.Format(s, 's') io.WriteString(s, ":") @@ -77,6 +83,16 @@ func (f Frame) Format(s fmt.State, verb rune) { } } +// MarshalText formats a stacktrace Frame as a text string. The output is the +// same as that of fmt.Sprintf("%+v", f), but without newlines or tabs. +func (f Frame) MarshalText() ([]byte, error) { + name := f.name() + if name == "unknown" { + return []byte(name), nil + } + return []byte(fmt.Sprintf("%s %s:%d", name, f.file(), f.line())), nil +} + // StackTrace is stack of Frames from innermost (newest) to outermost (oldest). type StackTrace []Frame @@ -94,18 +110,32 @@ func (st StackTrace) Format(s fmt.State, verb rune) { switch { case s.Flag('+'): for _, f := range st { - fmt.Fprintf(s, "\n%+v", f) + io.WriteString(s, "\n") + f.Format(s, verb) } case s.Flag('#'): fmt.Fprintf(s, "%#v", []Frame(st)) default: - fmt.Fprintf(s, "%v", []Frame(st)) + st.formatSlice(s, verb) } case 's': - fmt.Fprintf(s, "%s", []Frame(st)) + st.formatSlice(s, verb) } } +// formatSlice will format this StackTrace into the given buffer as a slice of +// Frame, only valid when called with '%s' or '%v'. +func (st StackTrace) formatSlice(s fmt.State, verb rune) { + io.WriteString(s, "[") + for i, f := range st { + if i > 0 { + io.WriteString(s, " ") + } + f.Format(s, verb) + } + io.WriteString(s, "]") +} + // stack represents a stack of program counters. type stack []uintptr diff --git a/vendor/github.com/rancher/lasso/LICENSE b/vendor/github.com/rancher/lasso/LICENSE new file mode 100644 index 00000000..e454a525 --- /dev/null +++ b/vendor/github.com/rancher/lasso/LICENSE @@ -0,0 +1,178 @@ + + 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 + diff --git a/vendor/github.com/rancher/lasso/pkg/cache/cache.go b/vendor/github.com/rancher/lasso/pkg/cache/cache.go new file mode 100644 index 00000000..65e0464a --- /dev/null +++ b/vendor/github.com/rancher/lasso/pkg/cache/cache.go @@ -0,0 +1,113 @@ +package cache + +import ( + "context" + "fmt" + "time" + + "github.com/rancher/lasso/pkg/client" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/tools/cache" +) + +type Options struct { + Namespace string + Resync time.Duration + TweakList TweakListOptionsFunc +} + +func NewCache(obj, listObj runtime.Object, client *client.Client, opts *Options) cache.SharedIndexInformer { + indexers := cache.Indexers{} + + if client.Namespaced { + indexers[cache.NamespaceIndex] = cache.MetaNamespaceIndexFunc + } + + opts = applyDefaultCacheOptions(opts) + + lw := &deferredListWatcher{ + client: client, + tweakList: opts.TweakList, + namespace: opts.Namespace, + listObj: listObj, + } + + return &deferredCache{ + SharedIndexInformer: cache.NewSharedIndexInformer( + lw, + obj, + opts.Resync, + indexers, + ), + deferredListWatcher: lw, + } +} + +func applyDefaultCacheOptions(opts *Options) *Options { + var newOpts Options + if opts != nil { + newOpts = *opts + } + if newOpts.Resync == 0 { + newOpts.Resync = 10 * time.Hour + } + if newOpts.TweakList == nil { + newOpts.TweakList = func(*metav1.ListOptions) {} + } + return &newOpts +} + +type deferredCache struct { + cache.SharedIndexInformer + deferredListWatcher *deferredListWatcher +} + +type deferredListWatcher struct { + lw cache.ListerWatcher + client *client.Client + tweakList TweakListOptionsFunc + namespace string + listObj runtime.Object +} + +func (d *deferredListWatcher) List(options metav1.ListOptions) (runtime.Object, error) { + if d.lw == nil { + return nil, fmt.Errorf("cache not started") + } + return d.lw.List(options) +} + +func (d *deferredListWatcher) Watch(options metav1.ListOptions) (watch.Interface, error) { + if d.lw == nil { + return nil, fmt.Errorf("cache not started") + } + return d.lw.Watch(options) +} + +func (d *deferredListWatcher) run(stopCh <-chan struct{}) { + ctx, cancel := context.WithCancel(context.Background()) + go func() { + <-stopCh + cancel() + }() + + d.lw = &cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + d.tweakList(&options) + listObj := d.listObj.DeepCopyObject() + err := d.client.List(ctx, d.namespace, listObj, options) + return listObj, err + }, + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + d.tweakList(&options) + return d.client.Watch(ctx, d.namespace, options) + }, + } +} + +func (d *deferredCache) Run(stopCh <-chan struct{}) { + d.deferredListWatcher.run(stopCh) + d.SharedIndexInformer.Run(stopCh) +} diff --git a/vendor/github.com/rancher/lasso/pkg/cache/sharedinformerfactory.go b/vendor/github.com/rancher/lasso/pkg/cache/sharedinformerfactory.go new file mode 100644 index 00000000..8041dbe1 --- /dev/null +++ b/vendor/github.com/rancher/lasso/pkg/cache/sharedinformerfactory.go @@ -0,0 +1,208 @@ +package cache + +import ( + "context" + "sync" + "time" + + "github.com/rancher/lasso/pkg/client" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/tools/cache" +) + +type TweakListOptionsFunc func(*v1.ListOptions) + +type SharedCacheFactoryOptions struct { + DefaultResync time.Duration + DefaultNamespace string + DefaultTweakList TweakListOptionsFunc + + KindResync map[schema.GroupVersionKind]time.Duration + KindNamespace map[schema.GroupVersionKind]string + KindTweakList map[schema.GroupVersionKind]TweakListOptionsFunc +} + +type sharedCacheFactory struct { + lock sync.Mutex + + tweakList TweakListOptionsFunc + defaultResync time.Duration + defaultNamespace string + customResync map[schema.GroupVersionKind]time.Duration + customNamespaces map[schema.GroupVersionKind]string + customTweakList map[schema.GroupVersionKind]TweakListOptionsFunc + sharedClientFactory client.SharedClientFactory + + caches map[schema.GroupVersionKind]cache.SharedIndexInformer + startedCaches map[schema.GroupVersionKind]bool +} + +// NewSharedInformerFactoryWithOptions constructs a new instance of a SharedInformerFactory with additional options. +func NewSharedCachedFactory(sharedClientFactory client.SharedClientFactory, opts *SharedCacheFactoryOptions) SharedCacheFactory { + opts = applyDefaults(opts) + + factory := &sharedCacheFactory{ + lock: sync.Mutex{}, + tweakList: opts.DefaultTweakList, + defaultResync: opts.DefaultResync, + defaultNamespace: opts.DefaultNamespace, + customResync: opts.KindResync, + customNamespaces: opts.KindNamespace, + customTweakList: opts.KindTweakList, + caches: map[schema.GroupVersionKind]cache.SharedIndexInformer{}, + startedCaches: map[schema.GroupVersionKind]bool{}, + sharedClientFactory: sharedClientFactory, + } + + return factory +} + +func applyDefaults(opts *SharedCacheFactoryOptions) *SharedCacheFactoryOptions { + var newOpts SharedCacheFactoryOptions + if opts != nil { + newOpts = *opts + } + + return &newOpts +} + +func (f *sharedCacheFactory) StartGVK(ctx context.Context, gvk schema.GroupVersionKind) error { + f.lock.Lock() + defer f.lock.Unlock() + + informer, ok := f.caches[gvk] + if !ok { + return nil + } + + if !f.startedCaches[gvk] { + go informer.Run(ctx.Done()) + f.startedCaches[gvk] = true + } + + return nil +} + +func (f *sharedCacheFactory) Start(ctx context.Context) error { + f.lock.Lock() + defer f.lock.Unlock() + + for informerType, informer := range f.caches { + if !f.startedCaches[informerType] { + go informer.Run(ctx.Done()) + f.startedCaches[informerType] = true + } + } + + return nil +} + +func (f *sharedCacheFactory) WaitForCacheSync(ctx context.Context) map[schema.GroupVersionKind]bool { + informers := func() map[schema.GroupVersionKind]cache.SharedIndexInformer { + f.lock.Lock() + defer f.lock.Unlock() + + informers := map[schema.GroupVersionKind]cache.SharedIndexInformer{} + for informerType, informer := range f.caches { + if f.startedCaches[informerType] { + informers[informerType] = informer + } + } + return informers + }() + + res := map[schema.GroupVersionKind]bool{} + for informType, informer := range informers { + res[informType] = cache.WaitForCacheSync(ctx.Done(), informer.HasSynced) + } + return res +} + +func (f *sharedCacheFactory) ForObject(obj runtime.Object) (cache.SharedIndexInformer, error) { + return f.ForKind(obj.GetObjectKind().GroupVersionKind()) +} + +func (f *sharedCacheFactory) ForResource(gvr schema.GroupVersionResource, namespaced bool) (cache.SharedIndexInformer, error) { + return f.ForResourceKind(gvr, "", namespaced) +} + +func (f *sharedCacheFactory) ForKind(gvk schema.GroupVersionKind) (cache.SharedIndexInformer, error) { + gvr, namespaced, err := f.sharedClientFactory.ResourceForGVK(gvk) + if err != nil { + return nil, err + } + return f.ForResourceKind(gvr, gvk.Kind, namespaced) +} + +func (f *sharedCacheFactory) ForResourceKind(gvr schema.GroupVersionResource, kind string, namespaced bool) (cache.SharedIndexInformer, error) { + var ( + gvk schema.GroupVersionKind + err error + ) + + if kind == "" { + gvk, err = f.sharedClientFactory.GVKForResource(gvr) + if err != nil { + return nil, err + } + } else { + gvk = gvr.GroupVersion().WithKind(kind) + } + + f.lock.Lock() + defer f.lock.Unlock() + + informer, ok := f.caches[gvk] + if ok { + return informer, nil + } + + resyncPeriod, ok := f.customResync[gvk] + if !ok { + resyncPeriod = f.defaultResync + } + + namespace, ok := f.customNamespaces[gvk] + if !ok { + namespace = f.defaultNamespace + } + + tweakList, ok := f.customTweakList[gvk] + if !ok { + tweakList = f.tweakList + } + + obj, objList, err := f.sharedClientFactory.NewObjects(gvk) + if err != nil { + return nil, err + } + + client := f.sharedClientFactory.ForResourceKind(gvr, kind, namespaced) + + cache := NewCache(obj, objList, client, &Options{ + Namespace: namespace, + Resync: resyncPeriod, + TweakList: tweakList, + }) + f.caches[gvk] = cache + + return cache, nil +} + +func (f *sharedCacheFactory) SharedClientFactory() client.SharedClientFactory { + return f.sharedClientFactory +} + +type SharedCacheFactory interface { + Start(ctx context.Context) error + StartGVK(ctx context.Context, gvk schema.GroupVersionKind) error + ForObject(obj runtime.Object) (cache.SharedIndexInformer, error) + ForKind(gvk schema.GroupVersionKind) (cache.SharedIndexInformer, error) + ForResource(gvr schema.GroupVersionResource, namespaced bool) (cache.SharedIndexInformer, error) + ForResourceKind(gvr schema.GroupVersionResource, kind string, namespaced bool) (cache.SharedIndexInformer, error) + WaitForCacheSync(ctx context.Context) map[schema.GroupVersionKind]bool + SharedClientFactory() client.SharedClientFactory +} diff --git a/vendor/github.com/rancher/lasso/pkg/client/client.go b/vendor/github.com/rancher/lasso/pkg/client/client.go new file mode 100644 index 00000000..8d1d7b5e --- /dev/null +++ b/vendor/github.com/rancher/lasso/pkg/client/client.go @@ -0,0 +1,280 @@ +package client + +import ( + "context" + "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/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/rest" +) + +type Client struct { + RESTClient rest.Interface + timeout time.Duration + Namespaced bool + GVR schema.GroupVersionResource + resource string + prefix []string + apiVersion string + kind string +} + +func IsNamespaced(gvr schema.GroupVersionResource, mapper meta.RESTMapper) (bool, error) { + kind, err := mapper.KindFor(gvr) + if err != nil { + return false, err + } + + mapping, err := mapper.RESTMapping(kind.GroupKind(), kind.Version) + if err != nil { + return false, err + } + + return mapping.Scope.Name() == meta.RESTScopeNameNamespace, nil +} + +func NewClient(gvr schema.GroupVersionResource, kind string, namespaced bool, client rest.Interface, defaultTimeout time.Duration) *Client { + var ( + prefix []string + ) + + if gvr.Group == "" { + prefix = []string{ + "api", + gvr.Version, + } + } else { + prefix = []string{ + "apis", + gvr.Group, + gvr.Version, + } + } + + c := &Client{ + RESTClient: client, + timeout: defaultTimeout, + Namespaced: namespaced, + GVR: gvr, + prefix: prefix, + resource: gvr.Resource, + } + c.apiVersion, c.kind = gvr.GroupVersion().WithKind(kind).ToAPIVersionAndKind() + return c +} + +func noop() {} + +func (c *Client) setupCtx(ctx context.Context, minTimeout time.Duration) (context.Context, func()) { + if minTimeout == 0 && c.timeout == 0 { + return ctx, noop + } + + timeout := c.timeout + if minTimeout > 0 && timeout < minTimeout { + timeout = minTimeout + } + + return context.WithTimeout(ctx, timeout) +} + +func (c *Client) Get(ctx context.Context, namespace, name string, result runtime.Object, options metav1.GetOptions) (err error) { + defer c.setKind(result) + ctx, cancel := c.setupCtx(ctx, 0) + defer cancel() + err = c.RESTClient.Get(). + Prefix(c.prefix...). + NamespaceIfScoped(namespace, c.Namespaced). + Resource(c.resource). + Name(name). + VersionedParams(&options, metav1.ParameterCodec). + Do(ctx). + Into(result) + return +} + +func (c *Client) List(ctx context.Context, namespace string, result runtime.Object, opts metav1.ListOptions) (err error) { + ctx, cancel := c.setupCtx(ctx, 0) + defer cancel() + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + r := c.RESTClient.Get() + if namespace != "" { + r = r.NamespaceIfScoped(namespace, c.Namespaced) + } + err = r.Resource(c.resource). + Prefix(c.prefix...). + VersionedParams(&opts, metav1.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +func (c *Client) Watch(ctx context.Context, namespace string, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.injectKind(c.RESTClient.Get(). + Prefix(c.prefix...). + NamespaceIfScoped(namespace, c.Namespaced). + Resource(c.resource). + VersionedParams(&opts, metav1.ParameterCodec). + Timeout(timeout). + Watch(ctx)) +} + +func (c *Client) Create(ctx context.Context, namespace string, obj, result runtime.Object, opts metav1.CreateOptions) (err error) { + defer c.setKind(result) + ctx, cancel := c.setupCtx(ctx, 0) + defer cancel() + err = c.RESTClient.Post(). + Prefix(c.prefix...). + NamespaceIfScoped(namespace, c.Namespaced). + Resource(c.resource). + VersionedParams(&opts, metav1.ParameterCodec). + Body(obj). + Do(ctx). + Into(result) + return +} + +func (c *Client) Update(ctx context.Context, namespace string, obj, result runtime.Object, opts metav1.UpdateOptions) (err error) { + defer c.setKind(result) + ctx, cancel := c.setupCtx(ctx, 0) + defer cancel() + m, err := meta.Accessor(obj) + if err != nil { + return err + } + err = c.RESTClient.Put(). + Prefix(c.prefix...). + NamespaceIfScoped(namespace, c.Namespaced). + Resource(c.resource). + Name(m.GetName()). + VersionedParams(&opts, metav1.ParameterCodec). + Body(obj). + Do(ctx). + Into(result) + return +} + +func (c *Client) UpdateStatus(ctx context.Context, namespace string, obj, result runtime.Object, opts metav1.UpdateOptions) (err error) { + defer c.setKind(result) + ctx, cancel := c.setupCtx(ctx, 0) + defer cancel() + m, err := meta.Accessor(obj) + if err != nil { + return err + } + err = c.RESTClient.Put(). + Prefix(c.prefix...). + NamespaceIfScoped(namespace, c.Namespaced). + Resource(c.resource). + Name(m.GetName()). + SubResource("status"). + VersionedParams(&opts, metav1.ParameterCodec). + Body(obj). + Do(ctx). + Into(result) + return +} + +func (c *Client) Delete(ctx context.Context, namespace, name string, opts metav1.DeleteOptions) error { + ctx, cancel := c.setupCtx(ctx, 0) + defer cancel() + return c.RESTClient.Delete(). + Prefix(c.prefix...). + NamespaceIfScoped(namespace, c.Namespaced). + Resource(c.resource). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +func (c *Client) DeleteCollection(ctx context.Context, namespace string, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + ctx, cancel := c.setupCtx(ctx, 0) + defer cancel() + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.RESTClient.Delete(). + Prefix(c.prefix...). + NamespaceIfScoped(namespace, c.Namespaced). + Resource(c.resource). + VersionedParams(&listOpts, metav1.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +func (c *Client) Patch(ctx context.Context, namespace, name string, pt types.PatchType, data []byte, result runtime.Object, opts metav1.PatchOptions, subresources ...string) (err error) { + defer c.setKind(result) + ctx, cancel := c.setupCtx(ctx, 0) + defer cancel() + err = c.RESTClient.Patch(pt). + Prefix(c.prefix...). + Namespace(namespace). + Resource(c.resource). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, metav1.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +func (c *Client) setKind(obj runtime.Object) { + if c.kind == "" { + return + } + if _, ok := obj.(*metav1.Status); !ok { + if meta, err := meta.TypeAccessor(obj); err == nil { + meta.SetKind(c.kind) + meta.SetAPIVersion(c.apiVersion) + } + } +} + +func (c *Client) injectKind(w watch.Interface, err error) (watch.Interface, error) { + if c.kind == "" || err != nil { + return w, err + } + + eventChan := make(chan watch.Event) + + go func() { + defer close(eventChan) + for event := range w.ResultChan() { + c.setKind(event.Object) + eventChan <- event + } + }() + + return &watcher{ + Interface: w, + eventChan: eventChan, + }, nil +} + +type watcher struct { + watch.Interface + eventChan chan watch.Event +} + +func (w *watcher) ResultChan() <-chan watch.Event { + return w.eventChan +} diff --git a/vendor/github.com/rancher/lasso/pkg/client/sharedclientfactory.go b/vendor/github.com/rancher/lasso/pkg/client/sharedclientfactory.go new file mode 100644 index 00000000..9b68783d --- /dev/null +++ b/vendor/github.com/rancher/lasso/pkg/client/sharedclientfactory.go @@ -0,0 +1,183 @@ +package client + +import ( + "fmt" + "sync" + "time" + + "github.com/rancher/lasso/pkg/mapper" + "github.com/rancher/lasso/pkg/scheme" + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/client-go/rest" +) + +type SharedClientFactoryOptions struct { + Mapper meta.RESTMapper + Scheme *runtime.Scheme +} + +type SharedClientFactory interface { + ForKind(gvk schema.GroupVersionKind) (*Client, error) + ForResource(gvr schema.GroupVersionResource, namespaced bool) (*Client, error) + ForResourceKind(gvr schema.GroupVersionResource, kind string, namespaced bool) *Client + NewObjects(gvk schema.GroupVersionKind) (runtime.Object, runtime.Object, error) + GVKForObject(obj runtime.Object) (schema.GroupVersionKind, error) + GVKForResource(gvr schema.GroupVersionResource) (schema.GroupVersionKind, error) + ResourceForGVK(gvk schema.GroupVersionKind) (schema.GroupVersionResource, bool, error) +} + +type sharedClientFactory struct { + createLock sync.RWMutex + clients map[schema.GroupVersionResource]*Client + timeout time.Duration + rest rest.Interface + + Mapper meta.RESTMapper + Scheme *runtime.Scheme +} + +func NewSharedClientFactoryForConfig(config *rest.Config) (SharedClientFactory, error) { + return NewSharedClientFactory(config, nil) +} + +func NewSharedClientFactory(config *rest.Config, opts *SharedClientFactoryOptions) (_ SharedClientFactory, err error) { + opts, err = applyDefaults(config, opts) + if err != nil { + return nil, err + } + + config, timeout := populateConfig(opts.Scheme, config) + rest, err := rest.UnversionedRESTClientFor(config) + if err != nil { + return nil, err + } + + return &sharedClientFactory{ + timeout: timeout, + clients: map[schema.GroupVersionResource]*Client{}, + Scheme: opts.Scheme, + Mapper: opts.Mapper, + rest: rest, + }, nil +} + +func applyDefaults(config *rest.Config, opts *SharedClientFactoryOptions) (*SharedClientFactoryOptions, error) { + var newOpts SharedClientFactoryOptions + if opts != nil { + newOpts = *opts + } + + if newOpts.Scheme == nil { + newOpts.Scheme = scheme.All + } + + if newOpts.Mapper == nil { + mapperOpt, err := mapper.New(config) + if err != nil { + return nil, err + } + newOpts.Mapper = mapperOpt + } + + return &newOpts, nil +} + +func (s *sharedClientFactory) GVKForResource(gvr schema.GroupVersionResource) (schema.GroupVersionKind, error) { + return s.Mapper.KindFor(gvr) +} + +func (s *sharedClientFactory) ResourceForGVK(gvk schema.GroupVersionKind) (schema.GroupVersionResource, bool, error) { + mapping, err := s.Mapper.RESTMapping(gvk.GroupKind(), gvk.Version) + if err != nil { + return schema.GroupVersionResource{}, false, err + } + + nsed, err := IsNamespaced(mapping.Resource, s.Mapper) + if err != nil { + return schema.GroupVersionResource{}, false, err + } + + return mapping.Resource, nsed, nil +} + +func (s *sharedClientFactory) GVKForObject(obj runtime.Object) (schema.GroupVersionKind, error) { + gvks, _, err := s.Scheme.ObjectKinds(obj) + if err != nil { + return schema.GroupVersionKind{}, err + } + if len(gvks) == 0 { + return schema.GroupVersionKind{}, fmt.Errorf("failed to find schema.GroupVersionKind for %T", obj) + } + return gvks[0], nil +} + +func (s *sharedClientFactory) NewObjects(gvk schema.GroupVersionKind) (runtime.Object, runtime.Object, error) { + obj, err := s.Scheme.New(gvk) + if err != nil { + return nil, nil, err + } + + objList, err := s.Scheme.New(schema.GroupVersionKind{ + Group: gvk.Group, + Version: gvk.Version, + Kind: gvk.Kind + "List", + }) + return obj, objList, err +} + +func (s *sharedClientFactory) ForKind(gvk schema.GroupVersionKind) (*Client, error) { + gvr, nsed, err := s.ResourceForGVK(gvk) + if err != nil { + return nil, err + } + + return s.ForResourceKind(gvr, gvk.Kind, nsed), nil +} + +func (s *sharedClientFactory) ForResource(gvr schema.GroupVersionResource, namespaced bool) (*Client, error) { + gvk, err := s.GVKForResource(gvr) + if err != nil { + return nil, err + } + return s.ForResourceKind(gvr, gvk.Kind, namespaced), nil +} + +func (s *sharedClientFactory) ForResourceKind(gvr schema.GroupVersionResource, kind string, namespaced bool) *Client { + client := s.getClient(gvr) + if client != nil { + return client + } + + s.createLock.Lock() + defer s.createLock.Unlock() + + client = s.clients[gvr] + if client != nil { + return client + } + + client = NewClient(gvr, kind, namespaced, s.rest, s.timeout) + + s.clients[gvr] = client + return client +} + +func (s *sharedClientFactory) getClient(gvr schema.GroupVersionResource) *Client { + s.createLock.RLock() + defer s.createLock.RUnlock() + return s.clients[gvr] +} + +func populateConfig(scheme *runtime.Scheme, config *rest.Config) (*rest.Config, time.Duration) { + config = rest.CopyConfig(config) + config.NegotiatedSerializer = serializer.NewCodecFactory(scheme).WithoutConversion() + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + timeout := config.Timeout + config.Timeout = 0 + return config, timeout +} diff --git a/vendor/github.com/rancher/lasso/pkg/controller/controller.go b/vendor/github.com/rancher/lasso/pkg/controller/controller.go new file mode 100644 index 00000000..982b864a --- /dev/null +++ b/vendor/github.com/rancher/lasso/pkg/controller/controller.go @@ -0,0 +1,288 @@ +package controller + +import ( + "context" + "fmt" + "strings" + "sync" + "time" + + "github.com/rancher/lasso/pkg/log" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/tools/cache" + "k8s.io/client-go/util/workqueue" +) + +type Handler interface { + OnChange(key string, obj runtime.Object) error +} + +type HandlerFunc func(key string, obj runtime.Object) error + +func (h HandlerFunc) OnChange(key string, obj runtime.Object) error { + return h(key, obj) +} + +type Controller interface { + Enqueue(namespace, name string) + EnqueueAfter(namespace, name string, delay time.Duration) + EnqueueKey(key string) + Informer() cache.SharedIndexInformer + Start(ctx context.Context, workers int) error +} + +type controller struct { + startLock sync.Mutex + + name string + workqueue workqueue.RateLimitingInterface + rateLimiter workqueue.RateLimiter + informer cache.SharedIndexInformer + handler Handler + gvk schema.GroupVersionKind + startKeys []startKey + started bool + startCache func(context.Context) error +} + +type startKey struct { + key string + after time.Duration +} + +type Options struct { + RateLimiter workqueue.RateLimiter +} + +func New(name string, informer cache.SharedIndexInformer, startCache func(context.Context) error, handler Handler, opts *Options) Controller { + opts = applyDefaultOptions(opts) + + controller := &controller{ + name: name, + handler: handler, + informer: informer, + rateLimiter: opts.RateLimiter, + startCache: startCache, + } + + informer.AddEventHandler(cache.ResourceEventHandlerFuncs{ + AddFunc: controller.handleObject, + UpdateFunc: func(old, new interface{}) { + controller.handleObject(new) + }, + DeleteFunc: controller.handleObject, + }) + + return controller +} + +func applyDefaultOptions(opts *Options) *Options { + var newOpts Options + if opts != nil { + newOpts = *opts + } + if newOpts.RateLimiter == nil { + newOpts.RateLimiter = workqueue.DefaultControllerRateLimiter() + } + return &newOpts +} + +func (c *controller) Informer() cache.SharedIndexInformer { + return c.informer +} + +func (c *controller) GroupVersionKind() schema.GroupVersionKind { + return c.gvk +} + +func (c *controller) run(workers int, stopCh <-chan struct{}) { + c.startLock.Lock() + // we have to defer queue creation until we have a stopCh available because a workqueue + // will create a goroutine under the hood. It we instantiate a workqueue we must have + // a mechanism to Shutdown it down. Without the stopCh we don't know when to shutdown + // the queue and release the goroutine + c.workqueue = workqueue.NewNamedRateLimitingQueue(c.rateLimiter, c.name) + for _, start := range c.startKeys { + if start.after == 0 { + c.workqueue.Add(start.key) + } else { + c.workqueue.AddAfter(start.key, start.after) + } + } + c.startKeys = nil + c.startLock.Unlock() + + defer utilruntime.HandleCrash() + defer func() { + c.workqueue.ShutDown() + c.workqueue = nil + }() + + // Start the informer factories to begin populating the informer caches + log.Infof("Starting %s controller", c.name) + + // Launch two workers to process Foo resources + for i := 0; i < workers; i++ { + go wait.Until(c.runWorker, time.Second, stopCh) + } + + <-stopCh + log.Infof("Shutting down %s workers", c.name) +} + +func (c *controller) Start(ctx context.Context, workers int) error { + c.startLock.Lock() + defer c.startLock.Unlock() + + if c.started { + return nil + } + + if err := c.startCache(ctx); err != nil { + return err + } + + if ok := cache.WaitForCacheSync(ctx.Done(), c.informer.HasSynced); !ok { + return fmt.Errorf("failed to wait for caches to sync") + } + + go c.run(workers, ctx.Done()) + c.started = true + return nil +} + +func (c *controller) runWorker() { + for c.processNextWorkItem() { + } +} + +func (c *controller) processNextWorkItem() bool { + obj, shutdown := c.workqueue.Get() + + if shutdown { + return false + } + + if err := c.processSingleItem(obj); err != nil { + if !strings.Contains(err.Error(), "please apply your changes to the latest version and try again") { + log.Errorf("%v", err) + } + return true + } + + return true +} + +func (c *controller) processSingleItem(obj interface{}) error { + var ( + key string + ok bool + ) + + defer c.workqueue.Done(obj) + + if key, ok = obj.(string); !ok { + c.workqueue.Forget(obj) + log.Errorf("expected string in workqueue but got %#v", obj) + return nil + } + if err := c.syncHandler(key); err != nil { + c.workqueue.AddRateLimited(key) + return fmt.Errorf("error syncing '%s': %s, requeuing", key, err.Error()) + } + + c.workqueue.Forget(obj) + return nil +} + +func (c *controller) syncHandler(key string) error { + obj, exists, err := c.informer.GetStore().GetByKey(key) + if err != nil { + return err + } + if !exists { + return c.handler.OnChange(key, nil) + } + + return c.handler.OnChange(key, obj.(runtime.Object)) +} + +func (c *controller) EnqueueKey(key string) { + c.startLock.Lock() + defer c.startLock.Unlock() + + if c.workqueue == nil { + c.startKeys = append(c.startKeys, startKey{key: key}) + } else { + c.workqueue.AddRateLimited(key) + } +} + +func (c *controller) Enqueue(namespace, name string) { + key := keyFunc(namespace, name) + + c.startLock.Lock() + defer c.startLock.Unlock() + + if c.workqueue == nil { + c.startKeys = append(c.startKeys, startKey{key: key}) + } else { + c.workqueue.AddRateLimited(key) + } +} + +func (c *controller) EnqueueAfter(namespace, name string, duration time.Duration) { + key := keyFunc(namespace, name) + + c.startLock.Lock() + defer c.startLock.Unlock() + + if c.workqueue == nil { + c.startKeys = append(c.startKeys, startKey{key: key, after: duration}) + } else { + c.workqueue.AddAfter(key, duration) + } +} + +func keyFunc(namespace, name string) string { + if namespace == "" { + return name + } + return namespace + "/" + name +} + +func (c *controller) enqueue(obj interface{}) { + var key string + var err error + if key, err = cache.MetaNamespaceKeyFunc(obj); err != nil { + log.Errorf("%v", err) + return + } + c.startLock.Lock() + if c.workqueue == nil { + c.startKeys = append(c.startKeys, startKey{key: key}) + } else { + c.workqueue.Add(key) + } + c.startLock.Unlock() +} + +func (c *controller) handleObject(obj interface{}) { + if _, ok := obj.(metav1.Object); !ok { + tombstone, ok := obj.(cache.DeletedFinalStateUnknown) + if !ok { + log.Errorf("error decoding object, invalid type") + return + } + _, ok = tombstone.Obj.(metav1.Object) + if !ok { + log.Errorf("error decoding object tombstone, invalid type") + return + } + } + c.enqueue(obj) +} diff --git a/vendor/github.com/rancher/lasso/pkg/controller/errorcontroller.go b/vendor/github.com/rancher/lasso/pkg/controller/errorcontroller.go new file mode 100644 index 00000000..f868eb1f --- /dev/null +++ b/vendor/github.com/rancher/lasso/pkg/controller/errorcontroller.go @@ -0,0 +1,35 @@ +package controller + +import ( + "context" + "time" + + "k8s.io/client-go/tools/cache" +) + +type errorController struct { + informer cache.SharedIndexInformer +} + +func newErrorController() *errorController { + return &errorController{ + informer: cache.NewSharedIndexInformer(nil, nil, 0, cache.Indexers{}), + } +} + +func (n *errorController) Enqueue(namespace, name string) { +} + +func (n *errorController) EnqueueAfter(namespace, name string, delay time.Duration) { +} + +func (n *errorController) EnqueueKey(key string) { +} + +func (n *errorController) Informer() cache.SharedIndexInformer { + return n.informer +} + +func (n *errorController) Start(ctx context.Context, workers int) error { + return nil +} diff --git a/vendor/github.com/rancher/lasso/pkg/controller/sharedcontroller.go b/vendor/github.com/rancher/lasso/pkg/controller/sharedcontroller.go new file mode 100644 index 00000000..9f90b88b --- /dev/null +++ b/vendor/github.com/rancher/lasso/pkg/controller/sharedcontroller.go @@ -0,0 +1,122 @@ +package controller + +import ( + "context" + "sync" + "time" + + "github.com/rancher/lasso/pkg/cache" + "github.com/rancher/lasso/pkg/client" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + cachetools "k8s.io/client-go/tools/cache" +) + +type SharedControllerHandler interface { + OnChange(key string, obj runtime.Object) (runtime.Object, error) +} + +type SharedController interface { + Controller + + RegisterHandler(ctx context.Context, name string, handler SharedControllerHandler) + Client() *client.Client +} + +type SharedControllerHandlerFunc func(key string, obj runtime.Object) (runtime.Object, error) + +func (s SharedControllerHandlerFunc) OnChange(key string, obj runtime.Object) (runtime.Object, error) { + return s(key, obj) +} + +type sharedController struct { + // this allows one to create a sharedcontroller but it will not actually be started + // unless some aspect of the controllers informer is accessed or needed to be used + deferredController func() (Controller, error) + sharedCacheFactory cache.SharedCacheFactory + controller Controller + gvk schema.GroupVersionKind + handler *sharedHandler + startLock sync.Mutex + started bool + startError error + client *client.Client +} + +func (s *sharedController) Enqueue(namespace, name string) { + s.initController().Enqueue(namespace, name) +} + +func (s *sharedController) EnqueueAfter(namespace, name string, delay time.Duration) { + s.initController().EnqueueAfter(namespace, name, delay) +} + +func (s *sharedController) EnqueueKey(key string) { + s.initController().EnqueueKey(key) +} + +func (s *sharedController) Informer() cachetools.SharedIndexInformer { + return s.initController().Informer() +} + +func (s *sharedController) Client() *client.Client { + return s.client +} + +func (s *sharedController) initController() Controller { + s.startLock.Lock() + defer s.startLock.Unlock() + + if s.controller != nil { + return s.controller + } + + controller, err := s.deferredController() + if err != nil { + controller = newErrorController() + } + + s.startError = err + s.controller = controller + return s.controller +} + +func (s *sharedController) Start(ctx context.Context, workers int) error { + s.startLock.Lock() + defer s.startLock.Unlock() + + if s.startError != nil || s.controller == nil { + return s.startError + } + + if err := s.controller.Start(ctx, workers); err != nil { + return err + } + s.started = true + + go func() { + <-ctx.Done() + s.startLock.Lock() + defer s.startLock.Unlock() + s.started = false + }() + + return nil +} + +func (s *sharedController) RegisterHandler(ctx context.Context, name string, handler SharedControllerHandler) { + // Ensure that controller is initialized + c := s.initController() + + getHandlerTransaction(ctx).do(func() { + s.handler.Register(ctx, name, handler) + + s.startLock.Lock() + defer s.startLock.Unlock() + if s.started { + for _, key := range c.Informer().GetStore().ListKeys() { + c.EnqueueKey(key) + } + } + }) +} diff --git a/vendor/github.com/rancher/lasso/pkg/controller/sharedcontrollerfactory.go b/vendor/github.com/rancher/lasso/pkg/controller/sharedcontrollerfactory.go new file mode 100644 index 00000000..f4974137 --- /dev/null +++ b/vendor/github.com/rancher/lasso/pkg/controller/sharedcontrollerfactory.go @@ -0,0 +1,205 @@ +package controller + +import ( + "context" + "sync" + + "github.com/rancher/lasso/pkg/cache" + "github.com/rancher/lasso/pkg/client" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/rest" + "k8s.io/client-go/util/workqueue" +) + +type SharedControllerFactory interface { + ForObject(obj runtime.Object) (SharedController, error) + ForKind(gvk schema.GroupVersionKind) (SharedController, error) + ForResource(gvr schema.GroupVersionResource, namespaced bool) SharedController + ForResourceKind(gvr schema.GroupVersionResource, kind string, namespaced bool) SharedController + SharedCacheFactory() cache.SharedCacheFactory + Start(ctx context.Context, workers int) error +} + +type SharedControllerFactoryOptions struct { + DefaultRateLimiter workqueue.RateLimiter + DefaultWorkers int + + KindRateLimiter map[schema.GroupVersionKind]workqueue.RateLimiter + KindWorkers map[schema.GroupVersionKind]int +} + +type sharedControllerFactory struct { + controllerLock sync.RWMutex + + sharedCacheFactory cache.SharedCacheFactory + controllers map[schema.GroupVersionResource]*sharedController + + rateLimiter workqueue.RateLimiter + workers int + kindRateLimiter map[schema.GroupVersionKind]workqueue.RateLimiter + kindWorkers map[schema.GroupVersionKind]int +} + +func NewSharedControllerFactoryFromConfig(config *rest.Config, scheme *runtime.Scheme) (SharedControllerFactory, error) { + cf, err := client.NewSharedClientFactory(config, &client.SharedClientFactoryOptions{ + Scheme: scheme, + }) + if err != nil { + return nil, err + } + return NewSharedControllerFactory(cache.NewSharedCachedFactory(cf, nil), nil), nil +} + +func NewSharedControllerFactory(cacheFactory cache.SharedCacheFactory, opts *SharedControllerFactoryOptions) SharedControllerFactory { + opts = applyDefaultSharedOptions(opts) + return &sharedControllerFactory{ + sharedCacheFactory: cacheFactory, + controllers: map[schema.GroupVersionResource]*sharedController{}, + workers: opts.DefaultWorkers, + kindWorkers: opts.KindWorkers, + rateLimiter: opts.DefaultRateLimiter, + kindRateLimiter: opts.KindRateLimiter, + } +} + +func applyDefaultSharedOptions(opts *SharedControllerFactoryOptions) *SharedControllerFactoryOptions { + var newOpts SharedControllerFactoryOptions + if opts != nil { + newOpts = *opts + } + if newOpts.DefaultWorkers == 0 { + newOpts.DefaultWorkers = 5 + } + return &newOpts +} + +func (s *sharedControllerFactory) Start(ctx context.Context, defaultWorkers int) error { + s.controllerLock.Lock() + defer s.controllerLock.Unlock() + + if err := s.sharedCacheFactory.Start(ctx); err != nil { + return err + } + + for gvr, controller := range s.controllers { + w, err := s.getWorkers(gvr, defaultWorkers) + if err != nil { + return err + } + if err := controller.Start(ctx, w); err != nil { + return err + } + } + + return nil +} + +func (s *sharedControllerFactory) ForObject(obj runtime.Object) (SharedController, error) { + gvk, err := s.sharedCacheFactory.SharedClientFactory().GVKForObject(obj) + if err != nil { + return nil, err + } + return s.ForKind(gvk) +} + +func (s *sharedControllerFactory) ForKind(gvk schema.GroupVersionKind) (SharedController, error) { + gvr, nsed, err := s.sharedCacheFactory.SharedClientFactory().ResourceForGVK(gvk) + if err != nil { + return nil, err + } + + return s.ForResourceKind(gvr, gvk.Kind, nsed), nil +} + +func (s *sharedControllerFactory) ForResource(gvr schema.GroupVersionResource, namespaced bool) SharedController { + return s.ForResourceKind(gvr, "", namespaced) +} + +func (s *sharedControllerFactory) ForResourceKind(gvr schema.GroupVersionResource, kind string, namespaced bool) SharedController { + controllerResult := s.byResource(gvr) + if controllerResult != nil { + return controllerResult + } + + s.controllerLock.Lock() + defer s.controllerLock.Unlock() + + controllerResult = s.controllers[gvr] + if controllerResult != nil { + return controllerResult + } + + client := s.sharedCacheFactory.SharedClientFactory().ForResourceKind(gvr, kind, namespaced) + + handler := &sharedHandler{} + + controllerResult = &sharedController{ + deferredController: func() (Controller, error) { + var ( + gvk schema.GroupVersionKind + err error + ) + + if kind == "" { + gvk, err = s.sharedCacheFactory.SharedClientFactory().GVKForResource(gvr) + if err != nil { + return nil, err + } + } else { + gvk = gvr.GroupVersion().WithKind(kind) + } + + cache, err := s.sharedCacheFactory.ForResourceKind(gvr, kind, namespaced) + if err != nil { + return nil, err + } + + rateLimiter, ok := s.kindRateLimiter[gvk] + if !ok { + rateLimiter = s.rateLimiter + } + + starter := func(ctx context.Context) error { + return s.sharedCacheFactory.StartGVK(ctx, gvk) + } + + c := New(gvk.String(), cache, starter, handler, &Options{ + RateLimiter: rateLimiter, + }) + + return c, err + }, + handler: handler, + client: client, + } + + s.controllers[gvr] = controllerResult + return controllerResult +} + +func (s *sharedControllerFactory) getWorkers(gvr schema.GroupVersionResource, workers int) (int, error) { + gvk, err := s.sharedCacheFactory.SharedClientFactory().GVKForResource(gvr) + if err != nil { + return 0, err + } + + w, ok := s.kindWorkers[gvk] + if ok { + return w, nil + } + if workers > 0 { + return workers, nil + } + return s.workers, nil +} + +func (s *sharedControllerFactory) byResource(gvr schema.GroupVersionResource) *sharedController { + s.controllerLock.RLock() + defer s.controllerLock.RUnlock() + return s.controllers[gvr] +} + +func (s *sharedControllerFactory) SharedCacheFactory() cache.SharedCacheFactory { + return s.sharedCacheFactory +} diff --git a/vendor/github.com/rancher/lasso/pkg/controller/sharedhandler.go b/vendor/github.com/rancher/lasso/pkg/controller/sharedhandler.go new file mode 100644 index 00000000..a365eccf --- /dev/null +++ b/vendor/github.com/rancher/lasso/pkg/controller/sharedhandler.go @@ -0,0 +1,122 @@ +package controller + +import ( + "context" + "errors" + "fmt" + "reflect" + "strings" + "sync" + "sync/atomic" + + "k8s.io/apimachinery/pkg/runtime" +) + +var ( + ErrIgnore = errors.New("ignore handler error") +) + +type handlerEntry struct { + id int64 + name string + handler SharedControllerHandler +} + +type sharedHandler struct { + // keep first because arm32 needs atomic.AddInt64 target to be mem aligned + idCounter int64 + + lock sync.Mutex + handlers []handlerEntry +} + +func (h *sharedHandler) Register(ctx context.Context, name string, handler SharedControllerHandler) { + h.lock.Lock() + defer h.lock.Unlock() + + id := atomic.AddInt64(&h.idCounter, 1) + h.handlers = append(h.handlers, handlerEntry{ + id: id, + name: name, + handler: handler, + }) + + go func() { + <-ctx.Done() + + h.lock.Lock() + defer h.lock.Unlock() + + for i := range h.handlers { + if h.handlers[i].id == id { + h.handlers = append(h.handlers[:i], h.handlers[i+1:]...) + break + } + } + }() +} + +func (h *sharedHandler) OnChange(key string, obj runtime.Object) error { + var ( + errs errorList + ) + + for _, handler := range h.handlers { + newObj, err := handler.handler.OnChange(key, obj) + if err != nil && !errors.Is(err, ErrIgnore) { + errs = append(errs, &handlerError{ + HandlerName: handler.name, + Err: err, + }) + } + if newObj != nil && !reflect.ValueOf(newObj).IsNil() { + obj = newObj + } + } + + return errs.ToErr() +} + +type errorList []error + +func (e errorList) Error() string { + buf := strings.Builder{} + for _, err := range e { + if buf.Len() > 0 { + buf.WriteString(", ") + } + buf.WriteString(err.Error()) + } + return buf.String() +} + +func (e errorList) ToErr() error { + switch len(e) { + case 0: + return nil + case 1: + return e[0] + default: + return e + } +} + +func (e errorList) Cause() error { + if len(e) > 0 { + return e[0] + } + return nil +} + +type handlerError struct { + HandlerName string + Err error +} + +func (h handlerError) Error() string { + return fmt.Sprintf("handler %s: %v", h.HandlerName, h.Err) +} + +func (h handlerError) Cause() error { + return h.Err +} diff --git a/vendor/github.com/rancher/norman/controller/transaction.go b/vendor/github.com/rancher/lasso/pkg/controller/transaction.go similarity index 85% rename from vendor/github.com/rancher/norman/controller/transaction.go rename to vendor/github.com/rancher/lasso/pkg/controller/transaction.go index aa206a71..3828dd0f 100644 --- a/vendor/github.com/rancher/norman/controller/transaction.go +++ b/vendor/github.com/rancher/lasso/pkg/controller/transaction.go @@ -13,6 +13,18 @@ type HandlerTransaction struct { result bool } +func (h *HandlerTransaction) do(f func()) { + if h == nil { + f() + } else { + go func() { + if h.shouldContinue() { + f() + } + }() + } +} + func (h *HandlerTransaction) shouldContinue() bool { select { case <-h.parent.Done(): diff --git a/vendor/github.com/rancher/lasso/pkg/log/log.go b/vendor/github.com/rancher/lasso/pkg/log/log.go new file mode 100644 index 00000000..a8725e45 --- /dev/null +++ b/vendor/github.com/rancher/lasso/pkg/log/log.go @@ -0,0 +1,13 @@ +package log + +import "log" + +var ( + // Stupid log abstraction + Infof = func(message string, obj ...interface{}) { + log.Printf("INFO: "+message+"\n", obj...) + } + Errorf = func(message string, obj ...interface{}) { + log.Printf("ERROR: "+message+"\n", obj...) + } +) diff --git a/vendor/github.com/rancher/lasso/pkg/mapper/mapper.go b/vendor/github.com/rancher/lasso/pkg/mapper/mapper.go new file mode 100644 index 00000000..34665824 --- /dev/null +++ b/vendor/github.com/rancher/lasso/pkg/mapper/mapper.go @@ -0,0 +1,90 @@ +package mapper + +import ( + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/discovery" + "k8s.io/client-go/discovery/cached/memory" + "k8s.io/client-go/rest" + "k8s.io/client-go/restmapper" +) + +func New(config *rest.Config) (meta.RESTMapper, error) { + d, err := discovery.NewDiscoveryClientForConfig(config) + if err != nil { + return nil, err + } + cached := memory.NewMemCacheClient(d) + return &retryMapper{ + target: restmapper.NewDeferredDiscoveryRESTMapper(cached), + cache: cached, + }, nil +} + +type retryMapper struct { + target meta.RESTMapper + cache discovery.CachedDiscoveryInterface +} + +func (r *retryMapper) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) { + result, err := r.target.KindFor(resource) + if err != nil { + r.cache.Invalidate() + return r.target.KindFor(resource) + } + return result, err +} + +func (r *retryMapper) KindsFor(resource schema.GroupVersionResource) ([]schema.GroupVersionKind, error) { + result, err := r.target.KindsFor(resource) + if err != nil { + r.cache.Invalidate() + return r.target.KindsFor(resource) + } + return result, err +} + +func (r *retryMapper) ResourceFor(input schema.GroupVersionResource) (schema.GroupVersionResource, error) { + result, err := r.target.ResourceFor(input) + if err != nil { + r.cache.Invalidate() + return r.target.ResourceFor(input) + } + return result, err +} + +func (r *retryMapper) ResourcesFor(input schema.GroupVersionResource) ([]schema.GroupVersionResource, error) { + result, err := r.target.ResourcesFor(input) + if err != nil { + r.cache.Invalidate() + return r.target.ResourcesFor(input) + } + return result, err +} + +func (r *retryMapper) RESTMapping(gk schema.GroupKind, versions ...string) (*meta.RESTMapping, error) { + result, err := r.target.RESTMapping(gk, versions...) + if err != nil { + r.cache.Invalidate() + return r.target.RESTMapping(gk, versions...) + } + return result, err +} + +func (r *retryMapper) RESTMappings(gk schema.GroupKind, versions ...string) ([]*meta.RESTMapping, error) { + result, err := r.target.RESTMappings(gk, versions...) + if err != nil { + r.cache.Invalidate() + return r.target.RESTMappings(gk, versions...) + } + return result, err +} + +func (r *retryMapper) ResourceSingularizer(resource string) (singular string, err error) { + result, err := r.target.ResourceSingularizer(resource) + if err != nil { + r.cache.Invalidate() + return r.target.ResourceSingularizer(resource) + } + return result, err +} diff --git a/vendor/github.com/rancher/lasso/pkg/scheme/all.go b/vendor/github.com/rancher/lasso/pkg/scheme/all.go new file mode 100644 index 00000000..119766c4 --- /dev/null +++ b/vendor/github.com/rancher/lasso/pkg/scheme/all.go @@ -0,0 +1,5 @@ +package scheme + +import "k8s.io/apimachinery/pkg/runtime" + +var All = runtime.NewScheme() diff --git a/vendor/github.com/rancher/norman/controller/generic_controller.go b/vendor/github.com/rancher/norman/controller/generic_controller.go index 571dd949..1d74c104 100644 --- a/vendor/github.com/rancher/norman/controller/generic_controller.go +++ b/vendor/github.com/rancher/norman/controller/generic_controller.go @@ -2,321 +2,69 @@ package controller import ( "context" - "fmt" - "os" - "reflect" "strings" - "sync" "time" + "github.com/rancher/lasso/pkg/controller" + errors2 "github.com/pkg/errors" "github.com/rancher/norman/metrics" - "github.com/rancher/norman/objectclient" - "github.com/rancher/norman/types" "github.com/sirupsen/logrus" - "golang.org/x/time/rate" "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/tools/cache" - "k8s.io/client-go/util/workqueue" ) -const MetricsQueueEnv = "NORMAN_QUEUE_METRICS" -const MetricsReflectorEnv = "NORMAN_REFLECTOR_METRICS" - -var ( - resyncPeriod = 2 * time.Hour -) - -// Override the metrics providers -func init() { - if os.Getenv(MetricsQueueEnv) != "true" { - DisableControllerWorkqueuMetrics() - } - if os.Getenv(MetricsReflectorEnv) != "true" { - DisableControllerReflectorMetrics() - } -} - type HandlerFunc func(key string, obj interface{}) (interface{}, error) type GenericController interface { - SetThreadinessOverride(count int) Informer() cache.SharedIndexInformer AddHandler(ctx context.Context, name string, handler HandlerFunc) - HandlerCount() int Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error -} - -type Backend interface { - List(opts metav1.ListOptions) (runtime.Object, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - ObjectFactory() objectclient.ObjectFactory -} - -type handlerDef struct { - name string - generation int - handler HandlerFunc -} - -type generationKey struct { - generation int - key string } type genericController struct { - sync.Mutex - threadinessOverride int - generation int - informer cache.SharedIndexInformer - handlers []*handlerDef - preStart []string - queue workqueue.RateLimitingInterface - name string - running bool - synced bool + controller controller.SharedController + informer cache.SharedIndexInformer + name string } -func NewGenericController(name string, genericClient Backend) GenericController { - informer := cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: genericClient.List, - WatchFunc: genericClient.Watch, - }, - genericClient.ObjectFactory().Object(), resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) - +func NewGenericController(name string, controller controller.SharedController) GenericController { return &genericController{ - informer: informer, - name: name, + controller: controller, + informer: controller.Informer(), + name: name, } } -func (g *genericController) SetThreadinessOverride(count int) { - g.threadinessOverride = count -} - -func (g *genericController) HandlerCount() int { - return len(g.handlers) -} - func (g *genericController) Informer() cache.SharedIndexInformer { return g.informer } func (g *genericController) Enqueue(namespace, name string) { - key := name - if namespace != "" { - key = namespace + "/" + name - } - if g.queue == nil { - g.preStart = append(g.preStart, key) - } else { - g.queue.AddRateLimited(key) - } + g.controller.Enqueue(namespace, name) } func (g *genericController) EnqueueAfter(namespace, name string, after time.Duration) { - key := name - if namespace != "" { - key = namespace + "/" + name - } - if g.queue != nil { - g.queue.AddAfter(key, after) - } + g.controller.EnqueueAfter(namespace, name, after) } func (g *genericController) AddHandler(ctx context.Context, name string, handler HandlerFunc) { - t := getHandlerTransaction(ctx) - if t == nil { - g.addHandler(ctx, name, handler) - return - } - - go func() { - if t.shouldContinue() { - g.addHandler(ctx, name, handler) + g.controller.RegisterHandler(ctx, name, controller.SharedControllerHandlerFunc(func(key string, obj runtime.Object) (runtime.Object, error) { + logrus.Tracef("%s calling handler %s %s", g.name, name, key) + metrics.IncTotalHandlerExecution(g.name, name) + result, err := handler(key, obj) + runtimeObject, _ := result.(runtime.Object) + if err != nil && !ignoreError(err, false) { + metrics.IncTotalHandlerFailure(g.name, name, key) } - }() -} - -func (g *genericController) addHandler(ctx context.Context, name string, handler HandlerFunc) { - g.Lock() - defer g.Unlock() - - g.generation++ - h := &handlerDef{ - name: name, - generation: g.generation, - handler: handler, - } - - go func(gen int) { - <-ctx.Done() - g.Lock() - defer g.Unlock() - var newHandlers []*handlerDef - for _, handler := range g.handlers { - if handler.generation == gen { - continue - } - newHandlers = append(newHandlers, handler) - } - g.handlers = newHandlers - }(h.generation) - - g.handlers = append(g.handlers, h) - - if g.synced { - for _, key := range g.informer.GetStore().ListKeys() { - g.queue.Add(key) - } - } - -} - -func (g *genericController) Sync(ctx context.Context) error { - g.Lock() - defer g.Unlock() - - return g.sync(ctx) -} - -func (g *genericController) sync(ctx context.Context) (retErr error) { - if g.synced { - return nil - } - - if g.queue == nil { - rl := workqueue.NewMaxOfRateLimiter( - workqueue.NewItemExponentialFailureRateLimiter(500*time.Millisecond, 1000*time.Second), - // 10 qps, 100 bucket size. This is only for retry speed and its only the overall factor (not per item) - &workqueue.BucketRateLimiter{Limiter: rate.NewLimiter(rate.Limit(10), 100)}, - ) - - g.queue = workqueue.NewNamedRateLimitingQueue(rl, g.name) - for _, key := range g.preStart { - g.queue.Add(key) - } - g.preStart = nil - - defer func() { - if retErr != nil { - g.queue.ShutDown() - } - }() - } - - defer utilruntime.HandleCrash() - - g.informer.AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: g.queueObject, - UpdateFunc: func(_, obj interface{}) { - g.queueObject(obj) - }, - DeleteFunc: g.queueObject, - }) - - logrus.Tracef("Syncing %s Controller", g.name) - - go g.informer.Run(ctx.Done()) - - if !cache.WaitForCacheSync(ctx.Done(), g.informer.HasSynced) { - return fmt.Errorf("failed to sync controller %s", g.name) - } - logrus.Tracef("Syncing %s Controller Done", g.name) - - g.synced = true - return nil -} - -func (g *genericController) Start(ctx context.Context, threadiness int) error { - g.Lock() - defer g.Unlock() - - if err := g.sync(ctx); err != nil { - return err - } - - if !g.running { - if g.threadinessOverride > 0 { - threadiness = g.threadinessOverride - } - go g.run(ctx, threadiness) - g.running = true - } - - return nil -} - -func (g *genericController) queueObject(obj interface{}) { - if _, ok := obj.(generationKey); ok { - g.queue.Add(obj) - return - } - - key, err := cache.DeletionHandlingMetaNamespaceKeyFunc(obj) - if err == nil { - g.queue.Add(key) - } -} - -func (g *genericController) run(ctx context.Context, threadiness int) { - defer utilruntime.HandleCrash() - defer g.queue.ShutDown() - - for i := 0; i < threadiness; i++ { - go wait.Until(g.runWorker, time.Second, ctx.Done()) - } - - <-ctx.Done() - logrus.Infof("Shutting down %s controller", g.name) -} - -func (g *genericController) runWorker() { - for g.processNextWorkItem() { - } -} - -func (g *genericController) processNextWorkItem() bool { - key, quit := g.queue.Get() - if quit { - return false - } - defer g.queue.Done(key) - - // do your work on the key. This method will contains your "do stuff" logic - err := g.syncHandler(key) - checkErr := err - if handlerErr, ok := checkErr.(*handlerError); ok { - checkErr = handlerErr.err - } - if _, ok := checkErr.(*ForgetError); err == nil || ok { - if ok { + if _, ok := err.(*ForgetError); ok { logrus.Tracef("%v %v completed with dropped err: %v", g.name, key, err) + return runtimeObject, controller.ErrIgnore } - g.queue.Forget(key) - return true - } - - if err = filterConflictsError(err); err != nil { - logrus.Errorf("%v %v %v", g.name, key, err) - } - - if gk, ok := key.(generationKey); ok { - g.queue.AddRateLimited(gk.key) - } else { - g.queue.AddRateLimited(key) - } - - return true + return runtimeObject, err + })) } func ignoreError(err error, checkString bool) bool { @@ -324,6 +72,9 @@ func ignoreError(err error, checkString bool) bool { if errors.IsConflict(err) { return true } + if err == controller.ErrIgnore { + return true + } if _, ok := err.(*ForgetError); ok { return true } @@ -332,83 +83,3 @@ func ignoreError(err error, checkString bool) bool { } return false } - -func filterConflictsError(err error) error { - if ignoreError(err, false) { - return nil - } - - if errs, ok := errors2.Cause(err).(*types.MultiErrors); ok { - var newErrors []error - for _, newError := range errs.Errors { - if !ignoreError(newError, true) { - newErrors = append(newErrors, newError) - } - } - return types.NewErrors(newErrors...) - } - - return err -} - -func (g *genericController) syncHandler(key interface{}) (err error) { - defer utilruntime.RecoverFromPanic(&err) - - generation := -1 - var s string - var obj interface{} - - switch v := key.(type) { - case string: - s = v - case generationKey: - generation = v.generation - s = v.key - default: - return nil - } - - obj, exists, err := g.informer.GetStore().GetByKey(s) - if err != nil { - return err - } else if !exists { - obj = nil - } - - var errs []error - for _, handler := range g.handlers { - if generation > -1 && handler.generation != generation { - continue - } - - logrus.Tracef("%s calling handler %s %s", g.name, handler.name, s) - metrics.IncTotalHandlerExecution(g.name, handler.name) - var newObj interface{} - if newObj, err = handler.handler(s, obj); err != nil { - if !ignoreError(err, false) { - metrics.IncTotalHandlerFailure(g.name, handler.name, s) - } - errs = append(errs, &handlerError{ - name: handler.name, - err: err, - }) - } else if newObj != nil && !reflect.ValueOf(newObj).IsNil() { - obj = newObj - } - } - err = types.NewErrors(errs...) - return -} - -type handlerError struct { - name string - err error -} - -func (h *handlerError) Error() string { - return fmt.Sprintf("[%s] failed with : %v", h.name, h.err) -} - -func (h *handlerError) Cause() error { - return h.err -} diff --git a/vendor/github.com/rancher/norman/controller/noop_metrics.go b/vendor/github.com/rancher/norman/controller/noop_metrics.go deleted file mode 100644 index 1ac89de7..00000000 --- a/vendor/github.com/rancher/norman/controller/noop_metrics.go +++ /dev/null @@ -1,107 +0,0 @@ -package controller - -import ( - "k8s.io/client-go/tools/cache" - "k8s.io/client-go/util/workqueue" -) - -type noopMetric struct{} - -func (noopMetric) Inc() {} -func (noopMetric) Dec() {} -func (noopMetric) Observe(float64) {} -func (noopMetric) Set(float64) {} - -type noopWorkqueueMetricsProvider struct{} - -func (noopWorkqueueMetricsProvider) NewDepthMetric(name string) workqueue.GaugeMetric { - return noopMetric{} -} - -func (noopWorkqueueMetricsProvider) NewAddsMetric(name string) workqueue.CounterMetric { - return noopMetric{} -} - -func (noopWorkqueueMetricsProvider) NewLatencyMetric(name string) workqueue.HistogramMetric { - return noopMetric{} -} - -func (noopWorkqueueMetricsProvider) NewWorkDurationMetric(name string) workqueue.HistogramMetric { - return noopMetric{} -} - -func (noopWorkqueueMetricsProvider) NewRetriesMetric(name string) workqueue.CounterMetric { - return noopMetric{} -} - -func (noopWorkqueueMetricsProvider) NewDeprecatedAddsMetric(name string) workqueue.CounterMetric { - return noopMetric{} -} - -func (noopWorkqueueMetricsProvider) NewDeprecatedLatencyMetric(name string) workqueue.SummaryMetric { - return noopMetric{} -} - -func (noopWorkqueueMetricsProvider) NewDeprecatedWorkDurationMetric(name string) workqueue.SummaryMetric { - return noopMetric{} -} - -func (noopWorkqueueMetricsProvider) NewDeprecatedUnfinishedWorkSecondsMetric(name string) workqueue.SettableGaugeMetric { - return noopMetric{} -} - -func (noopWorkqueueMetricsProvider) NewDeprecatedLongestRunningProcessorMicrosecondsMetric(name string) workqueue.SettableGaugeMetric { - return noopMetric{} -} - -func (noopWorkqueueMetricsProvider) NewDeprecatedRetriesMetric(name string) workqueue.CounterMetric { - return noopMetric{} -} - -func (noopWorkqueueMetricsProvider) NewDeprecatedDepthMetric(name string) workqueue.GaugeMetric { - return noopMetric{} -} - -func (noopWorkqueueMetricsProvider) NewUnfinishedWorkSecondsMetric(name string) workqueue.SettableGaugeMetric { - return noopMetric{} -} - -func (noopWorkqueueMetricsProvider) NewLongestRunningProcessorSecondsMetric(name string) workqueue.SettableGaugeMetric { - return noopMetric{} -} - -type noopCacheMetricsProvider struct{} - -func (noopCacheMetricsProvider) NewListsMetric(name string) cache.CounterMetric { return noopMetric{} } -func (noopCacheMetricsProvider) NewListDurationMetric(name string) cache.SummaryMetric { - return noopMetric{} -} -func (noopCacheMetricsProvider) NewItemsInListMetric(name string) cache.SummaryMetric { - return noopMetric{} -} -func (noopCacheMetricsProvider) NewWatchesMetric(name string) cache.CounterMetric { return noopMetric{} } -func (noopCacheMetricsProvider) NewShortWatchesMetric(name string) cache.CounterMetric { - return noopMetric{} -} -func (noopCacheMetricsProvider) NewWatchDurationMetric(name string) cache.SummaryMetric { - return noopMetric{} -} -func (noopCacheMetricsProvider) NewItemsInWatchMetric(name string) cache.SummaryMetric { - return noopMetric{} -} -func (noopCacheMetricsProvider) NewLastResourceVersionMetric(name string) cache.GaugeMetric { - return noopMetric{} -} - -func DisableAllControllerMetrics() { - DisableControllerReflectorMetrics() - DisableControllerWorkqueuMetrics() -} - -func DisableControllerWorkqueuMetrics() { - workqueue.SetProvider(noopWorkqueueMetricsProvider{}) -} - -func DisableControllerReflectorMetrics() { - cache.SetReflectorMetricsProvider(noopCacheMetricsProvider{}) -} diff --git a/vendor/github.com/rancher/norman/controller/starter.go b/vendor/github.com/rancher/norman/controller/starter.go deleted file mode 100644 index 55519767..00000000 --- a/vendor/github.com/rancher/norman/controller/starter.go +++ /dev/null @@ -1,40 +0,0 @@ -package controller - -import ( - "context" - - "golang.org/x/sync/errgroup" -) - -type Starter interface { - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error -} - -func SyncThenStart(ctx context.Context, threadiness int, starters ...Starter) error { - if err := Sync(ctx, starters...); err != nil { - return err - } - return Start(ctx, threadiness, starters...) -} - -func Sync(ctx context.Context, starters ...Starter) error { - eg, _ := errgroup.WithContext(ctx) - for _, starter := range starters { - func(starter Starter) { - eg.Go(func() error { - return starter.Sync(ctx) - }) - }(starter) - } - return eg.Wait() -} - -func Start(ctx context.Context, threadiness int, starters ...Starter) error { - for _, starter := range starters { - if err := starter.Start(ctx, threadiness); err != nil { - return err - } - } - return nil -} diff --git a/vendor/github.com/rancher/norman/objectclient/dynamic/content.go b/vendor/github.com/rancher/norman/objectclient/dynamic/content.go deleted file mode 100644 index 794f15b4..00000000 --- a/vendor/github.com/rancher/norman/objectclient/dynamic/content.go +++ /dev/null @@ -1,58 +0,0 @@ -package dynamic - -import ( - ejson "encoding/json" - "strings" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - NegotiatedSerializer = negotiatedSerializer{} -) - -type negotiatedSerializer struct{} - -func (s negotiatedSerializer) SupportedMediaTypes() []runtime.SerializerInfo { - return []runtime.SerializerInfo{ - { - MediaType: "application/json", - EncodesAsText: true, - Serializer: dynamicCodec{ - Encoder: unstructured.UnstructuredJSONScheme, - }, - }, - } -} - -func (s negotiatedSerializer) EncoderForVersion(encoder runtime.Encoder, gv runtime.GroupVersioner) runtime.Encoder { - return encoder -} - -func (s negotiatedSerializer) DecoderToVersion(decoder runtime.Decoder, gv runtime.GroupVersioner) runtime.Decoder { - return decoder -} - -type dynamicCodec struct { - runtime.Encoder -} - -func (dynamicCodec) Decode(data []byte, gvk *schema.GroupVersionKind, obj runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { - obj, gvk, err := unstructured.UnstructuredJSONScheme.Decode(data, gvk, obj) - if err != nil { - return nil, nil, err - } - - if _, ok := obj.(*metav1.Status); !ok && strings.ToLower(gvk.Kind) == "status" { - obj = &metav1.Status{} - err := ejson.Unmarshal(data, obj) - if err != nil { - return nil, nil, err - } - } - - return obj, gvk, nil -} diff --git a/vendor/github.com/rancher/norman/objectclient/object_client.go b/vendor/github.com/rancher/norman/objectclient/object_client.go index fc251b1b..cb030db8 100644 --- a/vendor/github.com/rancher/norman/objectclient/object_client.go +++ b/vendor/github.com/rancher/norman/objectclient/object_client.go @@ -2,25 +2,16 @@ package objectclient import ( "context" - "encoding/json" - "net/http" - "strings" "github.com/pkg/errors" - "github.com/rancher/norman/restwatch" + "github.com/rancher/lasso/pkg/client" "github.com/sirupsen/logrus" - k8sError "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - json2 "k8s.io/apimachinery/pkg/runtime/serializer/json" - "k8s.io/apimachinery/pkg/runtime/serializer/streaming" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/rest" - restclientwatch "k8s.io/client-go/rest/watch" ) type ObjectFactory interface { @@ -46,6 +37,7 @@ type GenericClient interface { GetNamespaced(namespace, name string, opts metav1.GetOptions) (runtime.Object, error) Get(name string, opts metav1.GetOptions) (runtime.Object, error) Update(name string, o runtime.Object) (runtime.Object, error) + UpdateStatus(name string, o runtime.Object) (runtime.Object, error) DeleteNamespaced(namespace, name string, opts *metav1.DeleteOptions) error Delete(name string, opts *metav1.DeleteOptions) error List(opts metav1.ListOptions) (runtime.Object, error) @@ -57,30 +49,33 @@ type GenericClient interface { } type ObjectClient struct { - restClient rest.Interface - resource *metav1.APIResource - gvk schema.GroupVersionKind - ns string - Factory ObjectFactory + ctx context.Context + client *client.Client + resource *metav1.APIResource + gvk schema.GroupVersionKind + ns string + Factory ObjectFactory } -func NewObjectClient(namespace string, restClient rest.Interface, apiResource *metav1.APIResource, gvk schema.GroupVersionKind, factory ObjectFactory) *ObjectClient { +func NewObjectClient(namespace string, client *client.Client, apiResource *metav1.APIResource, gvk schema.GroupVersionKind, factory ObjectFactory) *ObjectClient { return &ObjectClient{ - restClient: restClient, - resource: apiResource, - gvk: gvk, - ns: namespace, - Factory: factory, + ctx: context.TODO(), + client: client, + resource: apiResource, + gvk: gvk, + ns: namespace, + Factory: factory, } } func (p *ObjectClient) UnstructuredClient() GenericClient { return &ObjectClient{ - restClient: p.restClient, - resource: p.resource, - gvk: p.gvk, - ns: p.ns, - Factory: &UnstructuredObjectFactory{}, + ctx: p.ctx, + client: p.client, + resource: p.resource, + gvk: p.gvk, + ns: p.ns, + Factory: &UnstructuredObjectFactory{}, } } @@ -97,78 +92,24 @@ func (p *ObjectClient) getAPIPrefix() string { func (p *ObjectClient) Create(o runtime.Object) (runtime.Object, error) { ns := p.ns - obj, ok := o.(metav1.Object) - if ok && obj.GetNamespace() != "" { + if obj, ok := o.(metav1.Object); ok && obj.GetNamespace() != "" { ns = obj.GetNamespace() } - - if ok { - labels := obj.GetLabels() - if labels == nil { - labels = make(map[string]string) - } else { - ls := make(map[string]string) - for k, v := range labels { - ls[k] = v - } - labels = ls - - } - labels["cattle.io/creator"] = "norman" - obj.SetLabels(labels) - } - - if t, err := meta.TypeAccessor(o); err == nil { - if t.GetKind() == "" { - t.SetKind(p.gvk.Kind) - } - if t.GetAPIVersion() == "" { - apiVersion, _ := p.gvk.ToAPIVersionAndKind() - t.SetAPIVersion(apiVersion) - } - } - result := p.Factory.Object() logrus.Tracef("REST CREATE %s/%s/%s/%s/%s", p.getAPIPrefix(), p.gvk.Group, p.gvk.Version, ns, p.resource.Name) - err := p.restClient.Post(). - Prefix(p.getAPIPrefix(), p.gvk.Group, p.gvk.Version). - NamespaceIfScoped(ns, p.resource.Namespaced). - Resource(p.resource.Name). - Body(o). - Do(context.TODO()). - Into(result) - return result, err + result := p.ObjectFactory().Object() + return result, p.client.Create(p.ctx, ns, o, result, metav1.CreateOptions{}) } func (p *ObjectClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (runtime.Object, error) { - result := p.Factory.Object() - req := p.restClient.Get(). - Prefix(p.getAPIPrefix(), p.gvk.Group, p.gvk.Version) - if namespace != "" { - req = req.Namespace(namespace) - } - err := req. - Resource(p.resource.Name). - VersionedParams(&opts, metav1.ParameterCodec). - Name(name). - Do(context.TODO()). - Into(result) logrus.Tracef("REST GET %s/%s/%s/%s/%s/%s", p.getAPIPrefix(), p.gvk.Group, p.gvk.Version, namespace, p.resource.Name, name) - return result, err - + result := p.Factory.Object() + return result, p.client.Get(p.ctx, namespace, name, result, opts) } func (p *ObjectClient) Get(name string, opts metav1.GetOptions) (runtime.Object, error) { - result := p.Factory.Object() - err := p.restClient.Get(). - Prefix(p.getAPIPrefix(), p.gvk.Group, p.gvk.Version). - NamespaceIfScoped(p.ns, p.resource.Namespaced). - Resource(p.resource.Name). - VersionedParams(&opts, metav1.ParameterCodec). - Name(name). - Do(context.TODO()). - Into(result) logrus.Tracef("REST GET %s/%s/%s/%s/%s/%s", p.getAPIPrefix(), p.gvk.Group, p.gvk.Version, p.ns, p.resource.Name, name) - return result, err + result := p.Factory.Object() + return result, p.client.Get(p.ctx, p.ns, name, result, opts) } func (p *ObjectClient) Update(name string, o runtime.Object) (runtime.Object, error) { @@ -181,130 +122,59 @@ func (p *ObjectClient) Update(name string, o runtime.Object) (runtime.Object, er return result, errors.New("object missing name") } logrus.Tracef("REST UPDATE %s/%s/%s/%s/%s/%s", p.getAPIPrefix(), p.gvk.Group, p.gvk.Version, ns, p.resource.Name, name) - err := p.restClient.Put(). - Prefix(p.getAPIPrefix(), p.gvk.Group, p.gvk.Version). - NamespaceIfScoped(ns, p.resource.Namespaced). - Resource(p.resource.Name). - Name(name). - Body(o). - Do(context.TODO()). - Into(result) - return result, err + return result, p.client.Update(p.ctx, ns, o, result, metav1.UpdateOptions{}) +} + +func (p *ObjectClient) UpdateStatus(name string, o runtime.Object) (runtime.Object, error) { + ns := p.ns + if obj, ok := o.(metav1.Object); ok && obj.GetNamespace() != "" { + ns = obj.GetNamespace() + } + result := p.Factory.Object() + if len(name) == 0 { + return result, errors.New("object missing name") + } + logrus.Tracef("REST UPDATE %s/%s/%s/%s/status/%s/%s", p.getAPIPrefix(), p.gvk.Group, p.gvk.Version, ns, p.resource.Name, name) + return result, p.client.UpdateStatus(p.ctx, ns, o, result, metav1.UpdateOptions{}) } func (p *ObjectClient) DeleteNamespaced(namespace, name string, opts *metav1.DeleteOptions) error { - req := p.restClient.Delete(). - Prefix(p.getAPIPrefix(), p.gvk.Group, p.gvk.Version) - if namespace != "" { - req = req.Namespace(namespace) - } logrus.Tracef("REST DELETE %s/%s/%s/%s/%s/%s", p.getAPIPrefix(), p.gvk.Group, p.gvk.Version, namespace, p.resource.Name, name) - return req.Resource(p.resource.Name). - Name(name). - Body(opts). - Do(context.TODO()). - Error() + if opts == nil { + opts = &metav1.DeleteOptions{} + } + return p.client.Delete(p.ctx, namespace, name, *opts) } func (p *ObjectClient) Delete(name string, opts *metav1.DeleteOptions) error { logrus.Tracef("REST DELETE %s/%s/%s/%s/%s/%s", p.getAPIPrefix(), p.gvk.Group, p.gvk.Version, p.ns, p.resource.Name, name) - return p.restClient.Delete(). - Prefix(p.getAPIPrefix(), p.gvk.Group, p.gvk.Version). - NamespaceIfScoped(p.ns, p.resource.Namespaced). - Resource(p.resource.Name). - Name(name). - Body(opts). - Do(context.TODO()). - Error() + if opts == nil { + opts = &metav1.DeleteOptions{} + } + return p.client.Delete(p.ctx, p.ns, name, *opts) } func (p *ObjectClient) List(opts metav1.ListOptions) (runtime.Object, error) { result := p.Factory.List() logrus.Tracef("REST LIST %s/%s/%s/%s/%s", p.getAPIPrefix(), p.gvk.Group, p.gvk.Version, p.ns, p.resource.Name) - return result, p.restClient.Get(). - Prefix(p.getAPIPrefix(), p.gvk.Group, p.gvk.Version). - NamespaceIfScoped(p.ns, p.resource.Namespaced). - Resource(p.resource.Name). - VersionedParams(&opts, metav1.ParameterCodec). - Do(context.TODO()). - Into(result) + return result, p.client.List(p.ctx, p.ns, result, opts) } func (p *ObjectClient) ListNamespaced(namespace string, opts metav1.ListOptions) (runtime.Object, error) { result := p.Factory.List() logrus.Tracef("REST LIST %s/%s/%s/%s/%s", p.getAPIPrefix(), p.gvk.Group, p.gvk.Version, namespace, p.resource.Name) - return result, p.restClient.Get(). - Prefix(p.getAPIPrefix(), p.gvk.Group, p.gvk.Version). - NamespaceIfScoped(namespace, p.resource.Namespaced). - Resource(p.resource.Name). - VersionedParams(&opts, metav1.ParameterCodec). - Do(context.TODO()). - Into(result) + return result, p.client.List(p.ctx, namespace, result, opts) } func (p *ObjectClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { - restClient := p.restClient - if watchClient, ok := restClient.(restwatch.WatchClient); ok { - restClient = watchClient.WatchClient() - } - - r, err := restClient.Get(). - Prefix(p.getAPIPrefix(), p.gvk.Group, p.gvk.Version). - Prefix("watch"). - NamespaceIfScoped(p.ns, p.resource.Namespaced). - Resource(p.resource.Name). - VersionedParams(&opts, metav1.ParameterCodec). - Stream(context.TODO()) - if err != nil { - return nil, err - } - - embeddedDecoder := &structuredDecoder{ - factory: p.Factory, - } - streamDecoder := streaming.NewDecoder(json2.Framer.NewFrameReader(r), embeddedDecoder) - decoder := restclientwatch.NewDecoder(streamDecoder, embeddedDecoder) - return watch.NewStreamWatcher(decoder, k8sError.NewClientErrorReporter(http.StatusInternalServerError, "watch", "ClientWatchDecoding")), nil -} - -type structuredDecoder struct { - factory ObjectFactory -} - -func (d *structuredDecoder) Decode(data []byte, defaults *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { - if into == nil { - into = d.factory.Object() - } - - err := json.Unmarshal(data, &into) - if err != nil { - status := &metav1.Status{} - if err := json.Unmarshal(data, status); err == nil && strings.ToLower(status.Kind) == "status" { - return status, defaults, nil - } - return nil, nil, err - } - - if _, ok := into.(*metav1.Status); !ok && strings.ToLower(into.GetObjectKind().GroupVersionKind().Kind) == "status" { - into = &metav1.Status{} - err := json.Unmarshal(data, into) - if err != nil { - return nil, nil, err - } - } - - return into, defaults, err + return p.client.Watch(p.ctx, p.ns, opts) } func (p *ObjectClient) DeleteCollection(deleteOptions *metav1.DeleteOptions, listOptions metav1.ListOptions) error { - return p.restClient.Delete(). - Prefix(p.getAPIPrefix(), p.gvk.Group, p.gvk.Version). - NamespaceIfScoped(p.ns, p.resource.Namespaced). - Resource(p.resource.Name). - VersionedParams(&listOptions, metav1.ParameterCodec). - Body(deleteOptions). - Do(context.TODO()). - Error() + if deleteOptions == nil { + deleteOptions = &metav1.DeleteOptions{} + } + return p.client.DeleteCollection(p.ctx, p.ns, *deleteOptions, listOptions) } func (p *ObjectClient) Patch(name string, o runtime.Object, patchType types.PatchType, data []byte, subresources ...string) (runtime.Object, error) { @@ -316,16 +186,7 @@ func (p *ObjectClient) Patch(name string, o runtime.Object, patchType types.Patc if len(name) == 0 { return result, errors.New("object missing name") } - err := p.restClient.Patch(patchType). - Prefix(p.getAPIPrefix(), p.gvk.Group, p.gvk.Version). - NamespaceIfScoped(ns, p.resource.Namespaced). - Resource(p.resource.Name). - SubResource(subresources...). - Name(name). - Body(data). - Do(context.TODO()). - Into(result) - return result, err + return result, p.client.Patch(p.ctx, ns, name, patchType, data, result, metav1.PatchOptions{}, subresources...) } func (p *ObjectClient) ObjectFactory() ObjectFactory { diff --git a/vendor/github.com/rancher/norman/restwatch/rest.go b/vendor/github.com/rancher/norman/restwatch/rest.go deleted file mode 100644 index 4442d517..00000000 --- a/vendor/github.com/rancher/norman/restwatch/rest.go +++ /dev/null @@ -1,49 +0,0 @@ -package restwatch - -import ( - "time" - - "github.com/rancher/wrangler/pkg/ratelimit" - "k8s.io/client-go/rest" -) - -type WatchClient interface { - WatchClient() rest.Interface -} - -func UnversionedRESTClientFor(config *rest.Config) (rest.Interface, error) { - // k8s <= 1.16 would not rate limit when calling UnversionedRESTClientFor(config) - // this keeps that behavior which seems to be relied on in Rancher. - if config.QPS == 0.0 && config.RateLimiter == nil { - config.RateLimiter = ratelimit.None - } - client, err := rest.UnversionedRESTClientFor(config) - if err != nil { - return nil, err - } - - if config.Timeout == 0 { - return client, err - } - - newConfig := *config - newConfig.Timeout = 30 * time.Minute - watchClient, err := rest.UnversionedRESTClientFor(&newConfig) - if err != nil { - return nil, err - } - - return &clientWithWatch{ - RESTClient: client, - watchClient: watchClient, - }, nil -} - -type clientWithWatch struct { - *rest.RESTClient - watchClient *rest.RESTClient -} - -func (c *clientWithWatch) WatchClient() rest.Interface { - return c.watchClient -} diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/alerting_types.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/alerting_types.go index 39d8ed46..43132f81 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/alerting_types.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/alerting_types.go @@ -359,7 +359,7 @@ type SMTPConfig struct { Password string `json:"password,omitempty" norman:"type=password"` Sender string `json:"sender,omitempty" norman:"required"` DefaultRecipient string `json:"defaultRecipient,omitempty" norman:"required"` - TLS bool `json:"tls,omitempty" norman:"required,default=true"` + TLS *bool `json:"tls,omitempty" norman:"required,default=true"` } type SlackConfig struct { diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/authn_types.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/authn_types.go index f9160e93..94fb8351 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/authn_types.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/authn_types.go @@ -47,7 +47,7 @@ type User struct { Password string `json:"password,omitempty" norman:"writeOnly,noupdate"` MustChangePassword bool `json:"mustChangePassword,omitempty"` PrincipalIDs []string `json:"principalIds,omitempty" norman:"type=array[reference[principal]]"` - Me bool `json:"me,omitempty"` + Me bool `json:"me,omitempty" norman:"nocreate,noupdate"` Enabled *bool `json:"enabled,omitempty" norman:"default=true"` Spec UserSpec `json:"spec,omitempty"` Status UserStatus `json:"status"` diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/cluster_types.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/cluster_types.go index cc094779..1a6607bb 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/cluster_types.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/cluster_types.go @@ -71,6 +71,7 @@ const ( ClusterDriverLocal = "local" ClusterDriverRKE = "rancherKubernetesEngine" ClusterDriverK3s = "k3s" + ClusterDriverK3os = "k3os" ) // +genclient @@ -153,6 +154,7 @@ type ClusterStatus struct { Capabilities Capabilities `json:"capabilities,omitempty"` MonitoringStatus *MonitoringStatus `json:"monitoringStatus,omitempty" norman:"nocreate,noupdate"` NodeVersion int `json:"nodeVersion,omitempty"` + NodeCount int `json:"nodeCount,omitempty" norman:"nocreate,noupdate"` IstioEnabled bool `json:"istioEnabled,omitempty" norman:"nocreate,noupdate,default=false"` CertificatesExpiration map[string]CertExpiration `json:"certificatesExpiration,omitempty"` ScheduledClusterScanStatus *ScheduledClusterScanStatus `json:"scheduledClusterScanStatus,omitempty"` diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/globaldns_types.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/globaldns_types.go index 2d9399da..6d2c6c5d 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/globaldns_types.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/globaldns_types.go @@ -5,7 +5,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -type GlobalDNS struct { +type GlobalDns struct { types.Namespaced metav1.TypeMeta `json:",inline"` diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/logging_types.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/logging_types.go index d08ad53e..e17827e2 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/logging_types.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/logging_types.go @@ -177,7 +177,7 @@ type FluentForwarderConfig struct { ClientKey string `json:"clientKey,omitempty"` ClientKeyPass string `json:"clientKeyPass,omitempty"` SSLVerify bool `json:"sslVerify,omitempty"` - Compress bool `json:"compress,omitempty" norman:"default=true"` + Compress *bool `json:"compress,omitempty" norman:"default=true"` FluentServers []FluentServer `json:"fluentServers,omitempty" norman:"required"` } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/machine_types.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/machine_types.go index dbcf6be4..a434d18d 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/machine_types.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/machine_types.go @@ -246,7 +246,7 @@ type NodeCommonParams struct { EngineLabel map[string]string `json:"engineLabel,omitempty"` EngineStorageDriver string `json:"engineStorageDriver,omitempty"` EngineEnv map[string]string `json:"engineEnv,omitempty"` - UseInternalIPAddress bool `json:"useInternalIpAddress,omitempty" norman:"default=true,noupdate"` + UseInternalIPAddress *bool `json:"useInternalIpAddress,omitempty" norman:"default=true,noupdate"` } type NodeDriver struct { @@ -327,7 +327,7 @@ type NodeDrainInput struct { Force bool `yaml:"force" json:"force,omitempty"` // If there are DaemonSet-managed pods, drain will not proceed without IgnoreDaemonSets set to true // (even when set to true, kubectl won't delete pods - so setting default to true) - IgnoreDaemonSets bool `yaml:"ignore_daemonsets" json:"ignoreDaemonSets,omitempty" norman:"default=true"` + IgnoreDaemonSets *bool `yaml:"ignore_daemonsets" json:"ignoreDaemonSets,omitempty" norman:"default=true"` // Continue even if there are pods using emptyDir DeleteLocalData bool `yaml:"delete_local_data" json:"deleteLocalData,omitempty"` //Period of time in seconds given to each pod to terminate gracefully. diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/rke_types.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/rke_types.go index 7eab0294..8aa65264 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/rke_types.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/rke_types.go @@ -33,7 +33,7 @@ type RancherKubernetesEngineConfig struct { // Authorization mode configuration used in the cluster Authorization AuthzConfig `yaml:"authorization" json:"authorization,omitempty"` // Enable/disable strict docker version checking - IgnoreDockerVersion bool `yaml:"ignore_docker_version" json:"ignoreDockerVersion" norman:"default=true"` + IgnoreDockerVersion *bool `yaml:"ignore_docker_version" json:"ignoreDockerVersion" norman:"default=true"` // Kubernetes version to use (if kubernetes image is specifed, image version takes precedence) Version string `yaml:"kubernetes_version" json:"kubernetesVersion,omitempty"` // List of private registries and their credentials @@ -203,7 +203,7 @@ type RKEConfigNode struct { Taints []RKETaint `yaml:"taints" json:"taints,omitempty"` } -type RKEK8sSystemImage struct { +type RkeK8sSystemImage struct { types.Namespaced metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -211,7 +211,7 @@ type RKEK8sSystemImage struct { SystemImages RKESystemImages `yaml:"system_images" json:"systemImages,omitempty"` } -type RKEK8sServiceOption struct { +type RkeK8sServiceOption struct { types.Namespaced metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -219,7 +219,7 @@ type RKEK8sServiceOption struct { ServiceOptions KubernetesServicesOptions `yaml:"service_options" json:"serviceOptions,omitempty"` } -type RKEAddon struct { +type RkeAddon struct { types.Namespaced metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_auth_config_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_auth_config_controller.go index 09762674..90f64ff7 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_auth_config_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_auth_config_controller.go @@ -73,8 +73,6 @@ type AuthConfigController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler AuthConfigHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type AuthConfigInterface interface { @@ -125,7 +123,7 @@ func (l *authConfigLister) Get(namespace, name string) (*AuthConfig, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: AuthConfigGroupVersionKind.Group, - Resource: "authConfig", + Resource: AuthConfigGroupVersionResource.Resource, }, key) } return obj.(*AuthConfig), nil @@ -209,25 +207,12 @@ func (c authConfigFactory) List() runtime.Object { } func (s *authConfigClient) Controller() AuthConfigController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.authConfigControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(AuthConfigGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(AuthConfigGroupVersionResource, AuthConfigGroupVersionKind.Kind, false)) - c = &authConfigController{ + return &authConfigController{ GenericController: genericController, } - - s.client.authConfigControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type authConfigClient struct { @@ -261,6 +246,11 @@ func (s *authConfigClient) Update(o *AuthConfig) (*AuthConfig, error) { return obj.(*AuthConfig), err } +func (s *authConfigClient) UpdateStatus(o *AuthConfig) (*AuthConfig, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*AuthConfig), err +} + func (s *authConfigClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_catalog_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_catalog_controller.go index 74ed2d7b..bee22148 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_catalog_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_catalog_controller.go @@ -73,8 +73,6 @@ type CatalogController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler CatalogHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type CatalogInterface interface { @@ -125,7 +123,7 @@ func (l *catalogLister) Get(namespace, name string) (*Catalog, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: CatalogGroupVersionKind.Group, - Resource: "catalog", + Resource: CatalogGroupVersionResource.Resource, }, key) } return obj.(*Catalog), nil @@ -209,25 +207,12 @@ func (c catalogFactory) List() runtime.Object { } func (s *catalogClient) Controller() CatalogController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.catalogControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(CatalogGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(CatalogGroupVersionResource, CatalogGroupVersionKind.Kind, false)) - c = &catalogController{ + return &catalogController{ GenericController: genericController, } - - s.client.catalogControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type catalogClient struct { @@ -261,6 +246,11 @@ func (s *catalogClient) Update(o *Catalog) (*Catalog, error) { return obj.(*Catalog), err } +func (s *catalogClient) UpdateStatus(o *Catalog) (*Catalog, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Catalog), err +} + func (s *catalogClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_catalog_template_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_catalog_template_controller.go index ee0a6c71..59f69b43 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_catalog_template_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_catalog_template_controller.go @@ -74,8 +74,6 @@ type CatalogTemplateController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler CatalogTemplateHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type CatalogTemplateInterface interface { @@ -126,7 +124,7 @@ func (l *catalogTemplateLister) Get(namespace, name string) (*CatalogTemplate, e if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: CatalogTemplateGroupVersionKind.Group, - Resource: "catalogTemplate", + Resource: CatalogTemplateGroupVersionResource.Resource, }, key) } return obj.(*CatalogTemplate), nil @@ -210,25 +208,12 @@ func (c catalogTemplateFactory) List() runtime.Object { } func (s *catalogTemplateClient) Controller() CatalogTemplateController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.catalogTemplateControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(CatalogTemplateGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(CatalogTemplateGroupVersionResource, CatalogTemplateGroupVersionKind.Kind, true)) - c = &catalogTemplateController{ + return &catalogTemplateController{ GenericController: genericController, } - - s.client.catalogTemplateControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type catalogTemplateClient struct { @@ -262,6 +247,11 @@ func (s *catalogTemplateClient) Update(o *CatalogTemplate) (*CatalogTemplate, er return obj.(*CatalogTemplate), err } +func (s *catalogTemplateClient) UpdateStatus(o *CatalogTemplate) (*CatalogTemplate, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*CatalogTemplate), err +} + func (s *catalogTemplateClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_catalog_template_version_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_catalog_template_version_controller.go index b914b590..3cb8283c 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_catalog_template_version_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_catalog_template_version_controller.go @@ -74,8 +74,6 @@ type CatalogTemplateVersionController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler CatalogTemplateVersionHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type CatalogTemplateVersionInterface interface { @@ -126,7 +124,7 @@ func (l *catalogTemplateVersionLister) Get(namespace, name string) (*CatalogTemp if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: CatalogTemplateVersionGroupVersionKind.Group, - Resource: "catalogTemplateVersion", + Resource: CatalogTemplateVersionGroupVersionResource.Resource, }, key) } return obj.(*CatalogTemplateVersion), nil @@ -210,25 +208,12 @@ func (c catalogTemplateVersionFactory) List() runtime.Object { } func (s *catalogTemplateVersionClient) Controller() CatalogTemplateVersionController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.catalogTemplateVersionControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(CatalogTemplateVersionGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(CatalogTemplateVersionGroupVersionResource, CatalogTemplateVersionGroupVersionKind.Kind, true)) - c = &catalogTemplateVersionController{ + return &catalogTemplateVersionController{ GenericController: genericController, } - - s.client.catalogTemplateVersionControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type catalogTemplateVersionClient struct { @@ -262,6 +247,11 @@ func (s *catalogTemplateVersionClient) Update(o *CatalogTemplateVersion) (*Catal return obj.(*CatalogTemplateVersion), err } +func (s *catalogTemplateVersionClient) UpdateStatus(o *CatalogTemplateVersion) (*CatalogTemplateVersion, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*CatalogTemplateVersion), err +} + func (s *catalogTemplateVersionClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cis_benchmark_version_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cis_benchmark_version_controller.go index 4e7066fb..e7eafcde 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cis_benchmark_version_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cis_benchmark_version_controller.go @@ -74,8 +74,6 @@ type CisBenchmarkVersionController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler CisBenchmarkVersionHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type CisBenchmarkVersionInterface interface { @@ -126,7 +124,7 @@ func (l *cisBenchmarkVersionLister) Get(namespace, name string) (*CisBenchmarkVe if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: CisBenchmarkVersionGroupVersionKind.Group, - Resource: "cisBenchmarkVersion", + Resource: CisBenchmarkVersionGroupVersionResource.Resource, }, key) } return obj.(*CisBenchmarkVersion), nil @@ -210,25 +208,12 @@ func (c cisBenchmarkVersionFactory) List() runtime.Object { } func (s *cisBenchmarkVersionClient) Controller() CisBenchmarkVersionController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.cisBenchmarkVersionControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(CisBenchmarkVersionGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(CisBenchmarkVersionGroupVersionResource, CisBenchmarkVersionGroupVersionKind.Kind, true)) - c = &cisBenchmarkVersionController{ + return &cisBenchmarkVersionController{ GenericController: genericController, } - - s.client.cisBenchmarkVersionControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type cisBenchmarkVersionClient struct { @@ -262,6 +247,11 @@ func (s *cisBenchmarkVersionClient) Update(o *CisBenchmarkVersion) (*CisBenchmar return obj.(*CisBenchmarkVersion), err } +func (s *cisBenchmarkVersionClient) UpdateStatus(o *CisBenchmarkVersion) (*CisBenchmarkVersion, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*CisBenchmarkVersion), err +} + func (s *cisBenchmarkVersionClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cis_config_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cis_config_controller.go index f79cdb58..e3be34f8 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cis_config_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cis_config_controller.go @@ -74,8 +74,6 @@ type CisConfigController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler CisConfigHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type CisConfigInterface interface { @@ -126,7 +124,7 @@ func (l *cisConfigLister) Get(namespace, name string) (*CisConfig, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: CisConfigGroupVersionKind.Group, - Resource: "cisConfig", + Resource: CisConfigGroupVersionResource.Resource, }, key) } return obj.(*CisConfig), nil @@ -210,25 +208,12 @@ func (c cisConfigFactory) List() runtime.Object { } func (s *cisConfigClient) Controller() CisConfigController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.cisConfigControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(CisConfigGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(CisConfigGroupVersionResource, CisConfigGroupVersionKind.Kind, true)) - c = &cisConfigController{ + return &cisConfigController{ GenericController: genericController, } - - s.client.cisConfigControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type cisConfigClient struct { @@ -262,6 +247,11 @@ func (s *cisConfigClient) Update(o *CisConfig) (*CisConfig, error) { return obj.(*CisConfig), err } +func (s *cisConfigClient) UpdateStatus(o *CisConfig) (*CisConfig, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*CisConfig), err +} + func (s *cisConfigClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cloud_credential_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cloud_credential_controller.go index d6a4ef15..8bec06a9 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cloud_credential_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cloud_credential_controller.go @@ -74,8 +74,6 @@ type CloudCredentialController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler CloudCredentialHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type CloudCredentialInterface interface { @@ -126,7 +124,7 @@ func (l *cloudCredentialLister) Get(namespace, name string) (*CloudCredential, e if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: CloudCredentialGroupVersionKind.Group, - Resource: "cloudCredential", + Resource: CloudCredentialGroupVersionResource.Resource, }, key) } return obj.(*CloudCredential), nil @@ -210,25 +208,12 @@ func (c cloudCredentialFactory) List() runtime.Object { } func (s *cloudCredentialClient) Controller() CloudCredentialController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.cloudCredentialControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(CloudCredentialGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(CloudCredentialGroupVersionResource, CloudCredentialGroupVersionKind.Kind, true)) - c = &cloudCredentialController{ + return &cloudCredentialController{ GenericController: genericController, } - - s.client.cloudCredentialControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type cloudCredentialClient struct { @@ -262,6 +247,11 @@ func (s *cloudCredentialClient) Update(o *CloudCredential) (*CloudCredential, er return obj.(*CloudCredential), err } +func (s *cloudCredentialClient) UpdateStatus(o *CloudCredential) (*CloudCredential, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*CloudCredential), err +} + func (s *cloudCredentialClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_alert_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_alert_controller.go index 7181a824..74a589dc 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_alert_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_alert_controller.go @@ -74,8 +74,6 @@ type ClusterAlertController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterAlertHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ClusterAlertInterface interface { @@ -126,7 +124,7 @@ func (l *clusterAlertLister) Get(namespace, name string) (*ClusterAlert, error) if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ClusterAlertGroupVersionKind.Group, - Resource: "clusterAlert", + Resource: ClusterAlertGroupVersionResource.Resource, }, key) } return obj.(*ClusterAlert), nil @@ -210,25 +208,12 @@ func (c clusterAlertFactory) List() runtime.Object { } func (s *clusterAlertClient) Controller() ClusterAlertController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.clusterAlertControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ClusterAlertGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ClusterAlertGroupVersionResource, ClusterAlertGroupVersionKind.Kind, true)) - c = &clusterAlertController{ + return &clusterAlertController{ GenericController: genericController, } - - s.client.clusterAlertControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type clusterAlertClient struct { @@ -262,6 +247,11 @@ func (s *clusterAlertClient) Update(o *ClusterAlert) (*ClusterAlert, error) { return obj.(*ClusterAlert), err } +func (s *clusterAlertClient) UpdateStatus(o *ClusterAlert) (*ClusterAlert, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ClusterAlert), err +} + func (s *clusterAlertClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_alert_group_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_alert_group_controller.go index fccd0033..f0b1b773 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_alert_group_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_alert_group_controller.go @@ -74,8 +74,6 @@ type ClusterAlertGroupController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterAlertGroupHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ClusterAlertGroupInterface interface { @@ -126,7 +124,7 @@ func (l *clusterAlertGroupLister) Get(namespace, name string) (*ClusterAlertGrou if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ClusterAlertGroupGroupVersionKind.Group, - Resource: "clusterAlertGroup", + Resource: ClusterAlertGroupGroupVersionResource.Resource, }, key) } return obj.(*ClusterAlertGroup), nil @@ -210,25 +208,12 @@ func (c clusterAlertGroupFactory) List() runtime.Object { } func (s *clusterAlertGroupClient) Controller() ClusterAlertGroupController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.clusterAlertGroupControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ClusterAlertGroupGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ClusterAlertGroupGroupVersionResource, ClusterAlertGroupGroupVersionKind.Kind, true)) - c = &clusterAlertGroupController{ + return &clusterAlertGroupController{ GenericController: genericController, } - - s.client.clusterAlertGroupControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type clusterAlertGroupClient struct { @@ -262,6 +247,11 @@ func (s *clusterAlertGroupClient) Update(o *ClusterAlertGroup) (*ClusterAlertGro return obj.(*ClusterAlertGroup), err } +func (s *clusterAlertGroupClient) UpdateStatus(o *ClusterAlertGroup) (*ClusterAlertGroup, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ClusterAlertGroup), err +} + func (s *clusterAlertGroupClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_alert_rule_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_alert_rule_controller.go index 7a216bf0..439c2fdd 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_alert_rule_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_alert_rule_controller.go @@ -74,8 +74,6 @@ type ClusterAlertRuleController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterAlertRuleHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ClusterAlertRuleInterface interface { @@ -126,7 +124,7 @@ func (l *clusterAlertRuleLister) Get(namespace, name string) (*ClusterAlertRule, if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ClusterAlertRuleGroupVersionKind.Group, - Resource: "clusterAlertRule", + Resource: ClusterAlertRuleGroupVersionResource.Resource, }, key) } return obj.(*ClusterAlertRule), nil @@ -210,25 +208,12 @@ func (c clusterAlertRuleFactory) List() runtime.Object { } func (s *clusterAlertRuleClient) Controller() ClusterAlertRuleController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.clusterAlertRuleControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ClusterAlertRuleGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ClusterAlertRuleGroupVersionResource, ClusterAlertRuleGroupVersionKind.Kind, true)) - c = &clusterAlertRuleController{ + return &clusterAlertRuleController{ GenericController: genericController, } - - s.client.clusterAlertRuleControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type clusterAlertRuleClient struct { @@ -262,6 +247,11 @@ func (s *clusterAlertRuleClient) Update(o *ClusterAlertRule) (*ClusterAlertRule, return obj.(*ClusterAlertRule), err } +func (s *clusterAlertRuleClient) UpdateStatus(o *ClusterAlertRule) (*ClusterAlertRule, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ClusterAlertRule), err +} + func (s *clusterAlertRuleClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_catalog_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_catalog_controller.go index 3d68d153..d793e9ca 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_catalog_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_catalog_controller.go @@ -74,8 +74,6 @@ type ClusterCatalogController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterCatalogHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ClusterCatalogInterface interface { @@ -126,7 +124,7 @@ func (l *clusterCatalogLister) Get(namespace, name string) (*ClusterCatalog, err if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ClusterCatalogGroupVersionKind.Group, - Resource: "clusterCatalog", + Resource: ClusterCatalogGroupVersionResource.Resource, }, key) } return obj.(*ClusterCatalog), nil @@ -210,25 +208,12 @@ func (c clusterCatalogFactory) List() runtime.Object { } func (s *clusterCatalogClient) Controller() ClusterCatalogController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.clusterCatalogControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ClusterCatalogGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ClusterCatalogGroupVersionResource, ClusterCatalogGroupVersionKind.Kind, true)) - c = &clusterCatalogController{ + return &clusterCatalogController{ GenericController: genericController, } - - s.client.clusterCatalogControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type clusterCatalogClient struct { @@ -262,6 +247,11 @@ func (s *clusterCatalogClient) Update(o *ClusterCatalog) (*ClusterCatalog, error return obj.(*ClusterCatalog), err } +func (s *clusterCatalogClient) UpdateStatus(o *ClusterCatalog) (*ClusterCatalog, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ClusterCatalog), err +} + func (s *clusterCatalogClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_controller.go index 2779a97a..c6034149 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_controller.go @@ -73,8 +73,6 @@ type ClusterController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ClusterInterface interface { @@ -125,7 +123,7 @@ func (l *clusterLister) Get(namespace, name string) (*Cluster, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ClusterGroupVersionKind.Group, - Resource: "cluster", + Resource: ClusterGroupVersionResource.Resource, }, key) } return obj.(*Cluster), nil @@ -209,25 +207,12 @@ func (c clusterFactory) List() runtime.Object { } func (s *clusterClient) Controller() ClusterController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.clusterControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ClusterGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ClusterGroupVersionResource, ClusterGroupVersionKind.Kind, false)) - c = &clusterController{ + return &clusterController{ GenericController: genericController, } - - s.client.clusterControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type clusterClient struct { @@ -261,6 +246,11 @@ func (s *clusterClient) Update(o *Cluster) (*Cluster, error) { return obj.(*Cluster), err } +func (s *clusterClient) UpdateStatus(o *Cluster) (*Cluster, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Cluster), err +} + func (s *clusterClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_logging_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_logging_controller.go index 67c653e7..6fe1b8ac 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_logging_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_logging_controller.go @@ -74,8 +74,6 @@ type ClusterLoggingController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterLoggingHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ClusterLoggingInterface interface { @@ -126,7 +124,7 @@ func (l *clusterLoggingLister) Get(namespace, name string) (*ClusterLogging, err if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ClusterLoggingGroupVersionKind.Group, - Resource: "clusterLogging", + Resource: ClusterLoggingGroupVersionResource.Resource, }, key) } return obj.(*ClusterLogging), nil @@ -210,25 +208,12 @@ func (c clusterLoggingFactory) List() runtime.Object { } func (s *clusterLoggingClient) Controller() ClusterLoggingController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.clusterLoggingControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ClusterLoggingGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ClusterLoggingGroupVersionResource, ClusterLoggingGroupVersionKind.Kind, true)) - c = &clusterLoggingController{ + return &clusterLoggingController{ GenericController: genericController, } - - s.client.clusterLoggingControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type clusterLoggingClient struct { @@ -262,6 +247,11 @@ func (s *clusterLoggingClient) Update(o *ClusterLogging) (*ClusterLogging, error return obj.(*ClusterLogging), err } +func (s *clusterLoggingClient) UpdateStatus(o *ClusterLogging) (*ClusterLogging, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ClusterLogging), err +} + func (s *clusterLoggingClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_monitor_graph_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_monitor_graph_controller.go index 6189d472..ddbe56a1 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_monitor_graph_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_monitor_graph_controller.go @@ -74,8 +74,6 @@ type ClusterMonitorGraphController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterMonitorGraphHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ClusterMonitorGraphInterface interface { @@ -126,7 +124,7 @@ func (l *clusterMonitorGraphLister) Get(namespace, name string) (*ClusterMonitor if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ClusterMonitorGraphGroupVersionKind.Group, - Resource: "clusterMonitorGraph", + Resource: ClusterMonitorGraphGroupVersionResource.Resource, }, key) } return obj.(*ClusterMonitorGraph), nil @@ -210,25 +208,12 @@ func (c clusterMonitorGraphFactory) List() runtime.Object { } func (s *clusterMonitorGraphClient) Controller() ClusterMonitorGraphController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.clusterMonitorGraphControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ClusterMonitorGraphGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ClusterMonitorGraphGroupVersionResource, ClusterMonitorGraphGroupVersionKind.Kind, true)) - c = &clusterMonitorGraphController{ + return &clusterMonitorGraphController{ GenericController: genericController, } - - s.client.clusterMonitorGraphControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type clusterMonitorGraphClient struct { @@ -262,6 +247,11 @@ func (s *clusterMonitorGraphClient) Update(o *ClusterMonitorGraph) (*ClusterMoni return obj.(*ClusterMonitorGraph), err } +func (s *clusterMonitorGraphClient) UpdateStatus(o *ClusterMonitorGraph) (*ClusterMonitorGraph, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ClusterMonitorGraph), err +} + func (s *clusterMonitorGraphClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_registration_token_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_registration_token_controller.go index 1d0545bd..47117d00 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_registration_token_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_registration_token_controller.go @@ -74,8 +74,6 @@ type ClusterRegistrationTokenController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterRegistrationTokenHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ClusterRegistrationTokenInterface interface { @@ -126,7 +124,7 @@ func (l *clusterRegistrationTokenLister) Get(namespace, name string) (*ClusterRe if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ClusterRegistrationTokenGroupVersionKind.Group, - Resource: "clusterRegistrationToken", + Resource: ClusterRegistrationTokenGroupVersionResource.Resource, }, key) } return obj.(*ClusterRegistrationToken), nil @@ -210,25 +208,12 @@ func (c clusterRegistrationTokenFactory) List() runtime.Object { } func (s *clusterRegistrationTokenClient) Controller() ClusterRegistrationTokenController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.clusterRegistrationTokenControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ClusterRegistrationTokenGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ClusterRegistrationTokenGroupVersionResource, ClusterRegistrationTokenGroupVersionKind.Kind, true)) - c = &clusterRegistrationTokenController{ + return &clusterRegistrationTokenController{ GenericController: genericController, } - - s.client.clusterRegistrationTokenControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type clusterRegistrationTokenClient struct { @@ -262,6 +247,11 @@ func (s *clusterRegistrationTokenClient) Update(o *ClusterRegistrationToken) (*C return obj.(*ClusterRegistrationToken), err } +func (s *clusterRegistrationTokenClient) UpdateStatus(o *ClusterRegistrationToken) (*ClusterRegistrationToken, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ClusterRegistrationToken), err +} + func (s *clusterRegistrationTokenClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_role_template_binding_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_role_template_binding_controller.go index 4ffe1a88..27628ec6 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_role_template_binding_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_role_template_binding_controller.go @@ -74,8 +74,6 @@ type ClusterRoleTemplateBindingController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterRoleTemplateBindingHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ClusterRoleTemplateBindingInterface interface { @@ -126,7 +124,7 @@ func (l *clusterRoleTemplateBindingLister) Get(namespace, name string) (*Cluster if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ClusterRoleTemplateBindingGroupVersionKind.Group, - Resource: "clusterRoleTemplateBinding", + Resource: ClusterRoleTemplateBindingGroupVersionResource.Resource, }, key) } return obj.(*ClusterRoleTemplateBinding), nil @@ -210,25 +208,12 @@ func (c clusterRoleTemplateBindingFactory) List() runtime.Object { } func (s *clusterRoleTemplateBindingClient) Controller() ClusterRoleTemplateBindingController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.clusterRoleTemplateBindingControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ClusterRoleTemplateBindingGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ClusterRoleTemplateBindingGroupVersionResource, ClusterRoleTemplateBindingGroupVersionKind.Kind, true)) - c = &clusterRoleTemplateBindingController{ + return &clusterRoleTemplateBindingController{ GenericController: genericController, } - - s.client.clusterRoleTemplateBindingControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type clusterRoleTemplateBindingClient struct { @@ -262,6 +247,11 @@ func (s *clusterRoleTemplateBindingClient) Update(o *ClusterRoleTemplateBinding) return obj.(*ClusterRoleTemplateBinding), err } +func (s *clusterRoleTemplateBindingClient) UpdateStatus(o *ClusterRoleTemplateBinding) (*ClusterRoleTemplateBinding, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ClusterRoleTemplateBinding), err +} + func (s *clusterRoleTemplateBindingClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_scan_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_scan_controller.go index d3c09849..5f11149f 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_scan_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_scan_controller.go @@ -74,8 +74,6 @@ type ClusterScanController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterScanHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ClusterScanInterface interface { @@ -126,7 +124,7 @@ func (l *clusterScanLister) Get(namespace, name string) (*ClusterScan, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ClusterScanGroupVersionKind.Group, - Resource: "clusterScan", + Resource: ClusterScanGroupVersionResource.Resource, }, key) } return obj.(*ClusterScan), nil @@ -210,25 +208,12 @@ func (c clusterScanFactory) List() runtime.Object { } func (s *clusterScanClient) Controller() ClusterScanController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.clusterScanControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ClusterScanGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ClusterScanGroupVersionResource, ClusterScanGroupVersionKind.Kind, true)) - c = &clusterScanController{ + return &clusterScanController{ GenericController: genericController, } - - s.client.clusterScanControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type clusterScanClient struct { @@ -262,6 +247,11 @@ func (s *clusterScanClient) Update(o *ClusterScan) (*ClusterScan, error) { return obj.(*ClusterScan), err } +func (s *clusterScanClient) UpdateStatus(o *ClusterScan) (*ClusterScan, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ClusterScan), err +} + func (s *clusterScanClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_template_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_template_controller.go index 2c761d14..40b237a2 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_template_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_template_controller.go @@ -74,8 +74,6 @@ type ClusterTemplateController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterTemplateHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ClusterTemplateInterface interface { @@ -126,7 +124,7 @@ func (l *clusterTemplateLister) Get(namespace, name string) (*ClusterTemplate, e if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ClusterTemplateGroupVersionKind.Group, - Resource: "clusterTemplate", + Resource: ClusterTemplateGroupVersionResource.Resource, }, key) } return obj.(*ClusterTemplate), nil @@ -210,25 +208,12 @@ func (c clusterTemplateFactory) List() runtime.Object { } func (s *clusterTemplateClient) Controller() ClusterTemplateController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.clusterTemplateControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ClusterTemplateGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ClusterTemplateGroupVersionResource, ClusterTemplateGroupVersionKind.Kind, true)) - c = &clusterTemplateController{ + return &clusterTemplateController{ GenericController: genericController, } - - s.client.clusterTemplateControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type clusterTemplateClient struct { @@ -262,6 +247,11 @@ func (s *clusterTemplateClient) Update(o *ClusterTemplate) (*ClusterTemplate, er return obj.(*ClusterTemplate), err } +func (s *clusterTemplateClient) UpdateStatus(o *ClusterTemplate) (*ClusterTemplate, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ClusterTemplate), err +} + func (s *clusterTemplateClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_template_revision_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_template_revision_controller.go index 03a3c2c9..4ee8828f 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_template_revision_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_template_revision_controller.go @@ -74,8 +74,6 @@ type ClusterTemplateRevisionController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterTemplateRevisionHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ClusterTemplateRevisionInterface interface { @@ -126,7 +124,7 @@ func (l *clusterTemplateRevisionLister) Get(namespace, name string) (*ClusterTem if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ClusterTemplateRevisionGroupVersionKind.Group, - Resource: "clusterTemplateRevision", + Resource: ClusterTemplateRevisionGroupVersionResource.Resource, }, key) } return obj.(*ClusterTemplateRevision), nil @@ -210,25 +208,12 @@ func (c clusterTemplateRevisionFactory) List() runtime.Object { } func (s *clusterTemplateRevisionClient) Controller() ClusterTemplateRevisionController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.clusterTemplateRevisionControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ClusterTemplateRevisionGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ClusterTemplateRevisionGroupVersionResource, ClusterTemplateRevisionGroupVersionKind.Kind, true)) - c = &clusterTemplateRevisionController{ + return &clusterTemplateRevisionController{ GenericController: genericController, } - - s.client.clusterTemplateRevisionControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type clusterTemplateRevisionClient struct { @@ -262,6 +247,11 @@ func (s *clusterTemplateRevisionClient) Update(o *ClusterTemplateRevision) (*Clu return obj.(*ClusterTemplateRevision), err } +func (s *clusterTemplateRevisionClient) UpdateStatus(o *ClusterTemplateRevision) (*ClusterTemplateRevision, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ClusterTemplateRevision), err +} + func (s *clusterTemplateRevisionClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_compose_config_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_compose_config_controller.go index be0395cd..4b14844a 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_compose_config_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_compose_config_controller.go @@ -73,8 +73,6 @@ type ComposeConfigController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ComposeConfigHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ComposeConfigInterface interface { @@ -125,7 +123,7 @@ func (l *composeConfigLister) Get(namespace, name string) (*ComposeConfig, error if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ComposeConfigGroupVersionKind.Group, - Resource: "composeConfig", + Resource: ComposeConfigGroupVersionResource.Resource, }, key) } return obj.(*ComposeConfig), nil @@ -209,25 +207,12 @@ func (c composeConfigFactory) List() runtime.Object { } func (s *composeConfigClient) Controller() ComposeConfigController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.composeConfigControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ComposeConfigGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ComposeConfigGroupVersionResource, ComposeConfigGroupVersionKind.Kind, false)) - c = &composeConfigController{ + return &composeConfigController{ GenericController: genericController, } - - s.client.composeConfigControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type composeConfigClient struct { @@ -261,6 +246,11 @@ func (s *composeConfigClient) Update(o *ComposeConfig) (*ComposeConfig, error) { return obj.(*ComposeConfig), err } +func (s *composeConfigClient) UpdateStatus(o *ComposeConfig) (*ComposeConfig, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ComposeConfig), err +} + func (s *composeConfigClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_deepcopy.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_deepcopy.go index 40f0ed56..2797dd5f 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_deepcopy.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_deepcopy.go @@ -3653,6 +3653,11 @@ func (in *FlannelNetworkProvider) DeepCopy() *FlannelNetworkProvider { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *FluentForwarderConfig) DeepCopyInto(out *FluentForwarderConfig) { *out = *in + if in.Compress != nil { + in, out := &in.Compress, &out.Compress + *out = new(bool) + **out = **in + } if in.FluentServers != nil { in, out := &in.FluentServers, &out.FluentServers *out = make([]FluentServer, len(*in)) @@ -3843,68 +3848,6 @@ func (in *GlobalAwsOpts) DeepCopy() *GlobalAwsOpts { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlobalDNS) DeepCopyInto(out *GlobalDNS) { - *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalDNS. -func (in *GlobalDNS) DeepCopy() *GlobalDNS { - if in == nil { - return nil - } - out := new(GlobalDNS) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GlobalDNS) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlobalDNSList) DeepCopyInto(out *GlobalDNSList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]GlobalDNS, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalDNSList. -func (in *GlobalDNSList) DeepCopy() *GlobalDNSList { - if in == nil { - return nil - } - out := new(GlobalDNSList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GlobalDNSList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GlobalDNSProvider) DeepCopyInto(out *GlobalDNSProvider) { *out = *in @@ -4064,6 +4007,68 @@ func (in *GlobalDNSStatus) DeepCopy() *GlobalDNSStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalDns) DeepCopyInto(out *GlobalDns) { + *out = *in + out.Namespaced = in.Namespaced + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalDns. +func (in *GlobalDns) DeepCopy() *GlobalDns { + if in == nil { + return nil + } + out := new(GlobalDns) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *GlobalDns) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalDnsList) DeepCopyInto(out *GlobalDnsList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]GlobalDns, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalDnsList. +func (in *GlobalDnsList) DeepCopy() *GlobalDnsList { + if in == nil { + return nil + } + out := new(GlobalDnsList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *GlobalDnsList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GlobalOpenstackOpts) DeepCopyInto(out *GlobalOpenstackOpts) { *out = *in @@ -5922,6 +5927,11 @@ func (in *NodeCommonParams) DeepCopyInto(out *NodeCommonParams) { (*out)[key] = val } } + if in.UseInternalIPAddress != nil { + in, out := &in.UseInternalIPAddress, &out.UseInternalIPAddress + *out = new(bool) + **out = **in + } return } @@ -5954,6 +5964,11 @@ func (in *NodeCondition) DeepCopy() *NodeCondition { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NodeDrainInput) DeepCopyInto(out *NodeDrainInput) { *out = *in + if in.IgnoreDaemonSets != nil { + in, out := &in.IgnoreDaemonSets, &out.IgnoreDaemonSets + *out = new(bool) + **out = **in + } return } @@ -6291,7 +6306,7 @@ func (in *NodeSpec) DeepCopyInto(out *NodeSpec) { if in.NodeDrainInput != nil { in, out := &in.NodeDrainInput, &out.NodeDrainInput *out = new(NodeDrainInput) - **out = **in + (*in).DeepCopyInto(*out) } in.MetadataUpdate.DeepCopyInto(&out.MetadataUpdate) return @@ -6513,7 +6528,7 @@ func (in *NodeUpgradeStrategy) DeepCopyInto(out *NodeUpgradeStrategy) { if in.DrainInput != nil { in, out := &in.DrainInput, &out.DrainInput *out = new(NodeDrainInput) - **out = **in + (*in).DeepCopyInto(*out) } return } @@ -6562,7 +6577,7 @@ func (in *Notification) DeepCopyInto(out *Notification) { if in.SMTPConfig != nil { in, out := &in.SMTPConfig, &out.SMTPConfig *out = new(SMTPConfig) - **out = **in + (*in).DeepCopyInto(*out) } if in.SlackConfig != nil { in, out := &in.SlackConfig, &out.SlackConfig @@ -6665,7 +6680,7 @@ func (in *NotifierSpec) DeepCopyInto(out *NotifierSpec) { if in.SMTPConfig != nil { in, out := &in.SMTPConfig, &out.SMTPConfig *out = new(SMTPConfig) - **out = **in + (*in).DeepCopyInto(*out) } if in.SlackConfig != nil { in, out := &in.SlackConfig, &out.SlackConfig @@ -8326,66 +8341,6 @@ func (in *Question) DeepCopy() *Question { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RKEAddon) DeepCopyInto(out *RKEAddon) { - *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RKEAddon. -func (in *RKEAddon) DeepCopy() *RKEAddon { - if in == nil { - return nil - } - out := new(RKEAddon) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RKEAddon) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RKEAddonList) DeepCopyInto(out *RKEAddonList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]RKEAddon, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RKEAddonList. -func (in *RKEAddonList) DeepCopy() *RKEAddonList { - if in == nil { - return nil - } - out := new(RKEAddonList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RKEAddonList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RKEConfigNode) DeepCopyInto(out *RKEConfigNode) { *out = *in @@ -8497,128 +8452,6 @@ func (in *RKEConfigServices) DeepCopy() *RKEConfigServices { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RKEK8sServiceOption) DeepCopyInto(out *RKEK8sServiceOption) { - *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.ServiceOptions.DeepCopyInto(&out.ServiceOptions) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RKEK8sServiceOption. -func (in *RKEK8sServiceOption) DeepCopy() *RKEK8sServiceOption { - if in == nil { - return nil - } - out := new(RKEK8sServiceOption) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RKEK8sServiceOption) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RKEK8sServiceOptionList) DeepCopyInto(out *RKEK8sServiceOptionList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]RKEK8sServiceOption, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RKEK8sServiceOptionList. -func (in *RKEK8sServiceOptionList) DeepCopy() *RKEK8sServiceOptionList { - if in == nil { - return nil - } - out := new(RKEK8sServiceOptionList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RKEK8sServiceOptionList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RKEK8sSystemImage) DeepCopyInto(out *RKEK8sSystemImage) { - *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.SystemImages = in.SystemImages - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RKEK8sSystemImage. -func (in *RKEK8sSystemImage) DeepCopy() *RKEK8sSystemImage { - if in == nil { - return nil - } - out := new(RKEK8sSystemImage) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RKEK8sSystemImage) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RKEK8sSystemImageList) DeepCopyInto(out *RKEK8sSystemImageList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]RKEK8sSystemImage, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RKEK8sSystemImageList. -func (in *RKEK8sSystemImageList) DeepCopy() *RKEK8sSystemImageList { - if in == nil { - return nil - } - out := new(RKEK8sSystemImageList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RKEK8sSystemImageList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RKEPlan) DeepCopyInto(out *RKEPlan) { *out = *in @@ -8698,6 +8531,11 @@ func (in *RancherKubernetesEngineConfig) DeepCopyInto(out *RancherKubernetesEngi } out.SystemImages = in.SystemImages in.Authorization.DeepCopyInto(&out.Authorization) + if in.IgnoreDockerVersion != nil { + in, out := &in.IgnoreDockerVersion, &out.IgnoreDockerVersion + *out = new(bool) + **out = **in + } if in.PrivateRegistries != nil { in, out := &in.PrivateRegistries, &out.PrivateRegistries *out = make([]PrivateRegistry, len(*in)) @@ -8800,6 +8638,188 @@ func (in *RestoreFromEtcdBackupInput) DeepCopy() *RestoreFromEtcdBackupInput { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RkeAddon) DeepCopyInto(out *RkeAddon) { + *out = *in + out.Namespaced = in.Namespaced + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RkeAddon. +func (in *RkeAddon) DeepCopy() *RkeAddon { + if in == nil { + return nil + } + out := new(RkeAddon) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RkeAddon) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RkeAddonList) DeepCopyInto(out *RkeAddonList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]RkeAddon, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RkeAddonList. +func (in *RkeAddonList) DeepCopy() *RkeAddonList { + if in == nil { + return nil + } + out := new(RkeAddonList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RkeAddonList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RkeK8sServiceOption) DeepCopyInto(out *RkeK8sServiceOption) { + *out = *in + out.Namespaced = in.Namespaced + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.ServiceOptions.DeepCopyInto(&out.ServiceOptions) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RkeK8sServiceOption. +func (in *RkeK8sServiceOption) DeepCopy() *RkeK8sServiceOption { + if in == nil { + return nil + } + out := new(RkeK8sServiceOption) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RkeK8sServiceOption) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RkeK8sServiceOptionList) DeepCopyInto(out *RkeK8sServiceOptionList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]RkeK8sServiceOption, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RkeK8sServiceOptionList. +func (in *RkeK8sServiceOptionList) DeepCopy() *RkeK8sServiceOptionList { + if in == nil { + return nil + } + out := new(RkeK8sServiceOptionList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RkeK8sServiceOptionList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RkeK8sSystemImage) DeepCopyInto(out *RkeK8sSystemImage) { + *out = *in + out.Namespaced = in.Namespaced + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.SystemImages = in.SystemImages + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RkeK8sSystemImage. +func (in *RkeK8sSystemImage) DeepCopy() *RkeK8sSystemImage { + if in == nil { + return nil + } + out := new(RkeK8sSystemImage) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RkeK8sSystemImage) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RkeK8sSystemImageList) DeepCopyInto(out *RkeK8sSystemImageList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]RkeK8sSystemImage, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RkeK8sSystemImageList. +func (in *RkeK8sSystemImageList) DeepCopy() *RkeK8sSystemImageList { + if in == nil { + return nil + } + out := new(RkeK8sSystemImageList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RkeK8sSystemImageList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RoleTemplate) DeepCopyInto(out *RoleTemplate) { *out = *in @@ -8996,6 +9016,11 @@ func (in *S3BackupConfig) DeepCopy() *S3BackupConfig { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SMTPConfig) DeepCopyInto(out *SMTPConfig) { *out = *in + if in.TLS != nil { + in, out := &in.TLS, &out.TLS + *out = new(bool) + **out = **in + } return } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_dynamic_schema_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_dynamic_schema_controller.go index c715f2a9..75f082ae 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_dynamic_schema_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_dynamic_schema_controller.go @@ -73,8 +73,6 @@ type DynamicSchemaController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler DynamicSchemaHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type DynamicSchemaInterface interface { @@ -125,7 +123,7 @@ func (l *dynamicSchemaLister) Get(namespace, name string) (*DynamicSchema, error if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: DynamicSchemaGroupVersionKind.Group, - Resource: "dynamicSchema", + Resource: DynamicSchemaGroupVersionResource.Resource, }, key) } return obj.(*DynamicSchema), nil @@ -209,25 +207,12 @@ func (c dynamicSchemaFactory) List() runtime.Object { } func (s *dynamicSchemaClient) Controller() DynamicSchemaController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.dynamicSchemaControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(DynamicSchemaGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(DynamicSchemaGroupVersionResource, DynamicSchemaGroupVersionKind.Kind, false)) - c = &dynamicSchemaController{ + return &dynamicSchemaController{ GenericController: genericController, } - - s.client.dynamicSchemaControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type dynamicSchemaClient struct { @@ -261,6 +246,11 @@ func (s *dynamicSchemaClient) Update(o *DynamicSchema) (*DynamicSchema, error) { return obj.(*DynamicSchema), err } +func (s *dynamicSchemaClient) UpdateStatus(o *DynamicSchema) (*DynamicSchema, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*DynamicSchema), err +} + func (s *dynamicSchemaClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_etcd_backup_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_etcd_backup_controller.go index ecc23dde..a1f1b51a 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_etcd_backup_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_etcd_backup_controller.go @@ -74,8 +74,6 @@ type EtcdBackupController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler EtcdBackupHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type EtcdBackupInterface interface { @@ -126,7 +124,7 @@ func (l *etcdBackupLister) Get(namespace, name string) (*EtcdBackup, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: EtcdBackupGroupVersionKind.Group, - Resource: "etcdBackup", + Resource: EtcdBackupGroupVersionResource.Resource, }, key) } return obj.(*EtcdBackup), nil @@ -210,25 +208,12 @@ func (c etcdBackupFactory) List() runtime.Object { } func (s *etcdBackupClient) Controller() EtcdBackupController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.etcdBackupControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(EtcdBackupGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(EtcdBackupGroupVersionResource, EtcdBackupGroupVersionKind.Kind, true)) - c = &etcdBackupController{ + return &etcdBackupController{ GenericController: genericController, } - - s.client.etcdBackupControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type etcdBackupClient struct { @@ -262,6 +247,11 @@ func (s *etcdBackupClient) Update(o *EtcdBackup) (*EtcdBackup, error) { return obj.(*EtcdBackup), err } +func (s *etcdBackupClient) UpdateStatus(o *EtcdBackup) (*EtcdBackup, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*EtcdBackup), err +} + func (s *etcdBackupClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_feature_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_feature_controller.go index 5744c310..4ecbe377 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_feature_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_feature_controller.go @@ -73,8 +73,6 @@ type FeatureController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler FeatureHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type FeatureInterface interface { @@ -125,7 +123,7 @@ func (l *featureLister) Get(namespace, name string) (*Feature, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: FeatureGroupVersionKind.Group, - Resource: "feature", + Resource: FeatureGroupVersionResource.Resource, }, key) } return obj.(*Feature), nil @@ -209,25 +207,12 @@ func (c featureFactory) List() runtime.Object { } func (s *featureClient) Controller() FeatureController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.featureControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(FeatureGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(FeatureGroupVersionResource, FeatureGroupVersionKind.Kind, false)) - c = &featureController{ + return &featureController{ GenericController: genericController, } - - s.client.featureControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type featureClient struct { @@ -261,6 +246,11 @@ func (s *featureClient) Update(o *Feature) (*Feature, error) { return obj.(*Feature), err } +func (s *featureClient) UpdateStatus(o *Feature) (*Feature, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Feature), err +} + func (s *featureClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_global_dns_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_global_dns_controller.go index ec769bdf..e6581f94 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_global_dns_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_global_dns_controller.go @@ -18,20 +18,20 @@ import ( ) var ( - GlobalDNSGroupVersionKind = schema.GroupVersionKind{ + GlobalDnsGroupVersionKind = schema.GroupVersionKind{ Version: Version, Group: GroupName, - Kind: "GlobalDNS", + Kind: "GlobalDns", } - GlobalDNSResource = metav1.APIResource{ + GlobalDnsResource = metav1.APIResource{ Name: "globaldnses", SingularName: "globaldns", Namespaced: true, - Kind: GlobalDNSGroupVersionKind.Kind, + Kind: GlobalDnsGroupVersionKind.Kind, } - GlobalDNSGroupVersionResource = schema.GroupVersionResource{ + GlobalDnsGroupVersionResource = schema.GroupVersionResource{ Group: GroupName, Version: Version, Resource: "globaldnses", @@ -39,80 +39,78 @@ var ( ) func init() { - resource.Put(GlobalDNSGroupVersionResource) + resource.Put(GlobalDnsGroupVersionResource) } -func NewGlobalDNS(namespace, name string, obj GlobalDNS) *GlobalDNS { - obj.APIVersion, obj.Kind = GlobalDNSGroupVersionKind.ToAPIVersionAndKind() +func NewGlobalDns(namespace, name string, obj GlobalDns) *GlobalDns { + obj.APIVersion, obj.Kind = GlobalDnsGroupVersionKind.ToAPIVersionAndKind() obj.Name = name obj.Namespace = namespace return &obj } -type GlobalDNSList struct { +type GlobalDnsList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []GlobalDNS `json:"items"` + Items []GlobalDns `json:"items"` } -type GlobalDNSHandlerFunc func(key string, obj *GlobalDNS) (runtime.Object, error) +type GlobalDnsHandlerFunc func(key string, obj *GlobalDns) (runtime.Object, error) -type GlobalDNSChangeHandlerFunc func(obj *GlobalDNS) (runtime.Object, error) +type GlobalDnsChangeHandlerFunc func(obj *GlobalDns) (runtime.Object, error) -type GlobalDNSLister interface { - List(namespace string, selector labels.Selector) (ret []*GlobalDNS, err error) - Get(namespace, name string) (*GlobalDNS, error) +type GlobalDnsLister interface { + List(namespace string, selector labels.Selector) (ret []*GlobalDns, err error) + Get(namespace, name string) (*GlobalDns, error) } -type GlobalDNSController interface { +type GlobalDnsController interface { Generic() controller.GenericController Informer() cache.SharedIndexInformer - Lister() GlobalDNSLister - AddHandler(ctx context.Context, name string, handler GlobalDNSHandlerFunc) - AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync GlobalDNSHandlerFunc) - AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler GlobalDNSHandlerFunc) - AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler GlobalDNSHandlerFunc) + Lister() GlobalDnsLister + AddHandler(ctx context.Context, name string, handler GlobalDnsHandlerFunc) + AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync GlobalDnsHandlerFunc) + AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler GlobalDnsHandlerFunc) + AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler GlobalDnsHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } -type GlobalDNSInterface interface { +type GlobalDnsInterface interface { ObjectClient() *objectclient.ObjectClient - Create(*GlobalDNS) (*GlobalDNS, error) - GetNamespaced(namespace, name string, opts metav1.GetOptions) (*GlobalDNS, error) - Get(name string, opts metav1.GetOptions) (*GlobalDNS, error) - Update(*GlobalDNS) (*GlobalDNS, error) + Create(*GlobalDns) (*GlobalDns, error) + GetNamespaced(namespace, name string, opts metav1.GetOptions) (*GlobalDns, error) + Get(name string, opts metav1.GetOptions) (*GlobalDns, error) + Update(*GlobalDns) (*GlobalDns, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*GlobalDNSList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*GlobalDNSList, error) + List(opts metav1.ListOptions) (*GlobalDnsList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*GlobalDnsList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error - Controller() GlobalDNSController - AddHandler(ctx context.Context, name string, sync GlobalDNSHandlerFunc) - AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync GlobalDNSHandlerFunc) - AddLifecycle(ctx context.Context, name string, lifecycle GlobalDNSLifecycle) - AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle GlobalDNSLifecycle) - AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync GlobalDNSHandlerFunc) - AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync GlobalDNSHandlerFunc) - AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle GlobalDNSLifecycle) - AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle GlobalDNSLifecycle) + Controller() GlobalDnsController + AddHandler(ctx context.Context, name string, sync GlobalDnsHandlerFunc) + AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync GlobalDnsHandlerFunc) + AddLifecycle(ctx context.Context, name string, lifecycle GlobalDnsLifecycle) + AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle GlobalDnsLifecycle) + AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync GlobalDnsHandlerFunc) + AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync GlobalDnsHandlerFunc) + AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle GlobalDnsLifecycle) + AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle GlobalDnsLifecycle) } type globalDnsLister struct { controller *globalDnsController } -func (l *globalDnsLister) List(namespace string, selector labels.Selector) (ret []*GlobalDNS, err error) { +func (l *globalDnsLister) List(namespace string, selector labels.Selector) (ret []*GlobalDns, err error) { err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) { - ret = append(ret, obj.(*GlobalDNS)) + ret = append(ret, obj.(*GlobalDns)) }) return } -func (l *globalDnsLister) Get(namespace, name string) (*GlobalDNS, error) { +func (l *globalDnsLister) Get(namespace, name string) (*GlobalDns, error) { var key string if namespace != "" { key = namespace + "/" + name @@ -125,11 +123,11 @@ func (l *globalDnsLister) Get(namespace, name string) (*GlobalDNS, error) { } if !exists { return nil, errors.NewNotFound(schema.GroupResource{ - Group: GlobalDNSGroupVersionKind.Group, - Resource: "globalDns", + Group: GlobalDnsGroupVersionKind.Group, + Resource: GlobalDnsGroupVersionResource.Resource, }, key) } - return obj.(*GlobalDNS), nil + return obj.(*GlobalDns), nil } type globalDnsController struct { @@ -140,17 +138,17 @@ func (c *globalDnsController) Generic() controller.GenericController { return c.GenericController } -func (c *globalDnsController) Lister() GlobalDNSLister { +func (c *globalDnsController) Lister() GlobalDnsLister { return &globalDnsLister{ controller: c, } } -func (c *globalDnsController) AddHandler(ctx context.Context, name string, handler GlobalDNSHandlerFunc) { +func (c *globalDnsController) AddHandler(ctx context.Context, name string, handler GlobalDnsHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*GlobalDNS); ok { + } else if v, ok := obj.(*GlobalDns); ok { return handler(key, v) } else { return nil, nil @@ -158,13 +156,13 @@ func (c *globalDnsController) AddHandler(ctx context.Context, name string, handl }) } -func (c *globalDnsController) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, handler GlobalDNSHandlerFunc) { +func (c *globalDnsController) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, handler GlobalDnsHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if !enabled() { return nil, nil } else if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*GlobalDNS); ok { + } else if v, ok := obj.(*GlobalDns); ok { return handler(key, v) } else { return nil, nil @@ -172,11 +170,11 @@ func (c *globalDnsController) AddFeatureHandler(ctx context.Context, enabled fun }) } -func (c *globalDnsController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler GlobalDNSHandlerFunc) { +func (c *globalDnsController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler GlobalDnsHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*GlobalDNS); ok && controller.ObjectInCluster(cluster, obj) { + } else if v, ok := obj.(*GlobalDns); ok && controller.ObjectInCluster(cluster, obj) { return handler(key, v) } else { return nil, nil @@ -184,13 +182,13 @@ func (c *globalDnsController) AddClusterScopedHandler(ctx context.Context, name, }) } -func (c *globalDnsController) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, cluster string, handler GlobalDNSHandlerFunc) { +func (c *globalDnsController) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, cluster string, handler GlobalDnsHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if !enabled() { return nil, nil } else if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*GlobalDNS); ok && controller.ObjectInCluster(cluster, obj) { + } else if v, ok := obj.(*GlobalDns); ok && controller.ObjectInCluster(cluster, obj) { return handler(key, v) } else { return nil, nil @@ -202,64 +200,56 @@ type globalDnsFactory struct { } func (c globalDnsFactory) Object() runtime.Object { - return &GlobalDNS{} + return &GlobalDns{} } func (c globalDnsFactory) List() runtime.Object { - return &GlobalDNSList{} + return &GlobalDnsList{} } -func (s *globalDnsClient) Controller() GlobalDNSController { - s.client.Lock() - defer s.client.Unlock() +func (s *globalDnsClient) Controller() GlobalDnsController { + genericController := controller.NewGenericController(GlobalDnsGroupVersionKind.Kind+"Controller", + s.client.controllerFactory.ForResourceKind(GlobalDnsGroupVersionResource, GlobalDnsGroupVersionKind.Kind, true)) - c, ok := s.client.globalDnsControllers[s.ns] - if ok { - return c - } - - genericController := controller.NewGenericController(GlobalDNSGroupVersionKind.Kind+"Controller", - s.objectClient) - - c = &globalDnsController{ + return &globalDnsController{ GenericController: genericController, } - - s.client.globalDnsControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type globalDnsClient struct { client *Client ns string objectClient *objectclient.ObjectClient - controller GlobalDNSController + controller GlobalDnsController } func (s *globalDnsClient) ObjectClient() *objectclient.ObjectClient { return s.objectClient } -func (s *globalDnsClient) Create(o *GlobalDNS) (*GlobalDNS, error) { +func (s *globalDnsClient) Create(o *GlobalDns) (*GlobalDns, error) { obj, err := s.objectClient.Create(o) - return obj.(*GlobalDNS), err + return obj.(*GlobalDns), err } -func (s *globalDnsClient) Get(name string, opts metav1.GetOptions) (*GlobalDNS, error) { +func (s *globalDnsClient) Get(name string, opts metav1.GetOptions) (*GlobalDns, error) { obj, err := s.objectClient.Get(name, opts) - return obj.(*GlobalDNS), err + return obj.(*GlobalDns), err } -func (s *globalDnsClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*GlobalDNS, error) { +func (s *globalDnsClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*GlobalDns, error) { obj, err := s.objectClient.GetNamespaced(namespace, name, opts) - return obj.(*GlobalDNS), err + return obj.(*GlobalDns), err } -func (s *globalDnsClient) Update(o *GlobalDNS) (*GlobalDNS, error) { +func (s *globalDnsClient) Update(o *GlobalDns) (*GlobalDns, error) { obj, err := s.objectClient.Update(o.Name, o) - return obj.(*GlobalDNS), err + return obj.(*GlobalDns), err +} + +func (s *globalDnsClient) UpdateStatus(o *GlobalDns) (*GlobalDns, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*GlobalDns), err } func (s *globalDnsClient) Delete(name string, options *metav1.DeleteOptions) error { @@ -270,14 +260,14 @@ func (s *globalDnsClient) DeleteNamespaced(namespace, name string, options *meta return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *globalDnsClient) List(opts metav1.ListOptions) (*GlobalDNSList, error) { +func (s *globalDnsClient) List(opts metav1.ListOptions) (*GlobalDnsList, error) { obj, err := s.objectClient.List(opts) - return obj.(*GlobalDNSList), err + return obj.(*GlobalDnsList), err } -func (s *globalDnsClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*GlobalDNSList, error) { +func (s *globalDnsClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*GlobalDnsList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*GlobalDNSList), err + return obj.(*GlobalDnsList), err } func (s *globalDnsClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { @@ -285,47 +275,47 @@ func (s *globalDnsClient) Watch(opts metav1.ListOptions) (watch.Interface, error } // Patch applies the patch and returns the patched deployment. -func (s *globalDnsClient) Patch(o *GlobalDNS, patchType types.PatchType, data []byte, subresources ...string) (*GlobalDNS, error) { +func (s *globalDnsClient) Patch(o *GlobalDns, patchType types.PatchType, data []byte, subresources ...string) (*GlobalDns, error) { obj, err := s.objectClient.Patch(o.Name, o, patchType, data, subresources...) - return obj.(*GlobalDNS), err + return obj.(*GlobalDns), err } func (s *globalDnsClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error { return s.objectClient.DeleteCollection(deleteOpts, listOpts) } -func (s *globalDnsClient) AddHandler(ctx context.Context, name string, sync GlobalDNSHandlerFunc) { +func (s *globalDnsClient) AddHandler(ctx context.Context, name string, sync GlobalDnsHandlerFunc) { s.Controller().AddHandler(ctx, name, sync) } -func (s *globalDnsClient) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync GlobalDNSHandlerFunc) { +func (s *globalDnsClient) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync GlobalDnsHandlerFunc) { s.Controller().AddFeatureHandler(ctx, enabled, name, sync) } -func (s *globalDnsClient) AddLifecycle(ctx context.Context, name string, lifecycle GlobalDNSLifecycle) { - sync := NewGlobalDNSLifecycleAdapter(name, false, s, lifecycle) +func (s *globalDnsClient) AddLifecycle(ctx context.Context, name string, lifecycle GlobalDnsLifecycle) { + sync := NewGlobalDnsLifecycleAdapter(name, false, s, lifecycle) s.Controller().AddHandler(ctx, name, sync) } -func (s *globalDnsClient) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle GlobalDNSLifecycle) { - sync := NewGlobalDNSLifecycleAdapter(name, false, s, lifecycle) +func (s *globalDnsClient) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle GlobalDnsLifecycle) { + sync := NewGlobalDnsLifecycleAdapter(name, false, s, lifecycle) s.Controller().AddFeatureHandler(ctx, enabled, name, sync) } -func (s *globalDnsClient) AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync GlobalDNSHandlerFunc) { +func (s *globalDnsClient) AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync GlobalDnsHandlerFunc) { s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync) } -func (s *globalDnsClient) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync GlobalDNSHandlerFunc) { +func (s *globalDnsClient) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync GlobalDnsHandlerFunc) { s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync) } -func (s *globalDnsClient) AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle GlobalDNSLifecycle) { - sync := NewGlobalDNSLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) +func (s *globalDnsClient) AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle GlobalDnsLifecycle) { + sync := NewGlobalDnsLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync) } -func (s *globalDnsClient) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle GlobalDNSLifecycle) { - sync := NewGlobalDNSLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) +func (s *globalDnsClient) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle GlobalDnsLifecycle) { + sync := NewGlobalDnsLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_global_dns_lifecycle_adapter.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_global_dns_lifecycle_adapter.go index 90645722..4ff04fb0 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_global_dns_lifecycle_adapter.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_global_dns_lifecycle_adapter.go @@ -6,14 +6,14 @@ import ( "k8s.io/apimachinery/pkg/runtime" ) -type GlobalDNSLifecycle interface { - Create(obj *GlobalDNS) (runtime.Object, error) - Remove(obj *GlobalDNS) (runtime.Object, error) - Updated(obj *GlobalDNS) (runtime.Object, error) +type GlobalDnsLifecycle interface { + Create(obj *GlobalDns) (runtime.Object, error) + Remove(obj *GlobalDns) (runtime.Object, error) + Updated(obj *GlobalDns) (runtime.Object, error) } type globalDnsLifecycleAdapter struct { - lifecycle GlobalDNSLifecycle + lifecycle GlobalDnsLifecycle } func (w *globalDnsLifecycleAdapter) HasCreate() bool { @@ -27,7 +27,7 @@ func (w *globalDnsLifecycleAdapter) HasFinalize() bool { } func (w *globalDnsLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Create(obj.(*GlobalDNS)) + o, err := w.lifecycle.Create(obj.(*GlobalDns)) if o == nil { return nil, err } @@ -35,7 +35,7 @@ func (w *globalDnsLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, } func (w *globalDnsLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Remove(obj.(*GlobalDNS)) + o, err := w.lifecycle.Remove(obj.(*GlobalDns)) if o == nil { return nil, err } @@ -43,20 +43,20 @@ func (w *globalDnsLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object } func (w *globalDnsLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Updated(obj.(*GlobalDNS)) + o, err := w.lifecycle.Updated(obj.(*GlobalDns)) if o == nil { return nil, err } return o, err } -func NewGlobalDNSLifecycleAdapter(name string, clusterScoped bool, client GlobalDNSInterface, l GlobalDNSLifecycle) GlobalDNSHandlerFunc { +func NewGlobalDnsLifecycleAdapter(name string, clusterScoped bool, client GlobalDnsInterface, l GlobalDnsLifecycle) GlobalDnsHandlerFunc { if clusterScoped { - resource.PutClusterScoped(GlobalDNSGroupVersionResource) + resource.PutClusterScoped(GlobalDnsGroupVersionResource) } adapter := &globalDnsLifecycleAdapter{lifecycle: l} syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient()) - return func(key string, obj *GlobalDNS) (runtime.Object, error) { + return func(key string, obj *GlobalDns) (runtime.Object, error) { newObj, err := syncFn(key, obj) if o, ok := newObj.(runtime.Object); ok { return o, err diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_global_dns_provider_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_global_dns_provider_controller.go index d8383cd5..e561159a 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_global_dns_provider_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_global_dns_provider_controller.go @@ -74,8 +74,6 @@ type GlobalDNSProviderController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler GlobalDNSProviderHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type GlobalDNSProviderInterface interface { @@ -126,7 +124,7 @@ func (l *globalDnsProviderLister) Get(namespace, name string) (*GlobalDNSProvide if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: GlobalDNSProviderGroupVersionKind.Group, - Resource: "globalDnsProvider", + Resource: GlobalDNSProviderGroupVersionResource.Resource, }, key) } return obj.(*GlobalDNSProvider), nil @@ -210,25 +208,12 @@ func (c globalDnsProviderFactory) List() runtime.Object { } func (s *globalDnsProviderClient) Controller() GlobalDNSProviderController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.globalDnsProviderControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(GlobalDNSProviderGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(GlobalDNSProviderGroupVersionResource, GlobalDNSProviderGroupVersionKind.Kind, true)) - c = &globalDnsProviderController{ + return &globalDnsProviderController{ GenericController: genericController, } - - s.client.globalDnsProviderControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type globalDnsProviderClient struct { @@ -262,6 +247,11 @@ func (s *globalDnsProviderClient) Update(o *GlobalDNSProvider) (*GlobalDNSProvid return obj.(*GlobalDNSProvider), err } +func (s *globalDnsProviderClient) UpdateStatus(o *GlobalDNSProvider) (*GlobalDNSProvider, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*GlobalDNSProvider), err +} + func (s *globalDnsProviderClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_global_role_binding_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_global_role_binding_controller.go index 94893b07..76f07d97 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_global_role_binding_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_global_role_binding_controller.go @@ -73,8 +73,6 @@ type GlobalRoleBindingController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler GlobalRoleBindingHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type GlobalRoleBindingInterface interface { @@ -125,7 +123,7 @@ func (l *globalRoleBindingLister) Get(namespace, name string) (*GlobalRoleBindin if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: GlobalRoleBindingGroupVersionKind.Group, - Resource: "globalRoleBinding", + Resource: GlobalRoleBindingGroupVersionResource.Resource, }, key) } return obj.(*GlobalRoleBinding), nil @@ -209,25 +207,12 @@ func (c globalRoleBindingFactory) List() runtime.Object { } func (s *globalRoleBindingClient) Controller() GlobalRoleBindingController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.globalRoleBindingControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(GlobalRoleBindingGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(GlobalRoleBindingGroupVersionResource, GlobalRoleBindingGroupVersionKind.Kind, false)) - c = &globalRoleBindingController{ + return &globalRoleBindingController{ GenericController: genericController, } - - s.client.globalRoleBindingControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type globalRoleBindingClient struct { @@ -261,6 +246,11 @@ func (s *globalRoleBindingClient) Update(o *GlobalRoleBinding) (*GlobalRoleBindi return obj.(*GlobalRoleBinding), err } +func (s *globalRoleBindingClient) UpdateStatus(o *GlobalRoleBinding) (*GlobalRoleBinding, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*GlobalRoleBinding), err +} + func (s *globalRoleBindingClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_global_role_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_global_role_controller.go index f485d4e6..cf36addc 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_global_role_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_global_role_controller.go @@ -73,8 +73,6 @@ type GlobalRoleController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler GlobalRoleHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type GlobalRoleInterface interface { @@ -125,7 +123,7 @@ func (l *globalRoleLister) Get(namespace, name string) (*GlobalRole, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: GlobalRoleGroupVersionKind.Group, - Resource: "globalRole", + Resource: GlobalRoleGroupVersionResource.Resource, }, key) } return obj.(*GlobalRole), nil @@ -209,25 +207,12 @@ func (c globalRoleFactory) List() runtime.Object { } func (s *globalRoleClient) Controller() GlobalRoleController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.globalRoleControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(GlobalRoleGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(GlobalRoleGroupVersionResource, GlobalRoleGroupVersionKind.Kind, false)) - c = &globalRoleController{ + return &globalRoleController{ GenericController: genericController, } - - s.client.globalRoleControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type globalRoleClient struct { @@ -261,6 +246,11 @@ func (s *globalRoleClient) Update(o *GlobalRole) (*GlobalRole, error) { return obj.(*GlobalRole), err } +func (s *globalRoleClient) UpdateStatus(o *GlobalRole) (*GlobalRole, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*GlobalRole), err +} + func (s *globalRoleClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_group_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_group_controller.go index f21c0a71..8863e9af 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_group_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_group_controller.go @@ -73,8 +73,6 @@ type GroupController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler GroupHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type GroupInterface interface { @@ -125,7 +123,7 @@ func (l *groupLister) Get(namespace, name string) (*Group, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: GroupGroupVersionKind.Group, - Resource: "group", + Resource: GroupGroupVersionResource.Resource, }, key) } return obj.(*Group), nil @@ -209,25 +207,12 @@ func (c groupFactory) List() runtime.Object { } func (s *groupClient) Controller() GroupController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.groupControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(GroupGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(GroupGroupVersionResource, GroupGroupVersionKind.Kind, false)) - c = &groupController{ + return &groupController{ GenericController: genericController, } - - s.client.groupControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type groupClient struct { @@ -261,6 +246,11 @@ func (s *groupClient) Update(o *Group) (*Group, error) { return obj.(*Group), err } +func (s *groupClient) UpdateStatus(o *Group) (*Group, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Group), err +} + func (s *groupClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_group_member_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_group_member_controller.go index 10f2567b..82407970 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_group_member_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_group_member_controller.go @@ -73,8 +73,6 @@ type GroupMemberController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler GroupMemberHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type GroupMemberInterface interface { @@ -125,7 +123,7 @@ func (l *groupMemberLister) Get(namespace, name string) (*GroupMember, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: GroupMemberGroupVersionKind.Group, - Resource: "groupMember", + Resource: GroupMemberGroupVersionResource.Resource, }, key) } return obj.(*GroupMember), nil @@ -209,25 +207,12 @@ func (c groupMemberFactory) List() runtime.Object { } func (s *groupMemberClient) Controller() GroupMemberController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.groupMemberControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(GroupMemberGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(GroupMemberGroupVersionResource, GroupMemberGroupVersionKind.Kind, false)) - c = &groupMemberController{ + return &groupMemberController{ GenericController: genericController, } - - s.client.groupMemberControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type groupMemberClient struct { @@ -261,6 +246,11 @@ func (s *groupMemberClient) Update(o *GroupMember) (*GroupMember, error) { return obj.(*GroupMember), err } +func (s *groupMemberClient) UpdateStatus(o *GroupMember) (*GroupMember, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*GroupMember), err +} + func (s *groupMemberClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_k8s_client.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_k8s_client.go index 12a6a134..80784acf 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_k8s_client.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_k8s_client.go @@ -1,25 +1,14 @@ package v3 import ( - "context" - "sync" - - "github.com/rancher/norman/controller" + "github.com/rancher/lasso/pkg/client" + "github.com/rancher/lasso/pkg/controller" "github.com/rancher/norman/objectclient" - "github.com/rancher/norman/objectclient/dynamic" - "github.com/rancher/norman/restwatch" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/rest" ) -type ( - contextKeyType struct{} - contextClientsKeyType struct{} -) - type Interface interface { - RESTClient() rest.Interface - controller.Starter - NodePoolsGetter NodesGetter NodeDriversGetter @@ -67,7 +56,7 @@ type Interface interface { ClusterCatalogsGetter MultiClusterAppsGetter MultiClusterAppRevisionsGetter - GlobalDNSsGetter + GlobalDnsesGetter GlobalDNSProvidersGetter KontainerDriversGetter EtcdBackupsGetter @@ -78,180 +67,44 @@ type Interface interface { CloudCredentialsGetter ClusterTemplatesGetter ClusterTemplateRevisionsGetter - RKEK8sSystemImagesGetter - RKEK8sServiceOptionsGetter - RKEAddonsGetter + RkeK8sSystemImagesGetter + RkeK8sServiceOptionsGetter + RkeAddonsGetter CisConfigsGetter CisBenchmarkVersionsGetter } type Client struct { - sync.Mutex - restClient rest.Interface - starters []controller.Starter - - nodePoolControllers map[string]NodePoolController - nodeControllers map[string]NodeController - nodeDriverControllers map[string]NodeDriverController - nodeTemplateControllers map[string]NodeTemplateController - projectControllers map[string]ProjectController - globalRoleControllers map[string]GlobalRoleController - globalRoleBindingControllers map[string]GlobalRoleBindingController - roleTemplateControllers map[string]RoleTemplateController - podSecurityPolicyTemplateControllers map[string]PodSecurityPolicyTemplateController - podSecurityPolicyTemplateProjectBindingControllers map[string]PodSecurityPolicyTemplateProjectBindingController - clusterRoleTemplateBindingControllers map[string]ClusterRoleTemplateBindingController - projectRoleTemplateBindingControllers map[string]ProjectRoleTemplateBindingController - clusterControllers map[string]ClusterController - clusterRegistrationTokenControllers map[string]ClusterRegistrationTokenController - catalogControllers map[string]CatalogController - templateControllers map[string]TemplateController - catalogTemplateControllers map[string]CatalogTemplateController - catalogTemplateVersionControllers map[string]CatalogTemplateVersionController - templateVersionControllers map[string]TemplateVersionController - templateContentControllers map[string]TemplateContentController - groupControllers map[string]GroupController - groupMemberControllers map[string]GroupMemberController - principalControllers map[string]PrincipalController - userControllers map[string]UserController - authConfigControllers map[string]AuthConfigController - ldapConfigControllers map[string]LdapConfigController - tokenControllers map[string]TokenController - dynamicSchemaControllers map[string]DynamicSchemaController - preferenceControllers map[string]PreferenceController - userAttributeControllers map[string]UserAttributeController - projectNetworkPolicyControllers map[string]ProjectNetworkPolicyController - clusterLoggingControllers map[string]ClusterLoggingController - projectLoggingControllers map[string]ProjectLoggingController - settingControllers map[string]SettingController - featureControllers map[string]FeatureController - clusterAlertControllers map[string]ClusterAlertController - projectAlertControllers map[string]ProjectAlertController - notifierControllers map[string]NotifierController - clusterAlertGroupControllers map[string]ClusterAlertGroupController - projectAlertGroupControllers map[string]ProjectAlertGroupController - clusterAlertRuleControllers map[string]ClusterAlertRuleController - projectAlertRuleControllers map[string]ProjectAlertRuleController - composeConfigControllers map[string]ComposeConfigController - projectCatalogControllers map[string]ProjectCatalogController - clusterCatalogControllers map[string]ClusterCatalogController - multiClusterAppControllers map[string]MultiClusterAppController - multiClusterAppRevisionControllers map[string]MultiClusterAppRevisionController - globalDnsControllers map[string]GlobalDNSController - globalDnsProviderControllers map[string]GlobalDNSProviderController - kontainerDriverControllers map[string]KontainerDriverController - etcdBackupControllers map[string]EtcdBackupController - clusterScanControllers map[string]ClusterScanController - monitorMetricControllers map[string]MonitorMetricController - clusterMonitorGraphControllers map[string]ClusterMonitorGraphController - projectMonitorGraphControllers map[string]ProjectMonitorGraphController - cloudCredentialControllers map[string]CloudCredentialController - clusterTemplateControllers map[string]ClusterTemplateController - clusterTemplateRevisionControllers map[string]ClusterTemplateRevisionController - rkeK8sSystemImageControllers map[string]RKEK8sSystemImageController - rkeK8sServiceOptionControllers map[string]RKEK8sServiceOptionController - rkeAddonControllers map[string]RKEAddonController - cisConfigControllers map[string]CisConfigController - cisBenchmarkVersionControllers map[string]CisBenchmarkVersionController + controllerFactory controller.SharedControllerFactory + clientFactory client.SharedClientFactory } -func NewForConfig(config rest.Config) (Interface, error) { - if config.NegotiatedSerializer == nil { - config.NegotiatedSerializer = dynamic.NegotiatedSerializer +func NewForConfig(cfg rest.Config) (Interface, error) { + scheme := runtime.NewScheme() + if err := AddToScheme(scheme); err != nil { + return nil, err } - - restClient, err := restwatch.UnversionedRESTClientFor(&config) + controllerFactory, err := controller.NewSharedControllerFactoryFromConfig(&cfg, scheme) if err != nil { return nil, err } + return NewFromControllerFactory(controllerFactory) +} +func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error) { return &Client{ - restClient: restClient, - - nodePoolControllers: map[string]NodePoolController{}, - nodeControllers: map[string]NodeController{}, - nodeDriverControllers: map[string]NodeDriverController{}, - nodeTemplateControllers: map[string]NodeTemplateController{}, - projectControllers: map[string]ProjectController{}, - globalRoleControllers: map[string]GlobalRoleController{}, - globalRoleBindingControllers: map[string]GlobalRoleBindingController{}, - roleTemplateControllers: map[string]RoleTemplateController{}, - podSecurityPolicyTemplateControllers: map[string]PodSecurityPolicyTemplateController{}, - podSecurityPolicyTemplateProjectBindingControllers: map[string]PodSecurityPolicyTemplateProjectBindingController{}, - clusterRoleTemplateBindingControllers: map[string]ClusterRoleTemplateBindingController{}, - projectRoleTemplateBindingControllers: map[string]ProjectRoleTemplateBindingController{}, - clusterControllers: map[string]ClusterController{}, - clusterRegistrationTokenControllers: map[string]ClusterRegistrationTokenController{}, - catalogControllers: map[string]CatalogController{}, - templateControllers: map[string]TemplateController{}, - catalogTemplateControllers: map[string]CatalogTemplateController{}, - catalogTemplateVersionControllers: map[string]CatalogTemplateVersionController{}, - templateVersionControllers: map[string]TemplateVersionController{}, - templateContentControllers: map[string]TemplateContentController{}, - groupControllers: map[string]GroupController{}, - groupMemberControllers: map[string]GroupMemberController{}, - principalControllers: map[string]PrincipalController{}, - userControllers: map[string]UserController{}, - authConfigControllers: map[string]AuthConfigController{}, - ldapConfigControllers: map[string]LdapConfigController{}, - tokenControllers: map[string]TokenController{}, - dynamicSchemaControllers: map[string]DynamicSchemaController{}, - preferenceControllers: map[string]PreferenceController{}, - userAttributeControllers: map[string]UserAttributeController{}, - projectNetworkPolicyControllers: map[string]ProjectNetworkPolicyController{}, - clusterLoggingControllers: map[string]ClusterLoggingController{}, - projectLoggingControllers: map[string]ProjectLoggingController{}, - settingControllers: map[string]SettingController{}, - featureControllers: map[string]FeatureController{}, - clusterAlertControllers: map[string]ClusterAlertController{}, - projectAlertControllers: map[string]ProjectAlertController{}, - notifierControllers: map[string]NotifierController{}, - clusterAlertGroupControllers: map[string]ClusterAlertGroupController{}, - projectAlertGroupControllers: map[string]ProjectAlertGroupController{}, - clusterAlertRuleControllers: map[string]ClusterAlertRuleController{}, - projectAlertRuleControllers: map[string]ProjectAlertRuleController{}, - composeConfigControllers: map[string]ComposeConfigController{}, - projectCatalogControllers: map[string]ProjectCatalogController{}, - clusterCatalogControllers: map[string]ClusterCatalogController{}, - multiClusterAppControllers: map[string]MultiClusterAppController{}, - multiClusterAppRevisionControllers: map[string]MultiClusterAppRevisionController{}, - globalDnsControllers: map[string]GlobalDNSController{}, - globalDnsProviderControllers: map[string]GlobalDNSProviderController{}, - kontainerDriverControllers: map[string]KontainerDriverController{}, - etcdBackupControllers: map[string]EtcdBackupController{}, - clusterScanControllers: map[string]ClusterScanController{}, - monitorMetricControllers: map[string]MonitorMetricController{}, - clusterMonitorGraphControllers: map[string]ClusterMonitorGraphController{}, - projectMonitorGraphControllers: map[string]ProjectMonitorGraphController{}, - cloudCredentialControllers: map[string]CloudCredentialController{}, - clusterTemplateControllers: map[string]ClusterTemplateController{}, - clusterTemplateRevisionControllers: map[string]ClusterTemplateRevisionController{}, - rkeK8sSystemImageControllers: map[string]RKEK8sSystemImageController{}, - rkeK8sServiceOptionControllers: map[string]RKEK8sServiceOptionController{}, - rkeAddonControllers: map[string]RKEAddonController{}, - cisConfigControllers: map[string]CisConfigController{}, - cisBenchmarkVersionControllers: map[string]CisBenchmarkVersionController{}, + controllerFactory: factory, + clientFactory: factory.SharedCacheFactory().SharedClientFactory(), }, nil } -func (c *Client) RESTClient() rest.Interface { - return c.restClient -} - -func (c *Client) Sync(ctx context.Context) error { - return controller.Sync(ctx, c.starters...) -} - -func (c *Client) Start(ctx context.Context, threadiness int) error { - return controller.Start(ctx, threadiness, c.starters...) -} - type NodePoolsGetter interface { NodePools(namespace string) NodePoolInterface } func (c *Client) NodePools(namespace string) NodePoolInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &NodePoolResource, NodePoolGroupVersionKind, nodePoolFactory{}) + sharedClient := c.clientFactory.ForResourceKind(NodePoolGroupVersionResource, NodePoolGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &NodePoolResource, NodePoolGroupVersionKind, nodePoolFactory{}) return &nodePoolClient{ ns: namespace, client: c, @@ -264,7 +117,8 @@ type NodesGetter interface { } func (c *Client) Nodes(namespace string) NodeInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &NodeResource, NodeGroupVersionKind, nodeFactory{}) + sharedClient := c.clientFactory.ForResourceKind(NodeGroupVersionResource, NodeGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &NodeResource, NodeGroupVersionKind, nodeFactory{}) return &nodeClient{ ns: namespace, client: c, @@ -277,7 +131,8 @@ type NodeDriversGetter interface { } func (c *Client) NodeDrivers(namespace string) NodeDriverInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &NodeDriverResource, NodeDriverGroupVersionKind, nodeDriverFactory{}) + sharedClient := c.clientFactory.ForResourceKind(NodeDriverGroupVersionResource, NodeDriverGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &NodeDriverResource, NodeDriverGroupVersionKind, nodeDriverFactory{}) return &nodeDriverClient{ ns: namespace, client: c, @@ -290,7 +145,8 @@ type NodeTemplatesGetter interface { } func (c *Client) NodeTemplates(namespace string) NodeTemplateInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &NodeTemplateResource, NodeTemplateGroupVersionKind, nodeTemplateFactory{}) + sharedClient := c.clientFactory.ForResourceKind(NodeTemplateGroupVersionResource, NodeTemplateGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &NodeTemplateResource, NodeTemplateGroupVersionKind, nodeTemplateFactory{}) return &nodeTemplateClient{ ns: namespace, client: c, @@ -303,7 +159,8 @@ type ProjectsGetter interface { } func (c *Client) Projects(namespace string) ProjectInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ProjectResource, ProjectGroupVersionKind, projectFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ProjectGroupVersionResource, ProjectGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ProjectResource, ProjectGroupVersionKind, projectFactory{}) return &projectClient{ ns: namespace, client: c, @@ -316,7 +173,8 @@ type GlobalRolesGetter interface { } func (c *Client) GlobalRoles(namespace string) GlobalRoleInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &GlobalRoleResource, GlobalRoleGroupVersionKind, globalRoleFactory{}) + sharedClient := c.clientFactory.ForResourceKind(GlobalRoleGroupVersionResource, GlobalRoleGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &GlobalRoleResource, GlobalRoleGroupVersionKind, globalRoleFactory{}) return &globalRoleClient{ ns: namespace, client: c, @@ -329,7 +187,8 @@ type GlobalRoleBindingsGetter interface { } func (c *Client) GlobalRoleBindings(namespace string) GlobalRoleBindingInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &GlobalRoleBindingResource, GlobalRoleBindingGroupVersionKind, globalRoleBindingFactory{}) + sharedClient := c.clientFactory.ForResourceKind(GlobalRoleBindingGroupVersionResource, GlobalRoleBindingGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &GlobalRoleBindingResource, GlobalRoleBindingGroupVersionKind, globalRoleBindingFactory{}) return &globalRoleBindingClient{ ns: namespace, client: c, @@ -342,7 +201,8 @@ type RoleTemplatesGetter interface { } func (c *Client) RoleTemplates(namespace string) RoleTemplateInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &RoleTemplateResource, RoleTemplateGroupVersionKind, roleTemplateFactory{}) + sharedClient := c.clientFactory.ForResourceKind(RoleTemplateGroupVersionResource, RoleTemplateGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &RoleTemplateResource, RoleTemplateGroupVersionKind, roleTemplateFactory{}) return &roleTemplateClient{ ns: namespace, client: c, @@ -355,7 +215,8 @@ type PodSecurityPolicyTemplatesGetter interface { } func (c *Client) PodSecurityPolicyTemplates(namespace string) PodSecurityPolicyTemplateInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &PodSecurityPolicyTemplateResource, PodSecurityPolicyTemplateGroupVersionKind, podSecurityPolicyTemplateFactory{}) + sharedClient := c.clientFactory.ForResourceKind(PodSecurityPolicyTemplateGroupVersionResource, PodSecurityPolicyTemplateGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &PodSecurityPolicyTemplateResource, PodSecurityPolicyTemplateGroupVersionKind, podSecurityPolicyTemplateFactory{}) return &podSecurityPolicyTemplateClient{ ns: namespace, client: c, @@ -368,7 +229,8 @@ type PodSecurityPolicyTemplateProjectBindingsGetter interface { } func (c *Client) PodSecurityPolicyTemplateProjectBindings(namespace string) PodSecurityPolicyTemplateProjectBindingInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &PodSecurityPolicyTemplateProjectBindingResource, PodSecurityPolicyTemplateProjectBindingGroupVersionKind, podSecurityPolicyTemplateProjectBindingFactory{}) + sharedClient := c.clientFactory.ForResourceKind(PodSecurityPolicyTemplateProjectBindingGroupVersionResource, PodSecurityPolicyTemplateProjectBindingGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &PodSecurityPolicyTemplateProjectBindingResource, PodSecurityPolicyTemplateProjectBindingGroupVersionKind, podSecurityPolicyTemplateProjectBindingFactory{}) return &podSecurityPolicyTemplateProjectBindingClient{ ns: namespace, client: c, @@ -381,7 +243,8 @@ type ClusterRoleTemplateBindingsGetter interface { } func (c *Client) ClusterRoleTemplateBindings(namespace string) ClusterRoleTemplateBindingInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterRoleTemplateBindingResource, ClusterRoleTemplateBindingGroupVersionKind, clusterRoleTemplateBindingFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ClusterRoleTemplateBindingGroupVersionResource, ClusterRoleTemplateBindingGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterRoleTemplateBindingResource, ClusterRoleTemplateBindingGroupVersionKind, clusterRoleTemplateBindingFactory{}) return &clusterRoleTemplateBindingClient{ ns: namespace, client: c, @@ -394,7 +257,8 @@ type ProjectRoleTemplateBindingsGetter interface { } func (c *Client) ProjectRoleTemplateBindings(namespace string) ProjectRoleTemplateBindingInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ProjectRoleTemplateBindingResource, ProjectRoleTemplateBindingGroupVersionKind, projectRoleTemplateBindingFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ProjectRoleTemplateBindingGroupVersionResource, ProjectRoleTemplateBindingGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ProjectRoleTemplateBindingResource, ProjectRoleTemplateBindingGroupVersionKind, projectRoleTemplateBindingFactory{}) return &projectRoleTemplateBindingClient{ ns: namespace, client: c, @@ -407,7 +271,8 @@ type ClustersGetter interface { } func (c *Client) Clusters(namespace string) ClusterInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterResource, ClusterGroupVersionKind, clusterFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ClusterGroupVersionResource, ClusterGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterResource, ClusterGroupVersionKind, clusterFactory{}) return &clusterClient{ ns: namespace, client: c, @@ -420,7 +285,8 @@ type ClusterRegistrationTokensGetter interface { } func (c *Client) ClusterRegistrationTokens(namespace string) ClusterRegistrationTokenInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterRegistrationTokenResource, ClusterRegistrationTokenGroupVersionKind, clusterRegistrationTokenFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ClusterRegistrationTokenGroupVersionResource, ClusterRegistrationTokenGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterRegistrationTokenResource, ClusterRegistrationTokenGroupVersionKind, clusterRegistrationTokenFactory{}) return &clusterRegistrationTokenClient{ ns: namespace, client: c, @@ -433,7 +299,8 @@ type CatalogsGetter interface { } func (c *Client) Catalogs(namespace string) CatalogInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &CatalogResource, CatalogGroupVersionKind, catalogFactory{}) + sharedClient := c.clientFactory.ForResourceKind(CatalogGroupVersionResource, CatalogGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &CatalogResource, CatalogGroupVersionKind, catalogFactory{}) return &catalogClient{ ns: namespace, client: c, @@ -446,7 +313,8 @@ type TemplatesGetter interface { } func (c *Client) Templates(namespace string) TemplateInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &TemplateResource, TemplateGroupVersionKind, templateFactory{}) + sharedClient := c.clientFactory.ForResourceKind(TemplateGroupVersionResource, TemplateGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &TemplateResource, TemplateGroupVersionKind, templateFactory{}) return &templateClient{ ns: namespace, client: c, @@ -459,7 +327,8 @@ type CatalogTemplatesGetter interface { } func (c *Client) CatalogTemplates(namespace string) CatalogTemplateInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &CatalogTemplateResource, CatalogTemplateGroupVersionKind, catalogTemplateFactory{}) + sharedClient := c.clientFactory.ForResourceKind(CatalogTemplateGroupVersionResource, CatalogTemplateGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &CatalogTemplateResource, CatalogTemplateGroupVersionKind, catalogTemplateFactory{}) return &catalogTemplateClient{ ns: namespace, client: c, @@ -472,7 +341,8 @@ type CatalogTemplateVersionsGetter interface { } func (c *Client) CatalogTemplateVersions(namespace string) CatalogTemplateVersionInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &CatalogTemplateVersionResource, CatalogTemplateVersionGroupVersionKind, catalogTemplateVersionFactory{}) + sharedClient := c.clientFactory.ForResourceKind(CatalogTemplateVersionGroupVersionResource, CatalogTemplateVersionGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &CatalogTemplateVersionResource, CatalogTemplateVersionGroupVersionKind, catalogTemplateVersionFactory{}) return &catalogTemplateVersionClient{ ns: namespace, client: c, @@ -485,7 +355,8 @@ type TemplateVersionsGetter interface { } func (c *Client) TemplateVersions(namespace string) TemplateVersionInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &TemplateVersionResource, TemplateVersionGroupVersionKind, templateVersionFactory{}) + sharedClient := c.clientFactory.ForResourceKind(TemplateVersionGroupVersionResource, TemplateVersionGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &TemplateVersionResource, TemplateVersionGroupVersionKind, templateVersionFactory{}) return &templateVersionClient{ ns: namespace, client: c, @@ -498,7 +369,8 @@ type TemplateContentsGetter interface { } func (c *Client) TemplateContents(namespace string) TemplateContentInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &TemplateContentResource, TemplateContentGroupVersionKind, templateContentFactory{}) + sharedClient := c.clientFactory.ForResourceKind(TemplateContentGroupVersionResource, TemplateContentGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &TemplateContentResource, TemplateContentGroupVersionKind, templateContentFactory{}) return &templateContentClient{ ns: namespace, client: c, @@ -511,7 +383,8 @@ type GroupsGetter interface { } func (c *Client) Groups(namespace string) GroupInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &GroupResource, GroupGroupVersionKind, groupFactory{}) + sharedClient := c.clientFactory.ForResourceKind(GroupGroupVersionResource, GroupGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &GroupResource, GroupGroupVersionKind, groupFactory{}) return &groupClient{ ns: namespace, client: c, @@ -524,7 +397,8 @@ type GroupMembersGetter interface { } func (c *Client) GroupMembers(namespace string) GroupMemberInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &GroupMemberResource, GroupMemberGroupVersionKind, groupMemberFactory{}) + sharedClient := c.clientFactory.ForResourceKind(GroupMemberGroupVersionResource, GroupMemberGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &GroupMemberResource, GroupMemberGroupVersionKind, groupMemberFactory{}) return &groupMemberClient{ ns: namespace, client: c, @@ -537,7 +411,8 @@ type PrincipalsGetter interface { } func (c *Client) Principals(namespace string) PrincipalInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &PrincipalResource, PrincipalGroupVersionKind, principalFactory{}) + sharedClient := c.clientFactory.ForResourceKind(PrincipalGroupVersionResource, PrincipalGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &PrincipalResource, PrincipalGroupVersionKind, principalFactory{}) return &principalClient{ ns: namespace, client: c, @@ -550,7 +425,8 @@ type UsersGetter interface { } func (c *Client) Users(namespace string) UserInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &UserResource, UserGroupVersionKind, userFactory{}) + sharedClient := c.clientFactory.ForResourceKind(UserGroupVersionResource, UserGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &UserResource, UserGroupVersionKind, userFactory{}) return &userClient{ ns: namespace, client: c, @@ -563,7 +439,8 @@ type AuthConfigsGetter interface { } func (c *Client) AuthConfigs(namespace string) AuthConfigInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &AuthConfigResource, AuthConfigGroupVersionKind, authConfigFactory{}) + sharedClient := c.clientFactory.ForResourceKind(AuthConfigGroupVersionResource, AuthConfigGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &AuthConfigResource, AuthConfigGroupVersionKind, authConfigFactory{}) return &authConfigClient{ ns: namespace, client: c, @@ -576,7 +453,8 @@ type LdapConfigsGetter interface { } func (c *Client) LdapConfigs(namespace string) LdapConfigInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &LdapConfigResource, LdapConfigGroupVersionKind, ldapConfigFactory{}) + sharedClient := c.clientFactory.ForResourceKind(LdapConfigGroupVersionResource, LdapConfigGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &LdapConfigResource, LdapConfigGroupVersionKind, ldapConfigFactory{}) return &ldapConfigClient{ ns: namespace, client: c, @@ -589,7 +467,8 @@ type TokensGetter interface { } func (c *Client) Tokens(namespace string) TokenInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &TokenResource, TokenGroupVersionKind, tokenFactory{}) + sharedClient := c.clientFactory.ForResourceKind(TokenGroupVersionResource, TokenGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &TokenResource, TokenGroupVersionKind, tokenFactory{}) return &tokenClient{ ns: namespace, client: c, @@ -602,7 +481,8 @@ type DynamicSchemasGetter interface { } func (c *Client) DynamicSchemas(namespace string) DynamicSchemaInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &DynamicSchemaResource, DynamicSchemaGroupVersionKind, dynamicSchemaFactory{}) + sharedClient := c.clientFactory.ForResourceKind(DynamicSchemaGroupVersionResource, DynamicSchemaGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &DynamicSchemaResource, DynamicSchemaGroupVersionKind, dynamicSchemaFactory{}) return &dynamicSchemaClient{ ns: namespace, client: c, @@ -615,7 +495,8 @@ type PreferencesGetter interface { } func (c *Client) Preferences(namespace string) PreferenceInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &PreferenceResource, PreferenceGroupVersionKind, preferenceFactory{}) + sharedClient := c.clientFactory.ForResourceKind(PreferenceGroupVersionResource, PreferenceGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &PreferenceResource, PreferenceGroupVersionKind, preferenceFactory{}) return &preferenceClient{ ns: namespace, client: c, @@ -628,7 +509,8 @@ type UserAttributesGetter interface { } func (c *Client) UserAttributes(namespace string) UserAttributeInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &UserAttributeResource, UserAttributeGroupVersionKind, userAttributeFactory{}) + sharedClient := c.clientFactory.ForResourceKind(UserAttributeGroupVersionResource, UserAttributeGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &UserAttributeResource, UserAttributeGroupVersionKind, userAttributeFactory{}) return &userAttributeClient{ ns: namespace, client: c, @@ -641,7 +523,8 @@ type ProjectNetworkPoliciesGetter interface { } func (c *Client) ProjectNetworkPolicies(namespace string) ProjectNetworkPolicyInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ProjectNetworkPolicyResource, ProjectNetworkPolicyGroupVersionKind, projectNetworkPolicyFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ProjectNetworkPolicyGroupVersionResource, ProjectNetworkPolicyGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ProjectNetworkPolicyResource, ProjectNetworkPolicyGroupVersionKind, projectNetworkPolicyFactory{}) return &projectNetworkPolicyClient{ ns: namespace, client: c, @@ -654,7 +537,8 @@ type ClusterLoggingsGetter interface { } func (c *Client) ClusterLoggings(namespace string) ClusterLoggingInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterLoggingResource, ClusterLoggingGroupVersionKind, clusterLoggingFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ClusterLoggingGroupVersionResource, ClusterLoggingGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterLoggingResource, ClusterLoggingGroupVersionKind, clusterLoggingFactory{}) return &clusterLoggingClient{ ns: namespace, client: c, @@ -667,7 +551,8 @@ type ProjectLoggingsGetter interface { } func (c *Client) ProjectLoggings(namespace string) ProjectLoggingInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ProjectLoggingResource, ProjectLoggingGroupVersionKind, projectLoggingFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ProjectLoggingGroupVersionResource, ProjectLoggingGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ProjectLoggingResource, ProjectLoggingGroupVersionKind, projectLoggingFactory{}) return &projectLoggingClient{ ns: namespace, client: c, @@ -680,7 +565,8 @@ type SettingsGetter interface { } func (c *Client) Settings(namespace string) SettingInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &SettingResource, SettingGroupVersionKind, settingFactory{}) + sharedClient := c.clientFactory.ForResourceKind(SettingGroupVersionResource, SettingGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &SettingResource, SettingGroupVersionKind, settingFactory{}) return &settingClient{ ns: namespace, client: c, @@ -693,7 +579,8 @@ type FeaturesGetter interface { } func (c *Client) Features(namespace string) FeatureInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &FeatureResource, FeatureGroupVersionKind, featureFactory{}) + sharedClient := c.clientFactory.ForResourceKind(FeatureGroupVersionResource, FeatureGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &FeatureResource, FeatureGroupVersionKind, featureFactory{}) return &featureClient{ ns: namespace, client: c, @@ -706,7 +593,8 @@ type ClusterAlertsGetter interface { } func (c *Client) ClusterAlerts(namespace string) ClusterAlertInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterAlertResource, ClusterAlertGroupVersionKind, clusterAlertFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ClusterAlertGroupVersionResource, ClusterAlertGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterAlertResource, ClusterAlertGroupVersionKind, clusterAlertFactory{}) return &clusterAlertClient{ ns: namespace, client: c, @@ -719,7 +607,8 @@ type ProjectAlertsGetter interface { } func (c *Client) ProjectAlerts(namespace string) ProjectAlertInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ProjectAlertResource, ProjectAlertGroupVersionKind, projectAlertFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ProjectAlertGroupVersionResource, ProjectAlertGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ProjectAlertResource, ProjectAlertGroupVersionKind, projectAlertFactory{}) return &projectAlertClient{ ns: namespace, client: c, @@ -732,7 +621,8 @@ type NotifiersGetter interface { } func (c *Client) Notifiers(namespace string) NotifierInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &NotifierResource, NotifierGroupVersionKind, notifierFactory{}) + sharedClient := c.clientFactory.ForResourceKind(NotifierGroupVersionResource, NotifierGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &NotifierResource, NotifierGroupVersionKind, notifierFactory{}) return ¬ifierClient{ ns: namespace, client: c, @@ -745,7 +635,8 @@ type ClusterAlertGroupsGetter interface { } func (c *Client) ClusterAlertGroups(namespace string) ClusterAlertGroupInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterAlertGroupResource, ClusterAlertGroupGroupVersionKind, clusterAlertGroupFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ClusterAlertGroupGroupVersionResource, ClusterAlertGroupGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterAlertGroupResource, ClusterAlertGroupGroupVersionKind, clusterAlertGroupFactory{}) return &clusterAlertGroupClient{ ns: namespace, client: c, @@ -758,7 +649,8 @@ type ProjectAlertGroupsGetter interface { } func (c *Client) ProjectAlertGroups(namespace string) ProjectAlertGroupInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ProjectAlertGroupResource, ProjectAlertGroupGroupVersionKind, projectAlertGroupFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ProjectAlertGroupGroupVersionResource, ProjectAlertGroupGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ProjectAlertGroupResource, ProjectAlertGroupGroupVersionKind, projectAlertGroupFactory{}) return &projectAlertGroupClient{ ns: namespace, client: c, @@ -771,7 +663,8 @@ type ClusterAlertRulesGetter interface { } func (c *Client) ClusterAlertRules(namespace string) ClusterAlertRuleInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterAlertRuleResource, ClusterAlertRuleGroupVersionKind, clusterAlertRuleFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ClusterAlertRuleGroupVersionResource, ClusterAlertRuleGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterAlertRuleResource, ClusterAlertRuleGroupVersionKind, clusterAlertRuleFactory{}) return &clusterAlertRuleClient{ ns: namespace, client: c, @@ -784,7 +677,8 @@ type ProjectAlertRulesGetter interface { } func (c *Client) ProjectAlertRules(namespace string) ProjectAlertRuleInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ProjectAlertRuleResource, ProjectAlertRuleGroupVersionKind, projectAlertRuleFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ProjectAlertRuleGroupVersionResource, ProjectAlertRuleGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ProjectAlertRuleResource, ProjectAlertRuleGroupVersionKind, projectAlertRuleFactory{}) return &projectAlertRuleClient{ ns: namespace, client: c, @@ -797,7 +691,8 @@ type ComposeConfigsGetter interface { } func (c *Client) ComposeConfigs(namespace string) ComposeConfigInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ComposeConfigResource, ComposeConfigGroupVersionKind, composeConfigFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ComposeConfigGroupVersionResource, ComposeConfigGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ComposeConfigResource, ComposeConfigGroupVersionKind, composeConfigFactory{}) return &composeConfigClient{ ns: namespace, client: c, @@ -810,7 +705,8 @@ type ProjectCatalogsGetter interface { } func (c *Client) ProjectCatalogs(namespace string) ProjectCatalogInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ProjectCatalogResource, ProjectCatalogGroupVersionKind, projectCatalogFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ProjectCatalogGroupVersionResource, ProjectCatalogGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ProjectCatalogResource, ProjectCatalogGroupVersionKind, projectCatalogFactory{}) return &projectCatalogClient{ ns: namespace, client: c, @@ -823,7 +719,8 @@ type ClusterCatalogsGetter interface { } func (c *Client) ClusterCatalogs(namespace string) ClusterCatalogInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterCatalogResource, ClusterCatalogGroupVersionKind, clusterCatalogFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ClusterCatalogGroupVersionResource, ClusterCatalogGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterCatalogResource, ClusterCatalogGroupVersionKind, clusterCatalogFactory{}) return &clusterCatalogClient{ ns: namespace, client: c, @@ -836,7 +733,8 @@ type MultiClusterAppsGetter interface { } func (c *Client) MultiClusterApps(namespace string) MultiClusterAppInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &MultiClusterAppResource, MultiClusterAppGroupVersionKind, multiClusterAppFactory{}) + sharedClient := c.clientFactory.ForResourceKind(MultiClusterAppGroupVersionResource, MultiClusterAppGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &MultiClusterAppResource, MultiClusterAppGroupVersionKind, multiClusterAppFactory{}) return &multiClusterAppClient{ ns: namespace, client: c, @@ -849,7 +747,8 @@ type MultiClusterAppRevisionsGetter interface { } func (c *Client) MultiClusterAppRevisions(namespace string) MultiClusterAppRevisionInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &MultiClusterAppRevisionResource, MultiClusterAppRevisionGroupVersionKind, multiClusterAppRevisionFactory{}) + sharedClient := c.clientFactory.ForResourceKind(MultiClusterAppRevisionGroupVersionResource, MultiClusterAppRevisionGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &MultiClusterAppRevisionResource, MultiClusterAppRevisionGroupVersionKind, multiClusterAppRevisionFactory{}) return &multiClusterAppRevisionClient{ ns: namespace, client: c, @@ -857,12 +756,13 @@ func (c *Client) MultiClusterAppRevisions(namespace string) MultiClusterAppRevis } } -type GlobalDNSsGetter interface { - GlobalDNSs(namespace string) GlobalDNSInterface +type GlobalDnsesGetter interface { + GlobalDnses(namespace string) GlobalDnsInterface } -func (c *Client) GlobalDNSs(namespace string) GlobalDNSInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &GlobalDNSResource, GlobalDNSGroupVersionKind, globalDnsFactory{}) +func (c *Client) GlobalDnses(namespace string) GlobalDnsInterface { + sharedClient := c.clientFactory.ForResourceKind(GlobalDnsGroupVersionResource, GlobalDnsGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &GlobalDnsResource, GlobalDnsGroupVersionKind, globalDnsFactory{}) return &globalDnsClient{ ns: namespace, client: c, @@ -875,7 +775,8 @@ type GlobalDNSProvidersGetter interface { } func (c *Client) GlobalDNSProviders(namespace string) GlobalDNSProviderInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &GlobalDNSProviderResource, GlobalDNSProviderGroupVersionKind, globalDnsProviderFactory{}) + sharedClient := c.clientFactory.ForResourceKind(GlobalDNSProviderGroupVersionResource, GlobalDNSProviderGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &GlobalDNSProviderResource, GlobalDNSProviderGroupVersionKind, globalDnsProviderFactory{}) return &globalDnsProviderClient{ ns: namespace, client: c, @@ -888,7 +789,8 @@ type KontainerDriversGetter interface { } func (c *Client) KontainerDrivers(namespace string) KontainerDriverInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &KontainerDriverResource, KontainerDriverGroupVersionKind, kontainerDriverFactory{}) + sharedClient := c.clientFactory.ForResourceKind(KontainerDriverGroupVersionResource, KontainerDriverGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &KontainerDriverResource, KontainerDriverGroupVersionKind, kontainerDriverFactory{}) return &kontainerDriverClient{ ns: namespace, client: c, @@ -901,7 +803,8 @@ type EtcdBackupsGetter interface { } func (c *Client) EtcdBackups(namespace string) EtcdBackupInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &EtcdBackupResource, EtcdBackupGroupVersionKind, etcdBackupFactory{}) + sharedClient := c.clientFactory.ForResourceKind(EtcdBackupGroupVersionResource, EtcdBackupGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &EtcdBackupResource, EtcdBackupGroupVersionKind, etcdBackupFactory{}) return &etcdBackupClient{ ns: namespace, client: c, @@ -914,7 +817,8 @@ type ClusterScansGetter interface { } func (c *Client) ClusterScans(namespace string) ClusterScanInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterScanResource, ClusterScanGroupVersionKind, clusterScanFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ClusterScanGroupVersionResource, ClusterScanGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterScanResource, ClusterScanGroupVersionKind, clusterScanFactory{}) return &clusterScanClient{ ns: namespace, client: c, @@ -927,7 +831,8 @@ type MonitorMetricsGetter interface { } func (c *Client) MonitorMetrics(namespace string) MonitorMetricInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &MonitorMetricResource, MonitorMetricGroupVersionKind, monitorMetricFactory{}) + sharedClient := c.clientFactory.ForResourceKind(MonitorMetricGroupVersionResource, MonitorMetricGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &MonitorMetricResource, MonitorMetricGroupVersionKind, monitorMetricFactory{}) return &monitorMetricClient{ ns: namespace, client: c, @@ -940,7 +845,8 @@ type ClusterMonitorGraphsGetter interface { } func (c *Client) ClusterMonitorGraphs(namespace string) ClusterMonitorGraphInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterMonitorGraphResource, ClusterMonitorGraphGroupVersionKind, clusterMonitorGraphFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ClusterMonitorGraphGroupVersionResource, ClusterMonitorGraphGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterMonitorGraphResource, ClusterMonitorGraphGroupVersionKind, clusterMonitorGraphFactory{}) return &clusterMonitorGraphClient{ ns: namespace, client: c, @@ -953,7 +859,8 @@ type ProjectMonitorGraphsGetter interface { } func (c *Client) ProjectMonitorGraphs(namespace string) ProjectMonitorGraphInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ProjectMonitorGraphResource, ProjectMonitorGraphGroupVersionKind, projectMonitorGraphFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ProjectMonitorGraphGroupVersionResource, ProjectMonitorGraphGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ProjectMonitorGraphResource, ProjectMonitorGraphGroupVersionKind, projectMonitorGraphFactory{}) return &projectMonitorGraphClient{ ns: namespace, client: c, @@ -966,7 +873,8 @@ type CloudCredentialsGetter interface { } func (c *Client) CloudCredentials(namespace string) CloudCredentialInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &CloudCredentialResource, CloudCredentialGroupVersionKind, cloudCredentialFactory{}) + sharedClient := c.clientFactory.ForResourceKind(CloudCredentialGroupVersionResource, CloudCredentialGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &CloudCredentialResource, CloudCredentialGroupVersionKind, cloudCredentialFactory{}) return &cloudCredentialClient{ ns: namespace, client: c, @@ -979,7 +887,8 @@ type ClusterTemplatesGetter interface { } func (c *Client) ClusterTemplates(namespace string) ClusterTemplateInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterTemplateResource, ClusterTemplateGroupVersionKind, clusterTemplateFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ClusterTemplateGroupVersionResource, ClusterTemplateGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterTemplateResource, ClusterTemplateGroupVersionKind, clusterTemplateFactory{}) return &clusterTemplateClient{ ns: namespace, client: c, @@ -992,7 +901,8 @@ type ClusterTemplateRevisionsGetter interface { } func (c *Client) ClusterTemplateRevisions(namespace string) ClusterTemplateRevisionInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterTemplateRevisionResource, ClusterTemplateRevisionGroupVersionKind, clusterTemplateRevisionFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ClusterTemplateRevisionGroupVersionResource, ClusterTemplateRevisionGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterTemplateRevisionResource, ClusterTemplateRevisionGroupVersionKind, clusterTemplateRevisionFactory{}) return &clusterTemplateRevisionClient{ ns: namespace, client: c, @@ -1000,12 +910,13 @@ func (c *Client) ClusterTemplateRevisions(namespace string) ClusterTemplateRevis } } -type RKEK8sSystemImagesGetter interface { - RKEK8sSystemImages(namespace string) RKEK8sSystemImageInterface +type RkeK8sSystemImagesGetter interface { + RkeK8sSystemImages(namespace string) RkeK8sSystemImageInterface } -func (c *Client) RKEK8sSystemImages(namespace string) RKEK8sSystemImageInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &RKEK8sSystemImageResource, RKEK8sSystemImageGroupVersionKind, rkeK8sSystemImageFactory{}) +func (c *Client) RkeK8sSystemImages(namespace string) RkeK8sSystemImageInterface { + sharedClient := c.clientFactory.ForResourceKind(RkeK8sSystemImageGroupVersionResource, RkeK8sSystemImageGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &RkeK8sSystemImageResource, RkeK8sSystemImageGroupVersionKind, rkeK8sSystemImageFactory{}) return &rkeK8sSystemImageClient{ ns: namespace, client: c, @@ -1013,12 +924,13 @@ func (c *Client) RKEK8sSystemImages(namespace string) RKEK8sSystemImageInterface } } -type RKEK8sServiceOptionsGetter interface { - RKEK8sServiceOptions(namespace string) RKEK8sServiceOptionInterface +type RkeK8sServiceOptionsGetter interface { + RkeK8sServiceOptions(namespace string) RkeK8sServiceOptionInterface } -func (c *Client) RKEK8sServiceOptions(namespace string) RKEK8sServiceOptionInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &RKEK8sServiceOptionResource, RKEK8sServiceOptionGroupVersionKind, rkeK8sServiceOptionFactory{}) +func (c *Client) RkeK8sServiceOptions(namespace string) RkeK8sServiceOptionInterface { + sharedClient := c.clientFactory.ForResourceKind(RkeK8sServiceOptionGroupVersionResource, RkeK8sServiceOptionGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &RkeK8sServiceOptionResource, RkeK8sServiceOptionGroupVersionKind, rkeK8sServiceOptionFactory{}) return &rkeK8sServiceOptionClient{ ns: namespace, client: c, @@ -1026,12 +938,13 @@ func (c *Client) RKEK8sServiceOptions(namespace string) RKEK8sServiceOptionInter } } -type RKEAddonsGetter interface { - RKEAddons(namespace string) RKEAddonInterface +type RkeAddonsGetter interface { + RkeAddons(namespace string) RkeAddonInterface } -func (c *Client) RKEAddons(namespace string) RKEAddonInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &RKEAddonResource, RKEAddonGroupVersionKind, rkeAddonFactory{}) +func (c *Client) RkeAddons(namespace string) RkeAddonInterface { + sharedClient := c.clientFactory.ForResourceKind(RkeAddonGroupVersionResource, RkeAddonGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &RkeAddonResource, RkeAddonGroupVersionKind, rkeAddonFactory{}) return &rkeAddonClient{ ns: namespace, client: c, @@ -1044,7 +957,8 @@ type CisConfigsGetter interface { } func (c *Client) CisConfigs(namespace string) CisConfigInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &CisConfigResource, CisConfigGroupVersionKind, cisConfigFactory{}) + sharedClient := c.clientFactory.ForResourceKind(CisConfigGroupVersionResource, CisConfigGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &CisConfigResource, CisConfigGroupVersionKind, cisConfigFactory{}) return &cisConfigClient{ ns: namespace, client: c, @@ -1057,7 +971,8 @@ type CisBenchmarkVersionsGetter interface { } func (c *Client) CisBenchmarkVersions(namespace string) CisBenchmarkVersionInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &CisBenchmarkVersionResource, CisBenchmarkVersionGroupVersionKind, cisBenchmarkVersionFactory{}) + sharedClient := c.clientFactory.ForResourceKind(CisBenchmarkVersionGroupVersionResource, CisBenchmarkVersionGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &CisBenchmarkVersionResource, CisBenchmarkVersionGroupVersionKind, cisBenchmarkVersionFactory{}) return &cisBenchmarkVersionClient{ ns: namespace, client: c, diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_kontainer_driver_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_kontainer_driver_controller.go index dc310f3b..32fb60b7 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_kontainer_driver_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_kontainer_driver_controller.go @@ -73,8 +73,6 @@ type KontainerDriverController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler KontainerDriverHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type KontainerDriverInterface interface { @@ -125,7 +123,7 @@ func (l *kontainerDriverLister) Get(namespace, name string) (*KontainerDriver, e if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: KontainerDriverGroupVersionKind.Group, - Resource: "kontainerDriver", + Resource: KontainerDriverGroupVersionResource.Resource, }, key) } return obj.(*KontainerDriver), nil @@ -209,25 +207,12 @@ func (c kontainerDriverFactory) List() runtime.Object { } func (s *kontainerDriverClient) Controller() KontainerDriverController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.kontainerDriverControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(KontainerDriverGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(KontainerDriverGroupVersionResource, KontainerDriverGroupVersionKind.Kind, false)) - c = &kontainerDriverController{ + return &kontainerDriverController{ GenericController: genericController, } - - s.client.kontainerDriverControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type kontainerDriverClient struct { @@ -261,6 +246,11 @@ func (s *kontainerDriverClient) Update(o *KontainerDriver) (*KontainerDriver, er return obj.(*KontainerDriver), err } +func (s *kontainerDriverClient) UpdateStatus(o *KontainerDriver) (*KontainerDriver, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*KontainerDriver), err +} + func (s *kontainerDriverClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_ldap_config_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_ldap_config_controller.go index c24866ac..eb52683f 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_ldap_config_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_ldap_config_controller.go @@ -73,8 +73,6 @@ type LdapConfigController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler LdapConfigHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type LdapConfigInterface interface { @@ -125,7 +123,7 @@ func (l *ldapConfigLister) Get(namespace, name string) (*LdapConfig, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: LdapConfigGroupVersionKind.Group, - Resource: "ldapConfig", + Resource: LdapConfigGroupVersionResource.Resource, }, key) } return obj.(*LdapConfig), nil @@ -209,25 +207,12 @@ func (c ldapConfigFactory) List() runtime.Object { } func (s *ldapConfigClient) Controller() LdapConfigController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.ldapConfigControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(LdapConfigGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(LdapConfigGroupVersionResource, LdapConfigGroupVersionKind.Kind, false)) - c = &ldapConfigController{ + return &ldapConfigController{ GenericController: genericController, } - - s.client.ldapConfigControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type ldapConfigClient struct { @@ -261,6 +246,11 @@ func (s *ldapConfigClient) Update(o *LdapConfig) (*LdapConfig, error) { return obj.(*LdapConfig), err } +func (s *ldapConfigClient) UpdateStatus(o *LdapConfig) (*LdapConfig, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*LdapConfig), err +} + func (s *ldapConfigClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_monitor_metric_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_monitor_metric_controller.go index b8035bf6..c9b312bd 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_monitor_metric_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_monitor_metric_controller.go @@ -74,8 +74,6 @@ type MonitorMetricController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler MonitorMetricHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type MonitorMetricInterface interface { @@ -126,7 +124,7 @@ func (l *monitorMetricLister) Get(namespace, name string) (*MonitorMetric, error if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: MonitorMetricGroupVersionKind.Group, - Resource: "monitorMetric", + Resource: MonitorMetricGroupVersionResource.Resource, }, key) } return obj.(*MonitorMetric), nil @@ -210,25 +208,12 @@ func (c monitorMetricFactory) List() runtime.Object { } func (s *monitorMetricClient) Controller() MonitorMetricController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.monitorMetricControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(MonitorMetricGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(MonitorMetricGroupVersionResource, MonitorMetricGroupVersionKind.Kind, true)) - c = &monitorMetricController{ + return &monitorMetricController{ GenericController: genericController, } - - s.client.monitorMetricControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type monitorMetricClient struct { @@ -262,6 +247,11 @@ func (s *monitorMetricClient) Update(o *MonitorMetric) (*MonitorMetric, error) { return obj.(*MonitorMetric), err } +func (s *monitorMetricClient) UpdateStatus(o *MonitorMetric) (*MonitorMetric, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*MonitorMetric), err +} + func (s *monitorMetricClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_multi_cluster_app_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_multi_cluster_app_controller.go index 823806ae..544c9aec 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_multi_cluster_app_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_multi_cluster_app_controller.go @@ -74,8 +74,6 @@ type MultiClusterAppController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler MultiClusterAppHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type MultiClusterAppInterface interface { @@ -126,7 +124,7 @@ func (l *multiClusterAppLister) Get(namespace, name string) (*MultiClusterApp, e if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: MultiClusterAppGroupVersionKind.Group, - Resource: "multiClusterApp", + Resource: MultiClusterAppGroupVersionResource.Resource, }, key) } return obj.(*MultiClusterApp), nil @@ -210,25 +208,12 @@ func (c multiClusterAppFactory) List() runtime.Object { } func (s *multiClusterAppClient) Controller() MultiClusterAppController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.multiClusterAppControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(MultiClusterAppGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(MultiClusterAppGroupVersionResource, MultiClusterAppGroupVersionKind.Kind, true)) - c = &multiClusterAppController{ + return &multiClusterAppController{ GenericController: genericController, } - - s.client.multiClusterAppControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type multiClusterAppClient struct { @@ -262,6 +247,11 @@ func (s *multiClusterAppClient) Update(o *MultiClusterApp) (*MultiClusterApp, er return obj.(*MultiClusterApp), err } +func (s *multiClusterAppClient) UpdateStatus(o *MultiClusterApp) (*MultiClusterApp, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*MultiClusterApp), err +} + func (s *multiClusterAppClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_multi_cluster_app_revision_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_multi_cluster_app_revision_controller.go index e6b6a978..73ee74b1 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_multi_cluster_app_revision_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_multi_cluster_app_revision_controller.go @@ -74,8 +74,6 @@ type MultiClusterAppRevisionController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler MultiClusterAppRevisionHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type MultiClusterAppRevisionInterface interface { @@ -126,7 +124,7 @@ func (l *multiClusterAppRevisionLister) Get(namespace, name string) (*MultiClust if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: MultiClusterAppRevisionGroupVersionKind.Group, - Resource: "multiClusterAppRevision", + Resource: MultiClusterAppRevisionGroupVersionResource.Resource, }, key) } return obj.(*MultiClusterAppRevision), nil @@ -210,25 +208,12 @@ func (c multiClusterAppRevisionFactory) List() runtime.Object { } func (s *multiClusterAppRevisionClient) Controller() MultiClusterAppRevisionController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.multiClusterAppRevisionControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(MultiClusterAppRevisionGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(MultiClusterAppRevisionGroupVersionResource, MultiClusterAppRevisionGroupVersionKind.Kind, true)) - c = &multiClusterAppRevisionController{ + return &multiClusterAppRevisionController{ GenericController: genericController, } - - s.client.multiClusterAppRevisionControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type multiClusterAppRevisionClient struct { @@ -262,6 +247,11 @@ func (s *multiClusterAppRevisionClient) Update(o *MultiClusterAppRevision) (*Mul return obj.(*MultiClusterAppRevision), err } +func (s *multiClusterAppRevisionClient) UpdateStatus(o *MultiClusterAppRevision) (*MultiClusterAppRevision, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*MultiClusterAppRevision), err +} + func (s *multiClusterAppRevisionClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_node_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_node_controller.go index 2b9917f9..7912234f 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_node_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_node_controller.go @@ -74,8 +74,6 @@ type NodeController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler NodeHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type NodeInterface interface { @@ -126,7 +124,7 @@ func (l *nodeLister) Get(namespace, name string) (*Node, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: NodeGroupVersionKind.Group, - Resource: "node", + Resource: NodeGroupVersionResource.Resource, }, key) } return obj.(*Node), nil @@ -210,25 +208,12 @@ func (c nodeFactory) List() runtime.Object { } func (s *nodeClient) Controller() NodeController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.nodeControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(NodeGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(NodeGroupVersionResource, NodeGroupVersionKind.Kind, true)) - c = &nodeController{ + return &nodeController{ GenericController: genericController, } - - s.client.nodeControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type nodeClient struct { @@ -262,6 +247,11 @@ func (s *nodeClient) Update(o *Node) (*Node, error) { return obj.(*Node), err } +func (s *nodeClient) UpdateStatus(o *Node) (*Node, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Node), err +} + func (s *nodeClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_node_driver_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_node_driver_controller.go index 246098f8..41721533 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_node_driver_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_node_driver_controller.go @@ -73,8 +73,6 @@ type NodeDriverController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler NodeDriverHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type NodeDriverInterface interface { @@ -125,7 +123,7 @@ func (l *nodeDriverLister) Get(namespace, name string) (*NodeDriver, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: NodeDriverGroupVersionKind.Group, - Resource: "nodeDriver", + Resource: NodeDriverGroupVersionResource.Resource, }, key) } return obj.(*NodeDriver), nil @@ -209,25 +207,12 @@ func (c nodeDriverFactory) List() runtime.Object { } func (s *nodeDriverClient) Controller() NodeDriverController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.nodeDriverControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(NodeDriverGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(NodeDriverGroupVersionResource, NodeDriverGroupVersionKind.Kind, false)) - c = &nodeDriverController{ + return &nodeDriverController{ GenericController: genericController, } - - s.client.nodeDriverControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type nodeDriverClient struct { @@ -261,6 +246,11 @@ func (s *nodeDriverClient) Update(o *NodeDriver) (*NodeDriver, error) { return obj.(*NodeDriver), err } +func (s *nodeDriverClient) UpdateStatus(o *NodeDriver) (*NodeDriver, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*NodeDriver), err +} + func (s *nodeDriverClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_node_pool_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_node_pool_controller.go index 7c4fc5f7..4e5a16fa 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_node_pool_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_node_pool_controller.go @@ -74,8 +74,6 @@ type NodePoolController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler NodePoolHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type NodePoolInterface interface { @@ -126,7 +124,7 @@ func (l *nodePoolLister) Get(namespace, name string) (*NodePool, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: NodePoolGroupVersionKind.Group, - Resource: "nodePool", + Resource: NodePoolGroupVersionResource.Resource, }, key) } return obj.(*NodePool), nil @@ -210,25 +208,12 @@ func (c nodePoolFactory) List() runtime.Object { } func (s *nodePoolClient) Controller() NodePoolController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.nodePoolControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(NodePoolGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(NodePoolGroupVersionResource, NodePoolGroupVersionKind.Kind, true)) - c = &nodePoolController{ + return &nodePoolController{ GenericController: genericController, } - - s.client.nodePoolControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type nodePoolClient struct { @@ -262,6 +247,11 @@ func (s *nodePoolClient) Update(o *NodePool) (*NodePool, error) { return obj.(*NodePool), err } +func (s *nodePoolClient) UpdateStatus(o *NodePool) (*NodePool, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*NodePool), err +} + func (s *nodePoolClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_node_template_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_node_template_controller.go index 90c9ac27..d3df689b 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_node_template_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_node_template_controller.go @@ -74,8 +74,6 @@ type NodeTemplateController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler NodeTemplateHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type NodeTemplateInterface interface { @@ -126,7 +124,7 @@ func (l *nodeTemplateLister) Get(namespace, name string) (*NodeTemplate, error) if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: NodeTemplateGroupVersionKind.Group, - Resource: "nodeTemplate", + Resource: NodeTemplateGroupVersionResource.Resource, }, key) } return obj.(*NodeTemplate), nil @@ -210,25 +208,12 @@ func (c nodeTemplateFactory) List() runtime.Object { } func (s *nodeTemplateClient) Controller() NodeTemplateController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.nodeTemplateControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(NodeTemplateGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(NodeTemplateGroupVersionResource, NodeTemplateGroupVersionKind.Kind, true)) - c = &nodeTemplateController{ + return &nodeTemplateController{ GenericController: genericController, } - - s.client.nodeTemplateControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type nodeTemplateClient struct { @@ -262,6 +247,11 @@ func (s *nodeTemplateClient) Update(o *NodeTemplate) (*NodeTemplate, error) { return obj.(*NodeTemplate), err } +func (s *nodeTemplateClient) UpdateStatus(o *NodeTemplate) (*NodeTemplate, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*NodeTemplate), err +} + func (s *nodeTemplateClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_notifier_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_notifier_controller.go index 43aa3e40..f0e11af1 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_notifier_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_notifier_controller.go @@ -74,8 +74,6 @@ type NotifierController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler NotifierHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type NotifierInterface interface { @@ -126,7 +124,7 @@ func (l *notifierLister) Get(namespace, name string) (*Notifier, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: NotifierGroupVersionKind.Group, - Resource: "notifier", + Resource: NotifierGroupVersionResource.Resource, }, key) } return obj.(*Notifier), nil @@ -210,25 +208,12 @@ func (c notifierFactory) List() runtime.Object { } func (s *notifierClient) Controller() NotifierController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.notifierControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(NotifierGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(NotifierGroupVersionResource, NotifierGroupVersionKind.Kind, true)) - c = ¬ifierController{ + return ¬ifierController{ GenericController: genericController, } - - s.client.notifierControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type notifierClient struct { @@ -262,6 +247,11 @@ func (s *notifierClient) Update(o *Notifier) (*Notifier, error) { return obj.(*Notifier), err } +func (s *notifierClient) UpdateStatus(o *Notifier) (*Notifier, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Notifier), err +} + func (s *notifierClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_controller.go index acbc5f37..baa26d1e 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_controller.go @@ -73,8 +73,6 @@ type PodSecurityPolicyTemplateController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler PodSecurityPolicyTemplateHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type PodSecurityPolicyTemplateInterface interface { @@ -125,7 +123,7 @@ func (l *podSecurityPolicyTemplateLister) Get(namespace, name string) (*PodSecur if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: PodSecurityPolicyTemplateGroupVersionKind.Group, - Resource: "podSecurityPolicyTemplate", + Resource: PodSecurityPolicyTemplateGroupVersionResource.Resource, }, key) } return obj.(*PodSecurityPolicyTemplate), nil @@ -209,25 +207,12 @@ func (c podSecurityPolicyTemplateFactory) List() runtime.Object { } func (s *podSecurityPolicyTemplateClient) Controller() PodSecurityPolicyTemplateController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.podSecurityPolicyTemplateControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(PodSecurityPolicyTemplateGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(PodSecurityPolicyTemplateGroupVersionResource, PodSecurityPolicyTemplateGroupVersionKind.Kind, false)) - c = &podSecurityPolicyTemplateController{ + return &podSecurityPolicyTemplateController{ GenericController: genericController, } - - s.client.podSecurityPolicyTemplateControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type podSecurityPolicyTemplateClient struct { @@ -261,6 +246,11 @@ func (s *podSecurityPolicyTemplateClient) Update(o *PodSecurityPolicyTemplate) ( return obj.(*PodSecurityPolicyTemplate), err } +func (s *podSecurityPolicyTemplateClient) UpdateStatus(o *PodSecurityPolicyTemplate) (*PodSecurityPolicyTemplate, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*PodSecurityPolicyTemplate), err +} + func (s *podSecurityPolicyTemplateClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_project_binding_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_project_binding_controller.go index 0258b24c..4654308d 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_project_binding_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_project_binding_controller.go @@ -74,8 +74,6 @@ type PodSecurityPolicyTemplateProjectBindingController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler PodSecurityPolicyTemplateProjectBindingHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type PodSecurityPolicyTemplateProjectBindingInterface interface { @@ -126,7 +124,7 @@ func (l *podSecurityPolicyTemplateProjectBindingLister) Get(namespace, name stri if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: PodSecurityPolicyTemplateProjectBindingGroupVersionKind.Group, - Resource: "podSecurityPolicyTemplateProjectBinding", + Resource: PodSecurityPolicyTemplateProjectBindingGroupVersionResource.Resource, }, key) } return obj.(*PodSecurityPolicyTemplateProjectBinding), nil @@ -210,25 +208,12 @@ func (c podSecurityPolicyTemplateProjectBindingFactory) List() runtime.Object { } func (s *podSecurityPolicyTemplateProjectBindingClient) Controller() PodSecurityPolicyTemplateProjectBindingController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.podSecurityPolicyTemplateProjectBindingControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(PodSecurityPolicyTemplateProjectBindingGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(PodSecurityPolicyTemplateProjectBindingGroupVersionResource, PodSecurityPolicyTemplateProjectBindingGroupVersionKind.Kind, true)) - c = &podSecurityPolicyTemplateProjectBindingController{ + return &podSecurityPolicyTemplateProjectBindingController{ GenericController: genericController, } - - s.client.podSecurityPolicyTemplateProjectBindingControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type podSecurityPolicyTemplateProjectBindingClient struct { @@ -262,6 +247,11 @@ func (s *podSecurityPolicyTemplateProjectBindingClient) Update(o *PodSecurityPol return obj.(*PodSecurityPolicyTemplateProjectBinding), err } +func (s *podSecurityPolicyTemplateProjectBindingClient) UpdateStatus(o *PodSecurityPolicyTemplateProjectBinding) (*PodSecurityPolicyTemplateProjectBinding, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*PodSecurityPolicyTemplateProjectBinding), err +} + func (s *podSecurityPolicyTemplateProjectBindingClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_preference_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_preference_controller.go index 4476d048..a2a72a6b 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_preference_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_preference_controller.go @@ -74,8 +74,6 @@ type PreferenceController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler PreferenceHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type PreferenceInterface interface { @@ -126,7 +124,7 @@ func (l *preferenceLister) Get(namespace, name string) (*Preference, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: PreferenceGroupVersionKind.Group, - Resource: "preference", + Resource: PreferenceGroupVersionResource.Resource, }, key) } return obj.(*Preference), nil @@ -210,25 +208,12 @@ func (c preferenceFactory) List() runtime.Object { } func (s *preferenceClient) Controller() PreferenceController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.preferenceControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(PreferenceGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(PreferenceGroupVersionResource, PreferenceGroupVersionKind.Kind, true)) - c = &preferenceController{ + return &preferenceController{ GenericController: genericController, } - - s.client.preferenceControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type preferenceClient struct { @@ -262,6 +247,11 @@ func (s *preferenceClient) Update(o *Preference) (*Preference, error) { return obj.(*Preference), err } +func (s *preferenceClient) UpdateStatus(o *Preference) (*Preference, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Preference), err +} + func (s *preferenceClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_principal_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_principal_controller.go index 6a25fb1b..fe8d9d94 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_principal_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_principal_controller.go @@ -73,8 +73,6 @@ type PrincipalController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler PrincipalHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type PrincipalInterface interface { @@ -125,7 +123,7 @@ func (l *principalLister) Get(namespace, name string) (*Principal, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: PrincipalGroupVersionKind.Group, - Resource: "principal", + Resource: PrincipalGroupVersionResource.Resource, }, key) } return obj.(*Principal), nil @@ -209,25 +207,12 @@ func (c principalFactory) List() runtime.Object { } func (s *principalClient) Controller() PrincipalController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.principalControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(PrincipalGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(PrincipalGroupVersionResource, PrincipalGroupVersionKind.Kind, false)) - c = &principalController{ + return &principalController{ GenericController: genericController, } - - s.client.principalControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type principalClient struct { @@ -261,6 +246,11 @@ func (s *principalClient) Update(o *Principal) (*Principal, error) { return obj.(*Principal), err } +func (s *principalClient) UpdateStatus(o *Principal) (*Principal, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Principal), err +} + func (s *principalClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_alert_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_alert_controller.go index 0dac80d4..ca84a986 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_alert_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_alert_controller.go @@ -74,8 +74,6 @@ type ProjectAlertController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ProjectAlertHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ProjectAlertInterface interface { @@ -126,7 +124,7 @@ func (l *projectAlertLister) Get(namespace, name string) (*ProjectAlert, error) if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ProjectAlertGroupVersionKind.Group, - Resource: "projectAlert", + Resource: ProjectAlertGroupVersionResource.Resource, }, key) } return obj.(*ProjectAlert), nil @@ -210,25 +208,12 @@ func (c projectAlertFactory) List() runtime.Object { } func (s *projectAlertClient) Controller() ProjectAlertController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.projectAlertControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ProjectAlertGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ProjectAlertGroupVersionResource, ProjectAlertGroupVersionKind.Kind, true)) - c = &projectAlertController{ + return &projectAlertController{ GenericController: genericController, } - - s.client.projectAlertControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type projectAlertClient struct { @@ -262,6 +247,11 @@ func (s *projectAlertClient) Update(o *ProjectAlert) (*ProjectAlert, error) { return obj.(*ProjectAlert), err } +func (s *projectAlertClient) UpdateStatus(o *ProjectAlert) (*ProjectAlert, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ProjectAlert), err +} + func (s *projectAlertClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_alert_group_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_alert_group_controller.go index 74a6f316..2591881f 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_alert_group_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_alert_group_controller.go @@ -74,8 +74,6 @@ type ProjectAlertGroupController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ProjectAlertGroupHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ProjectAlertGroupInterface interface { @@ -126,7 +124,7 @@ func (l *projectAlertGroupLister) Get(namespace, name string) (*ProjectAlertGrou if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ProjectAlertGroupGroupVersionKind.Group, - Resource: "projectAlertGroup", + Resource: ProjectAlertGroupGroupVersionResource.Resource, }, key) } return obj.(*ProjectAlertGroup), nil @@ -210,25 +208,12 @@ func (c projectAlertGroupFactory) List() runtime.Object { } func (s *projectAlertGroupClient) Controller() ProjectAlertGroupController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.projectAlertGroupControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ProjectAlertGroupGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ProjectAlertGroupGroupVersionResource, ProjectAlertGroupGroupVersionKind.Kind, true)) - c = &projectAlertGroupController{ + return &projectAlertGroupController{ GenericController: genericController, } - - s.client.projectAlertGroupControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type projectAlertGroupClient struct { @@ -262,6 +247,11 @@ func (s *projectAlertGroupClient) Update(o *ProjectAlertGroup) (*ProjectAlertGro return obj.(*ProjectAlertGroup), err } +func (s *projectAlertGroupClient) UpdateStatus(o *ProjectAlertGroup) (*ProjectAlertGroup, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ProjectAlertGroup), err +} + func (s *projectAlertGroupClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_alert_rule_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_alert_rule_controller.go index b1b471ba..afa41f40 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_alert_rule_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_alert_rule_controller.go @@ -74,8 +74,6 @@ type ProjectAlertRuleController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ProjectAlertRuleHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ProjectAlertRuleInterface interface { @@ -126,7 +124,7 @@ func (l *projectAlertRuleLister) Get(namespace, name string) (*ProjectAlertRule, if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ProjectAlertRuleGroupVersionKind.Group, - Resource: "projectAlertRule", + Resource: ProjectAlertRuleGroupVersionResource.Resource, }, key) } return obj.(*ProjectAlertRule), nil @@ -210,25 +208,12 @@ func (c projectAlertRuleFactory) List() runtime.Object { } func (s *projectAlertRuleClient) Controller() ProjectAlertRuleController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.projectAlertRuleControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ProjectAlertRuleGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ProjectAlertRuleGroupVersionResource, ProjectAlertRuleGroupVersionKind.Kind, true)) - c = &projectAlertRuleController{ + return &projectAlertRuleController{ GenericController: genericController, } - - s.client.projectAlertRuleControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type projectAlertRuleClient struct { @@ -262,6 +247,11 @@ func (s *projectAlertRuleClient) Update(o *ProjectAlertRule) (*ProjectAlertRule, return obj.(*ProjectAlertRule), err } +func (s *projectAlertRuleClient) UpdateStatus(o *ProjectAlertRule) (*ProjectAlertRule, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ProjectAlertRule), err +} + func (s *projectAlertRuleClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_catalog_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_catalog_controller.go index 731ecb3f..70dd4254 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_catalog_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_catalog_controller.go @@ -74,8 +74,6 @@ type ProjectCatalogController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ProjectCatalogHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ProjectCatalogInterface interface { @@ -126,7 +124,7 @@ func (l *projectCatalogLister) Get(namespace, name string) (*ProjectCatalog, err if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ProjectCatalogGroupVersionKind.Group, - Resource: "projectCatalog", + Resource: ProjectCatalogGroupVersionResource.Resource, }, key) } return obj.(*ProjectCatalog), nil @@ -210,25 +208,12 @@ func (c projectCatalogFactory) List() runtime.Object { } func (s *projectCatalogClient) Controller() ProjectCatalogController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.projectCatalogControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ProjectCatalogGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ProjectCatalogGroupVersionResource, ProjectCatalogGroupVersionKind.Kind, true)) - c = &projectCatalogController{ + return &projectCatalogController{ GenericController: genericController, } - - s.client.projectCatalogControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type projectCatalogClient struct { @@ -262,6 +247,11 @@ func (s *projectCatalogClient) Update(o *ProjectCatalog) (*ProjectCatalog, error return obj.(*ProjectCatalog), err } +func (s *projectCatalogClient) UpdateStatus(o *ProjectCatalog) (*ProjectCatalog, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ProjectCatalog), err +} + func (s *projectCatalogClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_controller.go index 061381ed..354076fc 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_controller.go @@ -74,8 +74,6 @@ type ProjectController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ProjectHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ProjectInterface interface { @@ -126,7 +124,7 @@ func (l *projectLister) Get(namespace, name string) (*Project, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ProjectGroupVersionKind.Group, - Resource: "project", + Resource: ProjectGroupVersionResource.Resource, }, key) } return obj.(*Project), nil @@ -210,25 +208,12 @@ func (c projectFactory) List() runtime.Object { } func (s *projectClient) Controller() ProjectController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.projectControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ProjectGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ProjectGroupVersionResource, ProjectGroupVersionKind.Kind, true)) - c = &projectController{ + return &projectController{ GenericController: genericController, } - - s.client.projectControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type projectClient struct { @@ -262,6 +247,11 @@ func (s *projectClient) Update(o *Project) (*Project, error) { return obj.(*Project), err } +func (s *projectClient) UpdateStatus(o *Project) (*Project, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Project), err +} + func (s *projectClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_logging_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_logging_controller.go index f3f6afd1..233ae385 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_logging_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_logging_controller.go @@ -74,8 +74,6 @@ type ProjectLoggingController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ProjectLoggingHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ProjectLoggingInterface interface { @@ -126,7 +124,7 @@ func (l *projectLoggingLister) Get(namespace, name string) (*ProjectLogging, err if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ProjectLoggingGroupVersionKind.Group, - Resource: "projectLogging", + Resource: ProjectLoggingGroupVersionResource.Resource, }, key) } return obj.(*ProjectLogging), nil @@ -210,25 +208,12 @@ func (c projectLoggingFactory) List() runtime.Object { } func (s *projectLoggingClient) Controller() ProjectLoggingController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.projectLoggingControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ProjectLoggingGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ProjectLoggingGroupVersionResource, ProjectLoggingGroupVersionKind.Kind, true)) - c = &projectLoggingController{ + return &projectLoggingController{ GenericController: genericController, } - - s.client.projectLoggingControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type projectLoggingClient struct { @@ -262,6 +247,11 @@ func (s *projectLoggingClient) Update(o *ProjectLogging) (*ProjectLogging, error return obj.(*ProjectLogging), err } +func (s *projectLoggingClient) UpdateStatus(o *ProjectLogging) (*ProjectLogging, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ProjectLogging), err +} + func (s *projectLoggingClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_monitor_graph_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_monitor_graph_controller.go index d34eef31..ddbcbe4b 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_monitor_graph_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_monitor_graph_controller.go @@ -74,8 +74,6 @@ type ProjectMonitorGraphController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ProjectMonitorGraphHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ProjectMonitorGraphInterface interface { @@ -126,7 +124,7 @@ func (l *projectMonitorGraphLister) Get(namespace, name string) (*ProjectMonitor if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ProjectMonitorGraphGroupVersionKind.Group, - Resource: "projectMonitorGraph", + Resource: ProjectMonitorGraphGroupVersionResource.Resource, }, key) } return obj.(*ProjectMonitorGraph), nil @@ -210,25 +208,12 @@ func (c projectMonitorGraphFactory) List() runtime.Object { } func (s *projectMonitorGraphClient) Controller() ProjectMonitorGraphController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.projectMonitorGraphControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ProjectMonitorGraphGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ProjectMonitorGraphGroupVersionResource, ProjectMonitorGraphGroupVersionKind.Kind, true)) - c = &projectMonitorGraphController{ + return &projectMonitorGraphController{ GenericController: genericController, } - - s.client.projectMonitorGraphControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type projectMonitorGraphClient struct { @@ -262,6 +247,11 @@ func (s *projectMonitorGraphClient) Update(o *ProjectMonitorGraph) (*ProjectMoni return obj.(*ProjectMonitorGraph), err } +func (s *projectMonitorGraphClient) UpdateStatus(o *ProjectMonitorGraph) (*ProjectMonitorGraph, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ProjectMonitorGraph), err +} + func (s *projectMonitorGraphClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_network_policy_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_network_policy_controller.go index b9ae1907..c1511cc3 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_network_policy_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_network_policy_controller.go @@ -74,8 +74,6 @@ type ProjectNetworkPolicyController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ProjectNetworkPolicyHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ProjectNetworkPolicyInterface interface { @@ -126,7 +124,7 @@ func (l *projectNetworkPolicyLister) Get(namespace, name string) (*ProjectNetwor if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ProjectNetworkPolicyGroupVersionKind.Group, - Resource: "projectNetworkPolicy", + Resource: ProjectNetworkPolicyGroupVersionResource.Resource, }, key) } return obj.(*ProjectNetworkPolicy), nil @@ -210,25 +208,12 @@ func (c projectNetworkPolicyFactory) List() runtime.Object { } func (s *projectNetworkPolicyClient) Controller() ProjectNetworkPolicyController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.projectNetworkPolicyControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ProjectNetworkPolicyGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ProjectNetworkPolicyGroupVersionResource, ProjectNetworkPolicyGroupVersionKind.Kind, true)) - c = &projectNetworkPolicyController{ + return &projectNetworkPolicyController{ GenericController: genericController, } - - s.client.projectNetworkPolicyControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type projectNetworkPolicyClient struct { @@ -262,6 +247,11 @@ func (s *projectNetworkPolicyClient) Update(o *ProjectNetworkPolicy) (*ProjectNe return obj.(*ProjectNetworkPolicy), err } +func (s *projectNetworkPolicyClient) UpdateStatus(o *ProjectNetworkPolicy) (*ProjectNetworkPolicy, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ProjectNetworkPolicy), err +} + func (s *projectNetworkPolicyClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_role_template_binding_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_role_template_binding_controller.go index 4e3d6d3f..92debebd 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_role_template_binding_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_project_role_template_binding_controller.go @@ -74,8 +74,6 @@ type ProjectRoleTemplateBindingController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ProjectRoleTemplateBindingHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ProjectRoleTemplateBindingInterface interface { @@ -126,7 +124,7 @@ func (l *projectRoleTemplateBindingLister) Get(namespace, name string) (*Project if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ProjectRoleTemplateBindingGroupVersionKind.Group, - Resource: "projectRoleTemplateBinding", + Resource: ProjectRoleTemplateBindingGroupVersionResource.Resource, }, key) } return obj.(*ProjectRoleTemplateBinding), nil @@ -210,25 +208,12 @@ func (c projectRoleTemplateBindingFactory) List() runtime.Object { } func (s *projectRoleTemplateBindingClient) Controller() ProjectRoleTemplateBindingController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.projectRoleTemplateBindingControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ProjectRoleTemplateBindingGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ProjectRoleTemplateBindingGroupVersionResource, ProjectRoleTemplateBindingGroupVersionKind.Kind, true)) - c = &projectRoleTemplateBindingController{ + return &projectRoleTemplateBindingController{ GenericController: genericController, } - - s.client.projectRoleTemplateBindingControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type projectRoleTemplateBindingClient struct { @@ -262,6 +247,11 @@ func (s *projectRoleTemplateBindingClient) Update(o *ProjectRoleTemplateBinding) return obj.(*ProjectRoleTemplateBinding), err } +func (s *projectRoleTemplateBindingClient) UpdateStatus(o *ProjectRoleTemplateBinding) (*ProjectRoleTemplateBinding, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ProjectRoleTemplateBinding), err +} + func (s *projectRoleTemplateBindingClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_rke_addon_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_rke_addon_controller.go index dafcfe21..f6e3a546 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_rke_addon_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_rke_addon_controller.go @@ -18,20 +18,20 @@ import ( ) var ( - RKEAddonGroupVersionKind = schema.GroupVersionKind{ + RkeAddonGroupVersionKind = schema.GroupVersionKind{ Version: Version, Group: GroupName, - Kind: "RKEAddon", + Kind: "RkeAddon", } - RKEAddonResource = metav1.APIResource{ + RkeAddonResource = metav1.APIResource{ Name: "rkeaddons", SingularName: "rkeaddon", Namespaced: true, - Kind: RKEAddonGroupVersionKind.Kind, + Kind: RkeAddonGroupVersionKind.Kind, } - RKEAddonGroupVersionResource = schema.GroupVersionResource{ + RkeAddonGroupVersionResource = schema.GroupVersionResource{ Group: GroupName, Version: Version, Resource: "rkeaddons", @@ -39,80 +39,78 @@ var ( ) func init() { - resource.Put(RKEAddonGroupVersionResource) + resource.Put(RkeAddonGroupVersionResource) } -func NewRKEAddon(namespace, name string, obj RKEAddon) *RKEAddon { - obj.APIVersion, obj.Kind = RKEAddonGroupVersionKind.ToAPIVersionAndKind() +func NewRkeAddon(namespace, name string, obj RkeAddon) *RkeAddon { + obj.APIVersion, obj.Kind = RkeAddonGroupVersionKind.ToAPIVersionAndKind() obj.Name = name obj.Namespace = namespace return &obj } -type RKEAddonList struct { +type RkeAddonList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []RKEAddon `json:"items"` + Items []RkeAddon `json:"items"` } -type RKEAddonHandlerFunc func(key string, obj *RKEAddon) (runtime.Object, error) +type RkeAddonHandlerFunc func(key string, obj *RkeAddon) (runtime.Object, error) -type RKEAddonChangeHandlerFunc func(obj *RKEAddon) (runtime.Object, error) +type RkeAddonChangeHandlerFunc func(obj *RkeAddon) (runtime.Object, error) -type RKEAddonLister interface { - List(namespace string, selector labels.Selector) (ret []*RKEAddon, err error) - Get(namespace, name string) (*RKEAddon, error) +type RkeAddonLister interface { + List(namespace string, selector labels.Selector) (ret []*RkeAddon, err error) + Get(namespace, name string) (*RkeAddon, error) } -type RKEAddonController interface { +type RkeAddonController interface { Generic() controller.GenericController Informer() cache.SharedIndexInformer - Lister() RKEAddonLister - AddHandler(ctx context.Context, name string, handler RKEAddonHandlerFunc) - AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RKEAddonHandlerFunc) - AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler RKEAddonHandlerFunc) - AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler RKEAddonHandlerFunc) + Lister() RkeAddonLister + AddHandler(ctx context.Context, name string, handler RkeAddonHandlerFunc) + AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RkeAddonHandlerFunc) + AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler RkeAddonHandlerFunc) + AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler RkeAddonHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } -type RKEAddonInterface interface { +type RkeAddonInterface interface { ObjectClient() *objectclient.ObjectClient - Create(*RKEAddon) (*RKEAddon, error) - GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RKEAddon, error) - Get(name string, opts metav1.GetOptions) (*RKEAddon, error) - Update(*RKEAddon) (*RKEAddon, error) + Create(*RkeAddon) (*RkeAddon, error) + GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RkeAddon, error) + Get(name string, opts metav1.GetOptions) (*RkeAddon, error) + Update(*RkeAddon) (*RkeAddon, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*RKEAddonList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*RKEAddonList, error) + List(opts metav1.ListOptions) (*RkeAddonList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*RkeAddonList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error - Controller() RKEAddonController - AddHandler(ctx context.Context, name string, sync RKEAddonHandlerFunc) - AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RKEAddonHandlerFunc) - AddLifecycle(ctx context.Context, name string, lifecycle RKEAddonLifecycle) - AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle RKEAddonLifecycle) - AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync RKEAddonHandlerFunc) - AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync RKEAddonHandlerFunc) - AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle RKEAddonLifecycle) - AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle RKEAddonLifecycle) + Controller() RkeAddonController + AddHandler(ctx context.Context, name string, sync RkeAddonHandlerFunc) + AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RkeAddonHandlerFunc) + AddLifecycle(ctx context.Context, name string, lifecycle RkeAddonLifecycle) + AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle RkeAddonLifecycle) + AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync RkeAddonHandlerFunc) + AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync RkeAddonHandlerFunc) + AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle RkeAddonLifecycle) + AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle RkeAddonLifecycle) } type rkeAddonLister struct { controller *rkeAddonController } -func (l *rkeAddonLister) List(namespace string, selector labels.Selector) (ret []*RKEAddon, err error) { +func (l *rkeAddonLister) List(namespace string, selector labels.Selector) (ret []*RkeAddon, err error) { err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) { - ret = append(ret, obj.(*RKEAddon)) + ret = append(ret, obj.(*RkeAddon)) }) return } -func (l *rkeAddonLister) Get(namespace, name string) (*RKEAddon, error) { +func (l *rkeAddonLister) Get(namespace, name string) (*RkeAddon, error) { var key string if namespace != "" { key = namespace + "/" + name @@ -125,11 +123,11 @@ func (l *rkeAddonLister) Get(namespace, name string) (*RKEAddon, error) { } if !exists { return nil, errors.NewNotFound(schema.GroupResource{ - Group: RKEAddonGroupVersionKind.Group, - Resource: "rkeAddon", + Group: RkeAddonGroupVersionKind.Group, + Resource: RkeAddonGroupVersionResource.Resource, }, key) } - return obj.(*RKEAddon), nil + return obj.(*RkeAddon), nil } type rkeAddonController struct { @@ -140,17 +138,17 @@ func (c *rkeAddonController) Generic() controller.GenericController { return c.GenericController } -func (c *rkeAddonController) Lister() RKEAddonLister { +func (c *rkeAddonController) Lister() RkeAddonLister { return &rkeAddonLister{ controller: c, } } -func (c *rkeAddonController) AddHandler(ctx context.Context, name string, handler RKEAddonHandlerFunc) { +func (c *rkeAddonController) AddHandler(ctx context.Context, name string, handler RkeAddonHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*RKEAddon); ok { + } else if v, ok := obj.(*RkeAddon); ok { return handler(key, v) } else { return nil, nil @@ -158,13 +156,13 @@ func (c *rkeAddonController) AddHandler(ctx context.Context, name string, handle }) } -func (c *rkeAddonController) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, handler RKEAddonHandlerFunc) { +func (c *rkeAddonController) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, handler RkeAddonHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if !enabled() { return nil, nil } else if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*RKEAddon); ok { + } else if v, ok := obj.(*RkeAddon); ok { return handler(key, v) } else { return nil, nil @@ -172,11 +170,11 @@ func (c *rkeAddonController) AddFeatureHandler(ctx context.Context, enabled func }) } -func (c *rkeAddonController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler RKEAddonHandlerFunc) { +func (c *rkeAddonController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler RkeAddonHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*RKEAddon); ok && controller.ObjectInCluster(cluster, obj) { + } else if v, ok := obj.(*RkeAddon); ok && controller.ObjectInCluster(cluster, obj) { return handler(key, v) } else { return nil, nil @@ -184,13 +182,13 @@ func (c *rkeAddonController) AddClusterScopedHandler(ctx context.Context, name, }) } -func (c *rkeAddonController) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, cluster string, handler RKEAddonHandlerFunc) { +func (c *rkeAddonController) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, cluster string, handler RkeAddonHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if !enabled() { return nil, nil } else if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*RKEAddon); ok && controller.ObjectInCluster(cluster, obj) { + } else if v, ok := obj.(*RkeAddon); ok && controller.ObjectInCluster(cluster, obj) { return handler(key, v) } else { return nil, nil @@ -202,64 +200,56 @@ type rkeAddonFactory struct { } func (c rkeAddonFactory) Object() runtime.Object { - return &RKEAddon{} + return &RkeAddon{} } func (c rkeAddonFactory) List() runtime.Object { - return &RKEAddonList{} + return &RkeAddonList{} } -func (s *rkeAddonClient) Controller() RKEAddonController { - s.client.Lock() - defer s.client.Unlock() +func (s *rkeAddonClient) Controller() RkeAddonController { + genericController := controller.NewGenericController(RkeAddonGroupVersionKind.Kind+"Controller", + s.client.controllerFactory.ForResourceKind(RkeAddonGroupVersionResource, RkeAddonGroupVersionKind.Kind, true)) - c, ok := s.client.rkeAddonControllers[s.ns] - if ok { - return c - } - - genericController := controller.NewGenericController(RKEAddonGroupVersionKind.Kind+"Controller", - s.objectClient) - - c = &rkeAddonController{ + return &rkeAddonController{ GenericController: genericController, } - - s.client.rkeAddonControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type rkeAddonClient struct { client *Client ns string objectClient *objectclient.ObjectClient - controller RKEAddonController + controller RkeAddonController } func (s *rkeAddonClient) ObjectClient() *objectclient.ObjectClient { return s.objectClient } -func (s *rkeAddonClient) Create(o *RKEAddon) (*RKEAddon, error) { +func (s *rkeAddonClient) Create(o *RkeAddon) (*RkeAddon, error) { obj, err := s.objectClient.Create(o) - return obj.(*RKEAddon), err + return obj.(*RkeAddon), err } -func (s *rkeAddonClient) Get(name string, opts metav1.GetOptions) (*RKEAddon, error) { +func (s *rkeAddonClient) Get(name string, opts metav1.GetOptions) (*RkeAddon, error) { obj, err := s.objectClient.Get(name, opts) - return obj.(*RKEAddon), err + return obj.(*RkeAddon), err } -func (s *rkeAddonClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RKEAddon, error) { +func (s *rkeAddonClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RkeAddon, error) { obj, err := s.objectClient.GetNamespaced(namespace, name, opts) - return obj.(*RKEAddon), err + return obj.(*RkeAddon), err } -func (s *rkeAddonClient) Update(o *RKEAddon) (*RKEAddon, error) { +func (s *rkeAddonClient) Update(o *RkeAddon) (*RkeAddon, error) { obj, err := s.objectClient.Update(o.Name, o) - return obj.(*RKEAddon), err + return obj.(*RkeAddon), err +} + +func (s *rkeAddonClient) UpdateStatus(o *RkeAddon) (*RkeAddon, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*RkeAddon), err } func (s *rkeAddonClient) Delete(name string, options *metav1.DeleteOptions) error { @@ -270,14 +260,14 @@ func (s *rkeAddonClient) DeleteNamespaced(namespace, name string, options *metav return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *rkeAddonClient) List(opts metav1.ListOptions) (*RKEAddonList, error) { +func (s *rkeAddonClient) List(opts metav1.ListOptions) (*RkeAddonList, error) { obj, err := s.objectClient.List(opts) - return obj.(*RKEAddonList), err + return obj.(*RkeAddonList), err } -func (s *rkeAddonClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*RKEAddonList, error) { +func (s *rkeAddonClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*RkeAddonList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*RKEAddonList), err + return obj.(*RkeAddonList), err } func (s *rkeAddonClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { @@ -285,47 +275,47 @@ func (s *rkeAddonClient) Watch(opts metav1.ListOptions) (watch.Interface, error) } // Patch applies the patch and returns the patched deployment. -func (s *rkeAddonClient) Patch(o *RKEAddon, patchType types.PatchType, data []byte, subresources ...string) (*RKEAddon, error) { +func (s *rkeAddonClient) Patch(o *RkeAddon, patchType types.PatchType, data []byte, subresources ...string) (*RkeAddon, error) { obj, err := s.objectClient.Patch(o.Name, o, patchType, data, subresources...) - return obj.(*RKEAddon), err + return obj.(*RkeAddon), err } func (s *rkeAddonClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error { return s.objectClient.DeleteCollection(deleteOpts, listOpts) } -func (s *rkeAddonClient) AddHandler(ctx context.Context, name string, sync RKEAddonHandlerFunc) { +func (s *rkeAddonClient) AddHandler(ctx context.Context, name string, sync RkeAddonHandlerFunc) { s.Controller().AddHandler(ctx, name, sync) } -func (s *rkeAddonClient) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RKEAddonHandlerFunc) { +func (s *rkeAddonClient) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RkeAddonHandlerFunc) { s.Controller().AddFeatureHandler(ctx, enabled, name, sync) } -func (s *rkeAddonClient) AddLifecycle(ctx context.Context, name string, lifecycle RKEAddonLifecycle) { - sync := NewRKEAddonLifecycleAdapter(name, false, s, lifecycle) +func (s *rkeAddonClient) AddLifecycle(ctx context.Context, name string, lifecycle RkeAddonLifecycle) { + sync := NewRkeAddonLifecycleAdapter(name, false, s, lifecycle) s.Controller().AddHandler(ctx, name, sync) } -func (s *rkeAddonClient) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle RKEAddonLifecycle) { - sync := NewRKEAddonLifecycleAdapter(name, false, s, lifecycle) +func (s *rkeAddonClient) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle RkeAddonLifecycle) { + sync := NewRkeAddonLifecycleAdapter(name, false, s, lifecycle) s.Controller().AddFeatureHandler(ctx, enabled, name, sync) } -func (s *rkeAddonClient) AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync RKEAddonHandlerFunc) { +func (s *rkeAddonClient) AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync RkeAddonHandlerFunc) { s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync) } -func (s *rkeAddonClient) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync RKEAddonHandlerFunc) { +func (s *rkeAddonClient) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync RkeAddonHandlerFunc) { s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync) } -func (s *rkeAddonClient) AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle RKEAddonLifecycle) { - sync := NewRKEAddonLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) +func (s *rkeAddonClient) AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle RkeAddonLifecycle) { + sync := NewRkeAddonLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync) } -func (s *rkeAddonClient) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle RKEAddonLifecycle) { - sync := NewRKEAddonLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) +func (s *rkeAddonClient) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle RkeAddonLifecycle) { + sync := NewRkeAddonLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_rke_addon_lifecycle_adapter.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_rke_addon_lifecycle_adapter.go index bd027df0..4d260aef 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_rke_addon_lifecycle_adapter.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_rke_addon_lifecycle_adapter.go @@ -6,14 +6,14 @@ import ( "k8s.io/apimachinery/pkg/runtime" ) -type RKEAddonLifecycle interface { - Create(obj *RKEAddon) (runtime.Object, error) - Remove(obj *RKEAddon) (runtime.Object, error) - Updated(obj *RKEAddon) (runtime.Object, error) +type RkeAddonLifecycle interface { + Create(obj *RkeAddon) (runtime.Object, error) + Remove(obj *RkeAddon) (runtime.Object, error) + Updated(obj *RkeAddon) (runtime.Object, error) } type rkeAddonLifecycleAdapter struct { - lifecycle RKEAddonLifecycle + lifecycle RkeAddonLifecycle } func (w *rkeAddonLifecycleAdapter) HasCreate() bool { @@ -27,7 +27,7 @@ func (w *rkeAddonLifecycleAdapter) HasFinalize() bool { } func (w *rkeAddonLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Create(obj.(*RKEAddon)) + o, err := w.lifecycle.Create(obj.(*RkeAddon)) if o == nil { return nil, err } @@ -35,7 +35,7 @@ func (w *rkeAddonLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, e } func (w *rkeAddonLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Remove(obj.(*RKEAddon)) + o, err := w.lifecycle.Remove(obj.(*RkeAddon)) if o == nil { return nil, err } @@ -43,20 +43,20 @@ func (w *rkeAddonLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, } func (w *rkeAddonLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Updated(obj.(*RKEAddon)) + o, err := w.lifecycle.Updated(obj.(*RkeAddon)) if o == nil { return nil, err } return o, err } -func NewRKEAddonLifecycleAdapter(name string, clusterScoped bool, client RKEAddonInterface, l RKEAddonLifecycle) RKEAddonHandlerFunc { +func NewRkeAddonLifecycleAdapter(name string, clusterScoped bool, client RkeAddonInterface, l RkeAddonLifecycle) RkeAddonHandlerFunc { if clusterScoped { - resource.PutClusterScoped(RKEAddonGroupVersionResource) + resource.PutClusterScoped(RkeAddonGroupVersionResource) } adapter := &rkeAddonLifecycleAdapter{lifecycle: l} syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient()) - return func(key string, obj *RKEAddon) (runtime.Object, error) { + return func(key string, obj *RkeAddon) (runtime.Object, error) { newObj, err := syncFn(key, obj) if o, ok := newObj.(runtime.Object); ok { return o, err diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_rke_k8s_service_option_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_rke_k8s_service_option_controller.go index 19b2c581..6618dd36 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_rke_k8s_service_option_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_rke_k8s_service_option_controller.go @@ -18,20 +18,20 @@ import ( ) var ( - RKEK8sServiceOptionGroupVersionKind = schema.GroupVersionKind{ + RkeK8sServiceOptionGroupVersionKind = schema.GroupVersionKind{ Version: Version, Group: GroupName, - Kind: "RKEK8sServiceOption", + Kind: "RkeK8sServiceOption", } - RKEK8sServiceOptionResource = metav1.APIResource{ + RkeK8sServiceOptionResource = metav1.APIResource{ Name: "rkek8sserviceoptions", SingularName: "rkek8sserviceoption", Namespaced: true, - Kind: RKEK8sServiceOptionGroupVersionKind.Kind, + Kind: RkeK8sServiceOptionGroupVersionKind.Kind, } - RKEK8sServiceOptionGroupVersionResource = schema.GroupVersionResource{ + RkeK8sServiceOptionGroupVersionResource = schema.GroupVersionResource{ Group: GroupName, Version: Version, Resource: "rkek8sserviceoptions", @@ -39,80 +39,78 @@ var ( ) func init() { - resource.Put(RKEK8sServiceOptionGroupVersionResource) + resource.Put(RkeK8sServiceOptionGroupVersionResource) } -func NewRKEK8sServiceOption(namespace, name string, obj RKEK8sServiceOption) *RKEK8sServiceOption { - obj.APIVersion, obj.Kind = RKEK8sServiceOptionGroupVersionKind.ToAPIVersionAndKind() +func NewRkeK8sServiceOption(namespace, name string, obj RkeK8sServiceOption) *RkeK8sServiceOption { + obj.APIVersion, obj.Kind = RkeK8sServiceOptionGroupVersionKind.ToAPIVersionAndKind() obj.Name = name obj.Namespace = namespace return &obj } -type RKEK8sServiceOptionList struct { +type RkeK8sServiceOptionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []RKEK8sServiceOption `json:"items"` + Items []RkeK8sServiceOption `json:"items"` } -type RKEK8sServiceOptionHandlerFunc func(key string, obj *RKEK8sServiceOption) (runtime.Object, error) +type RkeK8sServiceOptionHandlerFunc func(key string, obj *RkeK8sServiceOption) (runtime.Object, error) -type RKEK8sServiceOptionChangeHandlerFunc func(obj *RKEK8sServiceOption) (runtime.Object, error) +type RkeK8sServiceOptionChangeHandlerFunc func(obj *RkeK8sServiceOption) (runtime.Object, error) -type RKEK8sServiceOptionLister interface { - List(namespace string, selector labels.Selector) (ret []*RKEK8sServiceOption, err error) - Get(namespace, name string) (*RKEK8sServiceOption, error) +type RkeK8sServiceOptionLister interface { + List(namespace string, selector labels.Selector) (ret []*RkeK8sServiceOption, err error) + Get(namespace, name string) (*RkeK8sServiceOption, error) } -type RKEK8sServiceOptionController interface { +type RkeK8sServiceOptionController interface { Generic() controller.GenericController Informer() cache.SharedIndexInformer - Lister() RKEK8sServiceOptionLister - AddHandler(ctx context.Context, name string, handler RKEK8sServiceOptionHandlerFunc) - AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RKEK8sServiceOptionHandlerFunc) - AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler RKEK8sServiceOptionHandlerFunc) - AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler RKEK8sServiceOptionHandlerFunc) + Lister() RkeK8sServiceOptionLister + AddHandler(ctx context.Context, name string, handler RkeK8sServiceOptionHandlerFunc) + AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RkeK8sServiceOptionHandlerFunc) + AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler RkeK8sServiceOptionHandlerFunc) + AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler RkeK8sServiceOptionHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } -type RKEK8sServiceOptionInterface interface { +type RkeK8sServiceOptionInterface interface { ObjectClient() *objectclient.ObjectClient - Create(*RKEK8sServiceOption) (*RKEK8sServiceOption, error) - GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RKEK8sServiceOption, error) - Get(name string, opts metav1.GetOptions) (*RKEK8sServiceOption, error) - Update(*RKEK8sServiceOption) (*RKEK8sServiceOption, error) + Create(*RkeK8sServiceOption) (*RkeK8sServiceOption, error) + GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RkeK8sServiceOption, error) + Get(name string, opts metav1.GetOptions) (*RkeK8sServiceOption, error) + Update(*RkeK8sServiceOption) (*RkeK8sServiceOption, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*RKEK8sServiceOptionList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*RKEK8sServiceOptionList, error) + List(opts metav1.ListOptions) (*RkeK8sServiceOptionList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*RkeK8sServiceOptionList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error - Controller() RKEK8sServiceOptionController - AddHandler(ctx context.Context, name string, sync RKEK8sServiceOptionHandlerFunc) - AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RKEK8sServiceOptionHandlerFunc) - AddLifecycle(ctx context.Context, name string, lifecycle RKEK8sServiceOptionLifecycle) - AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle RKEK8sServiceOptionLifecycle) - AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync RKEK8sServiceOptionHandlerFunc) - AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync RKEK8sServiceOptionHandlerFunc) - AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle RKEK8sServiceOptionLifecycle) - AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle RKEK8sServiceOptionLifecycle) + Controller() RkeK8sServiceOptionController + AddHandler(ctx context.Context, name string, sync RkeK8sServiceOptionHandlerFunc) + AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RkeK8sServiceOptionHandlerFunc) + AddLifecycle(ctx context.Context, name string, lifecycle RkeK8sServiceOptionLifecycle) + AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle RkeK8sServiceOptionLifecycle) + AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync RkeK8sServiceOptionHandlerFunc) + AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync RkeK8sServiceOptionHandlerFunc) + AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle RkeK8sServiceOptionLifecycle) + AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle RkeK8sServiceOptionLifecycle) } type rkeK8sServiceOptionLister struct { controller *rkeK8sServiceOptionController } -func (l *rkeK8sServiceOptionLister) List(namespace string, selector labels.Selector) (ret []*RKEK8sServiceOption, err error) { +func (l *rkeK8sServiceOptionLister) List(namespace string, selector labels.Selector) (ret []*RkeK8sServiceOption, err error) { err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) { - ret = append(ret, obj.(*RKEK8sServiceOption)) + ret = append(ret, obj.(*RkeK8sServiceOption)) }) return } -func (l *rkeK8sServiceOptionLister) Get(namespace, name string) (*RKEK8sServiceOption, error) { +func (l *rkeK8sServiceOptionLister) Get(namespace, name string) (*RkeK8sServiceOption, error) { var key string if namespace != "" { key = namespace + "/" + name @@ -125,11 +123,11 @@ func (l *rkeK8sServiceOptionLister) Get(namespace, name string) (*RKEK8sServiceO } if !exists { return nil, errors.NewNotFound(schema.GroupResource{ - Group: RKEK8sServiceOptionGroupVersionKind.Group, - Resource: "rkeK8sServiceOption", + Group: RkeK8sServiceOptionGroupVersionKind.Group, + Resource: RkeK8sServiceOptionGroupVersionResource.Resource, }, key) } - return obj.(*RKEK8sServiceOption), nil + return obj.(*RkeK8sServiceOption), nil } type rkeK8sServiceOptionController struct { @@ -140,17 +138,17 @@ func (c *rkeK8sServiceOptionController) Generic() controller.GenericController { return c.GenericController } -func (c *rkeK8sServiceOptionController) Lister() RKEK8sServiceOptionLister { +func (c *rkeK8sServiceOptionController) Lister() RkeK8sServiceOptionLister { return &rkeK8sServiceOptionLister{ controller: c, } } -func (c *rkeK8sServiceOptionController) AddHandler(ctx context.Context, name string, handler RKEK8sServiceOptionHandlerFunc) { +func (c *rkeK8sServiceOptionController) AddHandler(ctx context.Context, name string, handler RkeK8sServiceOptionHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*RKEK8sServiceOption); ok { + } else if v, ok := obj.(*RkeK8sServiceOption); ok { return handler(key, v) } else { return nil, nil @@ -158,13 +156,13 @@ func (c *rkeK8sServiceOptionController) AddHandler(ctx context.Context, name str }) } -func (c *rkeK8sServiceOptionController) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, handler RKEK8sServiceOptionHandlerFunc) { +func (c *rkeK8sServiceOptionController) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, handler RkeK8sServiceOptionHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if !enabled() { return nil, nil } else if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*RKEK8sServiceOption); ok { + } else if v, ok := obj.(*RkeK8sServiceOption); ok { return handler(key, v) } else { return nil, nil @@ -172,11 +170,11 @@ func (c *rkeK8sServiceOptionController) AddFeatureHandler(ctx context.Context, e }) } -func (c *rkeK8sServiceOptionController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler RKEK8sServiceOptionHandlerFunc) { +func (c *rkeK8sServiceOptionController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler RkeK8sServiceOptionHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*RKEK8sServiceOption); ok && controller.ObjectInCluster(cluster, obj) { + } else if v, ok := obj.(*RkeK8sServiceOption); ok && controller.ObjectInCluster(cluster, obj) { return handler(key, v) } else { return nil, nil @@ -184,13 +182,13 @@ func (c *rkeK8sServiceOptionController) AddClusterScopedHandler(ctx context.Cont }) } -func (c *rkeK8sServiceOptionController) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, cluster string, handler RKEK8sServiceOptionHandlerFunc) { +func (c *rkeK8sServiceOptionController) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, cluster string, handler RkeK8sServiceOptionHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if !enabled() { return nil, nil } else if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*RKEK8sServiceOption); ok && controller.ObjectInCluster(cluster, obj) { + } else if v, ok := obj.(*RkeK8sServiceOption); ok && controller.ObjectInCluster(cluster, obj) { return handler(key, v) } else { return nil, nil @@ -202,64 +200,56 @@ type rkeK8sServiceOptionFactory struct { } func (c rkeK8sServiceOptionFactory) Object() runtime.Object { - return &RKEK8sServiceOption{} + return &RkeK8sServiceOption{} } func (c rkeK8sServiceOptionFactory) List() runtime.Object { - return &RKEK8sServiceOptionList{} + return &RkeK8sServiceOptionList{} } -func (s *rkeK8sServiceOptionClient) Controller() RKEK8sServiceOptionController { - s.client.Lock() - defer s.client.Unlock() +func (s *rkeK8sServiceOptionClient) Controller() RkeK8sServiceOptionController { + genericController := controller.NewGenericController(RkeK8sServiceOptionGroupVersionKind.Kind+"Controller", + s.client.controllerFactory.ForResourceKind(RkeK8sServiceOptionGroupVersionResource, RkeK8sServiceOptionGroupVersionKind.Kind, true)) - c, ok := s.client.rkeK8sServiceOptionControllers[s.ns] - if ok { - return c - } - - genericController := controller.NewGenericController(RKEK8sServiceOptionGroupVersionKind.Kind+"Controller", - s.objectClient) - - c = &rkeK8sServiceOptionController{ + return &rkeK8sServiceOptionController{ GenericController: genericController, } - - s.client.rkeK8sServiceOptionControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type rkeK8sServiceOptionClient struct { client *Client ns string objectClient *objectclient.ObjectClient - controller RKEK8sServiceOptionController + controller RkeK8sServiceOptionController } func (s *rkeK8sServiceOptionClient) ObjectClient() *objectclient.ObjectClient { return s.objectClient } -func (s *rkeK8sServiceOptionClient) Create(o *RKEK8sServiceOption) (*RKEK8sServiceOption, error) { +func (s *rkeK8sServiceOptionClient) Create(o *RkeK8sServiceOption) (*RkeK8sServiceOption, error) { obj, err := s.objectClient.Create(o) - return obj.(*RKEK8sServiceOption), err + return obj.(*RkeK8sServiceOption), err } -func (s *rkeK8sServiceOptionClient) Get(name string, opts metav1.GetOptions) (*RKEK8sServiceOption, error) { +func (s *rkeK8sServiceOptionClient) Get(name string, opts metav1.GetOptions) (*RkeK8sServiceOption, error) { obj, err := s.objectClient.Get(name, opts) - return obj.(*RKEK8sServiceOption), err + return obj.(*RkeK8sServiceOption), err } -func (s *rkeK8sServiceOptionClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RKEK8sServiceOption, error) { +func (s *rkeK8sServiceOptionClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RkeK8sServiceOption, error) { obj, err := s.objectClient.GetNamespaced(namespace, name, opts) - return obj.(*RKEK8sServiceOption), err + return obj.(*RkeK8sServiceOption), err } -func (s *rkeK8sServiceOptionClient) Update(o *RKEK8sServiceOption) (*RKEK8sServiceOption, error) { +func (s *rkeK8sServiceOptionClient) Update(o *RkeK8sServiceOption) (*RkeK8sServiceOption, error) { obj, err := s.objectClient.Update(o.Name, o) - return obj.(*RKEK8sServiceOption), err + return obj.(*RkeK8sServiceOption), err +} + +func (s *rkeK8sServiceOptionClient) UpdateStatus(o *RkeK8sServiceOption) (*RkeK8sServiceOption, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*RkeK8sServiceOption), err } func (s *rkeK8sServiceOptionClient) Delete(name string, options *metav1.DeleteOptions) error { @@ -270,14 +260,14 @@ func (s *rkeK8sServiceOptionClient) DeleteNamespaced(namespace, name string, opt return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *rkeK8sServiceOptionClient) List(opts metav1.ListOptions) (*RKEK8sServiceOptionList, error) { +func (s *rkeK8sServiceOptionClient) List(opts metav1.ListOptions) (*RkeK8sServiceOptionList, error) { obj, err := s.objectClient.List(opts) - return obj.(*RKEK8sServiceOptionList), err + return obj.(*RkeK8sServiceOptionList), err } -func (s *rkeK8sServiceOptionClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*RKEK8sServiceOptionList, error) { +func (s *rkeK8sServiceOptionClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*RkeK8sServiceOptionList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*RKEK8sServiceOptionList), err + return obj.(*RkeK8sServiceOptionList), err } func (s *rkeK8sServiceOptionClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { @@ -285,47 +275,47 @@ func (s *rkeK8sServiceOptionClient) Watch(opts metav1.ListOptions) (watch.Interf } // Patch applies the patch and returns the patched deployment. -func (s *rkeK8sServiceOptionClient) Patch(o *RKEK8sServiceOption, patchType types.PatchType, data []byte, subresources ...string) (*RKEK8sServiceOption, error) { +func (s *rkeK8sServiceOptionClient) Patch(o *RkeK8sServiceOption, patchType types.PatchType, data []byte, subresources ...string) (*RkeK8sServiceOption, error) { obj, err := s.objectClient.Patch(o.Name, o, patchType, data, subresources...) - return obj.(*RKEK8sServiceOption), err + return obj.(*RkeK8sServiceOption), err } func (s *rkeK8sServiceOptionClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error { return s.objectClient.DeleteCollection(deleteOpts, listOpts) } -func (s *rkeK8sServiceOptionClient) AddHandler(ctx context.Context, name string, sync RKEK8sServiceOptionHandlerFunc) { +func (s *rkeK8sServiceOptionClient) AddHandler(ctx context.Context, name string, sync RkeK8sServiceOptionHandlerFunc) { s.Controller().AddHandler(ctx, name, sync) } -func (s *rkeK8sServiceOptionClient) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RKEK8sServiceOptionHandlerFunc) { +func (s *rkeK8sServiceOptionClient) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RkeK8sServiceOptionHandlerFunc) { s.Controller().AddFeatureHandler(ctx, enabled, name, sync) } -func (s *rkeK8sServiceOptionClient) AddLifecycle(ctx context.Context, name string, lifecycle RKEK8sServiceOptionLifecycle) { - sync := NewRKEK8sServiceOptionLifecycleAdapter(name, false, s, lifecycle) +func (s *rkeK8sServiceOptionClient) AddLifecycle(ctx context.Context, name string, lifecycle RkeK8sServiceOptionLifecycle) { + sync := NewRkeK8sServiceOptionLifecycleAdapter(name, false, s, lifecycle) s.Controller().AddHandler(ctx, name, sync) } -func (s *rkeK8sServiceOptionClient) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle RKEK8sServiceOptionLifecycle) { - sync := NewRKEK8sServiceOptionLifecycleAdapter(name, false, s, lifecycle) +func (s *rkeK8sServiceOptionClient) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle RkeK8sServiceOptionLifecycle) { + sync := NewRkeK8sServiceOptionLifecycleAdapter(name, false, s, lifecycle) s.Controller().AddFeatureHandler(ctx, enabled, name, sync) } -func (s *rkeK8sServiceOptionClient) AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync RKEK8sServiceOptionHandlerFunc) { +func (s *rkeK8sServiceOptionClient) AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync RkeK8sServiceOptionHandlerFunc) { s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync) } -func (s *rkeK8sServiceOptionClient) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync RKEK8sServiceOptionHandlerFunc) { +func (s *rkeK8sServiceOptionClient) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync RkeK8sServiceOptionHandlerFunc) { s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync) } -func (s *rkeK8sServiceOptionClient) AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle RKEK8sServiceOptionLifecycle) { - sync := NewRKEK8sServiceOptionLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) +func (s *rkeK8sServiceOptionClient) AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle RkeK8sServiceOptionLifecycle) { + sync := NewRkeK8sServiceOptionLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync) } -func (s *rkeK8sServiceOptionClient) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle RKEK8sServiceOptionLifecycle) { - sync := NewRKEK8sServiceOptionLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) +func (s *rkeK8sServiceOptionClient) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle RkeK8sServiceOptionLifecycle) { + sync := NewRkeK8sServiceOptionLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_rke_k8s_service_option_lifecycle_adapter.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_rke_k8s_service_option_lifecycle_adapter.go index 92100c4c..b6361733 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_rke_k8s_service_option_lifecycle_adapter.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_rke_k8s_service_option_lifecycle_adapter.go @@ -6,14 +6,14 @@ import ( "k8s.io/apimachinery/pkg/runtime" ) -type RKEK8sServiceOptionLifecycle interface { - Create(obj *RKEK8sServiceOption) (runtime.Object, error) - Remove(obj *RKEK8sServiceOption) (runtime.Object, error) - Updated(obj *RKEK8sServiceOption) (runtime.Object, error) +type RkeK8sServiceOptionLifecycle interface { + Create(obj *RkeK8sServiceOption) (runtime.Object, error) + Remove(obj *RkeK8sServiceOption) (runtime.Object, error) + Updated(obj *RkeK8sServiceOption) (runtime.Object, error) } type rkeK8sServiceOptionLifecycleAdapter struct { - lifecycle RKEK8sServiceOptionLifecycle + lifecycle RkeK8sServiceOptionLifecycle } func (w *rkeK8sServiceOptionLifecycleAdapter) HasCreate() bool { @@ -27,7 +27,7 @@ func (w *rkeK8sServiceOptionLifecycleAdapter) HasFinalize() bool { } func (w *rkeK8sServiceOptionLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Create(obj.(*RKEK8sServiceOption)) + o, err := w.lifecycle.Create(obj.(*RkeK8sServiceOption)) if o == nil { return nil, err } @@ -35,7 +35,7 @@ func (w *rkeK8sServiceOptionLifecycleAdapter) Create(obj runtime.Object) (runtim } func (w *rkeK8sServiceOptionLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Remove(obj.(*RKEK8sServiceOption)) + o, err := w.lifecycle.Remove(obj.(*RkeK8sServiceOption)) if o == nil { return nil, err } @@ -43,20 +43,20 @@ func (w *rkeK8sServiceOptionLifecycleAdapter) Finalize(obj runtime.Object) (runt } func (w *rkeK8sServiceOptionLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Updated(obj.(*RKEK8sServiceOption)) + o, err := w.lifecycle.Updated(obj.(*RkeK8sServiceOption)) if o == nil { return nil, err } return o, err } -func NewRKEK8sServiceOptionLifecycleAdapter(name string, clusterScoped bool, client RKEK8sServiceOptionInterface, l RKEK8sServiceOptionLifecycle) RKEK8sServiceOptionHandlerFunc { +func NewRkeK8sServiceOptionLifecycleAdapter(name string, clusterScoped bool, client RkeK8sServiceOptionInterface, l RkeK8sServiceOptionLifecycle) RkeK8sServiceOptionHandlerFunc { if clusterScoped { - resource.PutClusterScoped(RKEK8sServiceOptionGroupVersionResource) + resource.PutClusterScoped(RkeK8sServiceOptionGroupVersionResource) } adapter := &rkeK8sServiceOptionLifecycleAdapter{lifecycle: l} syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient()) - return func(key string, obj *RKEK8sServiceOption) (runtime.Object, error) { + return func(key string, obj *RkeK8sServiceOption) (runtime.Object, error) { newObj, err := syncFn(key, obj) if o, ok := newObj.(runtime.Object); ok { return o, err diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_rke_k8s_system_image_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_rke_k8s_system_image_controller.go index abd4b47c..358544b4 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_rke_k8s_system_image_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_rke_k8s_system_image_controller.go @@ -18,20 +18,20 @@ import ( ) var ( - RKEK8sSystemImageGroupVersionKind = schema.GroupVersionKind{ + RkeK8sSystemImageGroupVersionKind = schema.GroupVersionKind{ Version: Version, Group: GroupName, - Kind: "RKEK8sSystemImage", + Kind: "RkeK8sSystemImage", } - RKEK8sSystemImageResource = metav1.APIResource{ + RkeK8sSystemImageResource = metav1.APIResource{ Name: "rkek8ssystemimages", SingularName: "rkek8ssystemimage", Namespaced: true, - Kind: RKEK8sSystemImageGroupVersionKind.Kind, + Kind: RkeK8sSystemImageGroupVersionKind.Kind, } - RKEK8sSystemImageGroupVersionResource = schema.GroupVersionResource{ + RkeK8sSystemImageGroupVersionResource = schema.GroupVersionResource{ Group: GroupName, Version: Version, Resource: "rkek8ssystemimages", @@ -39,80 +39,78 @@ var ( ) func init() { - resource.Put(RKEK8sSystemImageGroupVersionResource) + resource.Put(RkeK8sSystemImageGroupVersionResource) } -func NewRKEK8sSystemImage(namespace, name string, obj RKEK8sSystemImage) *RKEK8sSystemImage { - obj.APIVersion, obj.Kind = RKEK8sSystemImageGroupVersionKind.ToAPIVersionAndKind() +func NewRkeK8sSystemImage(namespace, name string, obj RkeK8sSystemImage) *RkeK8sSystemImage { + obj.APIVersion, obj.Kind = RkeK8sSystemImageGroupVersionKind.ToAPIVersionAndKind() obj.Name = name obj.Namespace = namespace return &obj } -type RKEK8sSystemImageList struct { +type RkeK8sSystemImageList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []RKEK8sSystemImage `json:"items"` + Items []RkeK8sSystemImage `json:"items"` } -type RKEK8sSystemImageHandlerFunc func(key string, obj *RKEK8sSystemImage) (runtime.Object, error) +type RkeK8sSystemImageHandlerFunc func(key string, obj *RkeK8sSystemImage) (runtime.Object, error) -type RKEK8sSystemImageChangeHandlerFunc func(obj *RKEK8sSystemImage) (runtime.Object, error) +type RkeK8sSystemImageChangeHandlerFunc func(obj *RkeK8sSystemImage) (runtime.Object, error) -type RKEK8sSystemImageLister interface { - List(namespace string, selector labels.Selector) (ret []*RKEK8sSystemImage, err error) - Get(namespace, name string) (*RKEK8sSystemImage, error) +type RkeK8sSystemImageLister interface { + List(namespace string, selector labels.Selector) (ret []*RkeK8sSystemImage, err error) + Get(namespace, name string) (*RkeK8sSystemImage, error) } -type RKEK8sSystemImageController interface { +type RkeK8sSystemImageController interface { Generic() controller.GenericController Informer() cache.SharedIndexInformer - Lister() RKEK8sSystemImageLister - AddHandler(ctx context.Context, name string, handler RKEK8sSystemImageHandlerFunc) - AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RKEK8sSystemImageHandlerFunc) - AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler RKEK8sSystemImageHandlerFunc) - AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler RKEK8sSystemImageHandlerFunc) + Lister() RkeK8sSystemImageLister + AddHandler(ctx context.Context, name string, handler RkeK8sSystemImageHandlerFunc) + AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RkeK8sSystemImageHandlerFunc) + AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler RkeK8sSystemImageHandlerFunc) + AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler RkeK8sSystemImageHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } -type RKEK8sSystemImageInterface interface { +type RkeK8sSystemImageInterface interface { ObjectClient() *objectclient.ObjectClient - Create(*RKEK8sSystemImage) (*RKEK8sSystemImage, error) - GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RKEK8sSystemImage, error) - Get(name string, opts metav1.GetOptions) (*RKEK8sSystemImage, error) - Update(*RKEK8sSystemImage) (*RKEK8sSystemImage, error) + Create(*RkeK8sSystemImage) (*RkeK8sSystemImage, error) + GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RkeK8sSystemImage, error) + Get(name string, opts metav1.GetOptions) (*RkeK8sSystemImage, error) + Update(*RkeK8sSystemImage) (*RkeK8sSystemImage, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*RKEK8sSystemImageList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*RKEK8sSystemImageList, error) + List(opts metav1.ListOptions) (*RkeK8sSystemImageList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*RkeK8sSystemImageList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error - Controller() RKEK8sSystemImageController - AddHandler(ctx context.Context, name string, sync RKEK8sSystemImageHandlerFunc) - AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RKEK8sSystemImageHandlerFunc) - AddLifecycle(ctx context.Context, name string, lifecycle RKEK8sSystemImageLifecycle) - AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle RKEK8sSystemImageLifecycle) - AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync RKEK8sSystemImageHandlerFunc) - AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync RKEK8sSystemImageHandlerFunc) - AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle RKEK8sSystemImageLifecycle) - AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle RKEK8sSystemImageLifecycle) + Controller() RkeK8sSystemImageController + AddHandler(ctx context.Context, name string, sync RkeK8sSystemImageHandlerFunc) + AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RkeK8sSystemImageHandlerFunc) + AddLifecycle(ctx context.Context, name string, lifecycle RkeK8sSystemImageLifecycle) + AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle RkeK8sSystemImageLifecycle) + AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync RkeK8sSystemImageHandlerFunc) + AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync RkeK8sSystemImageHandlerFunc) + AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle RkeK8sSystemImageLifecycle) + AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle RkeK8sSystemImageLifecycle) } type rkeK8sSystemImageLister struct { controller *rkeK8sSystemImageController } -func (l *rkeK8sSystemImageLister) List(namespace string, selector labels.Selector) (ret []*RKEK8sSystemImage, err error) { +func (l *rkeK8sSystemImageLister) List(namespace string, selector labels.Selector) (ret []*RkeK8sSystemImage, err error) { err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) { - ret = append(ret, obj.(*RKEK8sSystemImage)) + ret = append(ret, obj.(*RkeK8sSystemImage)) }) return } -func (l *rkeK8sSystemImageLister) Get(namespace, name string) (*RKEK8sSystemImage, error) { +func (l *rkeK8sSystemImageLister) Get(namespace, name string) (*RkeK8sSystemImage, error) { var key string if namespace != "" { key = namespace + "/" + name @@ -125,11 +123,11 @@ func (l *rkeK8sSystemImageLister) Get(namespace, name string) (*RKEK8sSystemImag } if !exists { return nil, errors.NewNotFound(schema.GroupResource{ - Group: RKEK8sSystemImageGroupVersionKind.Group, - Resource: "rkeK8sSystemImage", + Group: RkeK8sSystemImageGroupVersionKind.Group, + Resource: RkeK8sSystemImageGroupVersionResource.Resource, }, key) } - return obj.(*RKEK8sSystemImage), nil + return obj.(*RkeK8sSystemImage), nil } type rkeK8sSystemImageController struct { @@ -140,17 +138,17 @@ func (c *rkeK8sSystemImageController) Generic() controller.GenericController { return c.GenericController } -func (c *rkeK8sSystemImageController) Lister() RKEK8sSystemImageLister { +func (c *rkeK8sSystemImageController) Lister() RkeK8sSystemImageLister { return &rkeK8sSystemImageLister{ controller: c, } } -func (c *rkeK8sSystemImageController) AddHandler(ctx context.Context, name string, handler RKEK8sSystemImageHandlerFunc) { +func (c *rkeK8sSystemImageController) AddHandler(ctx context.Context, name string, handler RkeK8sSystemImageHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*RKEK8sSystemImage); ok { + } else if v, ok := obj.(*RkeK8sSystemImage); ok { return handler(key, v) } else { return nil, nil @@ -158,13 +156,13 @@ func (c *rkeK8sSystemImageController) AddHandler(ctx context.Context, name strin }) } -func (c *rkeK8sSystemImageController) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, handler RKEK8sSystemImageHandlerFunc) { +func (c *rkeK8sSystemImageController) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, handler RkeK8sSystemImageHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if !enabled() { return nil, nil } else if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*RKEK8sSystemImage); ok { + } else if v, ok := obj.(*RkeK8sSystemImage); ok { return handler(key, v) } else { return nil, nil @@ -172,11 +170,11 @@ func (c *rkeK8sSystemImageController) AddFeatureHandler(ctx context.Context, ena }) } -func (c *rkeK8sSystemImageController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler RKEK8sSystemImageHandlerFunc) { +func (c *rkeK8sSystemImageController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler RkeK8sSystemImageHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*RKEK8sSystemImage); ok && controller.ObjectInCluster(cluster, obj) { + } else if v, ok := obj.(*RkeK8sSystemImage); ok && controller.ObjectInCluster(cluster, obj) { return handler(key, v) } else { return nil, nil @@ -184,13 +182,13 @@ func (c *rkeK8sSystemImageController) AddClusterScopedHandler(ctx context.Contex }) } -func (c *rkeK8sSystemImageController) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, cluster string, handler RKEK8sSystemImageHandlerFunc) { +func (c *rkeK8sSystemImageController) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, cluster string, handler RkeK8sSystemImageHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if !enabled() { return nil, nil } else if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*RKEK8sSystemImage); ok && controller.ObjectInCluster(cluster, obj) { + } else if v, ok := obj.(*RkeK8sSystemImage); ok && controller.ObjectInCluster(cluster, obj) { return handler(key, v) } else { return nil, nil @@ -202,64 +200,56 @@ type rkeK8sSystemImageFactory struct { } func (c rkeK8sSystemImageFactory) Object() runtime.Object { - return &RKEK8sSystemImage{} + return &RkeK8sSystemImage{} } func (c rkeK8sSystemImageFactory) List() runtime.Object { - return &RKEK8sSystemImageList{} + return &RkeK8sSystemImageList{} } -func (s *rkeK8sSystemImageClient) Controller() RKEK8sSystemImageController { - s.client.Lock() - defer s.client.Unlock() +func (s *rkeK8sSystemImageClient) Controller() RkeK8sSystemImageController { + genericController := controller.NewGenericController(RkeK8sSystemImageGroupVersionKind.Kind+"Controller", + s.client.controllerFactory.ForResourceKind(RkeK8sSystemImageGroupVersionResource, RkeK8sSystemImageGroupVersionKind.Kind, true)) - c, ok := s.client.rkeK8sSystemImageControllers[s.ns] - if ok { - return c - } - - genericController := controller.NewGenericController(RKEK8sSystemImageGroupVersionKind.Kind+"Controller", - s.objectClient) - - c = &rkeK8sSystemImageController{ + return &rkeK8sSystemImageController{ GenericController: genericController, } - - s.client.rkeK8sSystemImageControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type rkeK8sSystemImageClient struct { client *Client ns string objectClient *objectclient.ObjectClient - controller RKEK8sSystemImageController + controller RkeK8sSystemImageController } func (s *rkeK8sSystemImageClient) ObjectClient() *objectclient.ObjectClient { return s.objectClient } -func (s *rkeK8sSystemImageClient) Create(o *RKEK8sSystemImage) (*RKEK8sSystemImage, error) { +func (s *rkeK8sSystemImageClient) Create(o *RkeK8sSystemImage) (*RkeK8sSystemImage, error) { obj, err := s.objectClient.Create(o) - return obj.(*RKEK8sSystemImage), err + return obj.(*RkeK8sSystemImage), err } -func (s *rkeK8sSystemImageClient) Get(name string, opts metav1.GetOptions) (*RKEK8sSystemImage, error) { +func (s *rkeK8sSystemImageClient) Get(name string, opts metav1.GetOptions) (*RkeK8sSystemImage, error) { obj, err := s.objectClient.Get(name, opts) - return obj.(*RKEK8sSystemImage), err + return obj.(*RkeK8sSystemImage), err } -func (s *rkeK8sSystemImageClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RKEK8sSystemImage, error) { +func (s *rkeK8sSystemImageClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RkeK8sSystemImage, error) { obj, err := s.objectClient.GetNamespaced(namespace, name, opts) - return obj.(*RKEK8sSystemImage), err + return obj.(*RkeK8sSystemImage), err } -func (s *rkeK8sSystemImageClient) Update(o *RKEK8sSystemImage) (*RKEK8sSystemImage, error) { +func (s *rkeK8sSystemImageClient) Update(o *RkeK8sSystemImage) (*RkeK8sSystemImage, error) { obj, err := s.objectClient.Update(o.Name, o) - return obj.(*RKEK8sSystemImage), err + return obj.(*RkeK8sSystemImage), err +} + +func (s *rkeK8sSystemImageClient) UpdateStatus(o *RkeK8sSystemImage) (*RkeK8sSystemImage, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*RkeK8sSystemImage), err } func (s *rkeK8sSystemImageClient) Delete(name string, options *metav1.DeleteOptions) error { @@ -270,14 +260,14 @@ func (s *rkeK8sSystemImageClient) DeleteNamespaced(namespace, name string, optio return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *rkeK8sSystemImageClient) List(opts metav1.ListOptions) (*RKEK8sSystemImageList, error) { +func (s *rkeK8sSystemImageClient) List(opts metav1.ListOptions) (*RkeK8sSystemImageList, error) { obj, err := s.objectClient.List(opts) - return obj.(*RKEK8sSystemImageList), err + return obj.(*RkeK8sSystemImageList), err } -func (s *rkeK8sSystemImageClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*RKEK8sSystemImageList, error) { +func (s *rkeK8sSystemImageClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*RkeK8sSystemImageList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*RKEK8sSystemImageList), err + return obj.(*RkeK8sSystemImageList), err } func (s *rkeK8sSystemImageClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { @@ -285,47 +275,47 @@ func (s *rkeK8sSystemImageClient) Watch(opts metav1.ListOptions) (watch.Interfac } // Patch applies the patch and returns the patched deployment. -func (s *rkeK8sSystemImageClient) Patch(o *RKEK8sSystemImage, patchType types.PatchType, data []byte, subresources ...string) (*RKEK8sSystemImage, error) { +func (s *rkeK8sSystemImageClient) Patch(o *RkeK8sSystemImage, patchType types.PatchType, data []byte, subresources ...string) (*RkeK8sSystemImage, error) { obj, err := s.objectClient.Patch(o.Name, o, patchType, data, subresources...) - return obj.(*RKEK8sSystemImage), err + return obj.(*RkeK8sSystemImage), err } func (s *rkeK8sSystemImageClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error { return s.objectClient.DeleteCollection(deleteOpts, listOpts) } -func (s *rkeK8sSystemImageClient) AddHandler(ctx context.Context, name string, sync RKEK8sSystemImageHandlerFunc) { +func (s *rkeK8sSystemImageClient) AddHandler(ctx context.Context, name string, sync RkeK8sSystemImageHandlerFunc) { s.Controller().AddHandler(ctx, name, sync) } -func (s *rkeK8sSystemImageClient) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RKEK8sSystemImageHandlerFunc) { +func (s *rkeK8sSystemImageClient) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RkeK8sSystemImageHandlerFunc) { s.Controller().AddFeatureHandler(ctx, enabled, name, sync) } -func (s *rkeK8sSystemImageClient) AddLifecycle(ctx context.Context, name string, lifecycle RKEK8sSystemImageLifecycle) { - sync := NewRKEK8sSystemImageLifecycleAdapter(name, false, s, lifecycle) +func (s *rkeK8sSystemImageClient) AddLifecycle(ctx context.Context, name string, lifecycle RkeK8sSystemImageLifecycle) { + sync := NewRkeK8sSystemImageLifecycleAdapter(name, false, s, lifecycle) s.Controller().AddHandler(ctx, name, sync) } -func (s *rkeK8sSystemImageClient) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle RKEK8sSystemImageLifecycle) { - sync := NewRKEK8sSystemImageLifecycleAdapter(name, false, s, lifecycle) +func (s *rkeK8sSystemImageClient) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle RkeK8sSystemImageLifecycle) { + sync := NewRkeK8sSystemImageLifecycleAdapter(name, false, s, lifecycle) s.Controller().AddFeatureHandler(ctx, enabled, name, sync) } -func (s *rkeK8sSystemImageClient) AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync RKEK8sSystemImageHandlerFunc) { +func (s *rkeK8sSystemImageClient) AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync RkeK8sSystemImageHandlerFunc) { s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync) } -func (s *rkeK8sSystemImageClient) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync RKEK8sSystemImageHandlerFunc) { +func (s *rkeK8sSystemImageClient) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync RkeK8sSystemImageHandlerFunc) { s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync) } -func (s *rkeK8sSystemImageClient) AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle RKEK8sSystemImageLifecycle) { - sync := NewRKEK8sSystemImageLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) +func (s *rkeK8sSystemImageClient) AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle RkeK8sSystemImageLifecycle) { + sync := NewRkeK8sSystemImageLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync) } -func (s *rkeK8sSystemImageClient) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle RKEK8sSystemImageLifecycle) { - sync := NewRKEK8sSystemImageLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) +func (s *rkeK8sSystemImageClient) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle RkeK8sSystemImageLifecycle) { + sync := NewRkeK8sSystemImageLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_rke_k8s_system_image_lifecycle_adapter.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_rke_k8s_system_image_lifecycle_adapter.go index e88af380..5d5a9dc1 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_rke_k8s_system_image_lifecycle_adapter.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_rke_k8s_system_image_lifecycle_adapter.go @@ -6,14 +6,14 @@ import ( "k8s.io/apimachinery/pkg/runtime" ) -type RKEK8sSystemImageLifecycle interface { - Create(obj *RKEK8sSystemImage) (runtime.Object, error) - Remove(obj *RKEK8sSystemImage) (runtime.Object, error) - Updated(obj *RKEK8sSystemImage) (runtime.Object, error) +type RkeK8sSystemImageLifecycle interface { + Create(obj *RkeK8sSystemImage) (runtime.Object, error) + Remove(obj *RkeK8sSystemImage) (runtime.Object, error) + Updated(obj *RkeK8sSystemImage) (runtime.Object, error) } type rkeK8sSystemImageLifecycleAdapter struct { - lifecycle RKEK8sSystemImageLifecycle + lifecycle RkeK8sSystemImageLifecycle } func (w *rkeK8sSystemImageLifecycleAdapter) HasCreate() bool { @@ -27,7 +27,7 @@ func (w *rkeK8sSystemImageLifecycleAdapter) HasFinalize() bool { } func (w *rkeK8sSystemImageLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Create(obj.(*RKEK8sSystemImage)) + o, err := w.lifecycle.Create(obj.(*RkeK8sSystemImage)) if o == nil { return nil, err } @@ -35,7 +35,7 @@ func (w *rkeK8sSystemImageLifecycleAdapter) Create(obj runtime.Object) (runtime. } func (w *rkeK8sSystemImageLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Remove(obj.(*RKEK8sSystemImage)) + o, err := w.lifecycle.Remove(obj.(*RkeK8sSystemImage)) if o == nil { return nil, err } @@ -43,20 +43,20 @@ func (w *rkeK8sSystemImageLifecycleAdapter) Finalize(obj runtime.Object) (runtim } func (w *rkeK8sSystemImageLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Updated(obj.(*RKEK8sSystemImage)) + o, err := w.lifecycle.Updated(obj.(*RkeK8sSystemImage)) if o == nil { return nil, err } return o, err } -func NewRKEK8sSystemImageLifecycleAdapter(name string, clusterScoped bool, client RKEK8sSystemImageInterface, l RKEK8sSystemImageLifecycle) RKEK8sSystemImageHandlerFunc { +func NewRkeK8sSystemImageLifecycleAdapter(name string, clusterScoped bool, client RkeK8sSystemImageInterface, l RkeK8sSystemImageLifecycle) RkeK8sSystemImageHandlerFunc { if clusterScoped { - resource.PutClusterScoped(RKEK8sSystemImageGroupVersionResource) + resource.PutClusterScoped(RkeK8sSystemImageGroupVersionResource) } adapter := &rkeK8sSystemImageLifecycleAdapter{lifecycle: l} syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient()) - return func(key string, obj *RKEK8sSystemImage) (runtime.Object, error) { + return func(key string, obj *RkeK8sSystemImage) (runtime.Object, error) { newObj, err := syncFn(key, obj) if o, ok := newObj.(runtime.Object); ok { return o, err diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_role_template_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_role_template_controller.go index f61abaa1..fbd9e400 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_role_template_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_role_template_controller.go @@ -73,8 +73,6 @@ type RoleTemplateController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler RoleTemplateHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type RoleTemplateInterface interface { @@ -125,7 +123,7 @@ func (l *roleTemplateLister) Get(namespace, name string) (*RoleTemplate, error) if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: RoleTemplateGroupVersionKind.Group, - Resource: "roleTemplate", + Resource: RoleTemplateGroupVersionResource.Resource, }, key) } return obj.(*RoleTemplate), nil @@ -209,25 +207,12 @@ func (c roleTemplateFactory) List() runtime.Object { } func (s *roleTemplateClient) Controller() RoleTemplateController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.roleTemplateControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(RoleTemplateGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(RoleTemplateGroupVersionResource, RoleTemplateGroupVersionKind.Kind, false)) - c = &roleTemplateController{ + return &roleTemplateController{ GenericController: genericController, } - - s.client.roleTemplateControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type roleTemplateClient struct { @@ -261,6 +246,11 @@ func (s *roleTemplateClient) Update(o *RoleTemplate) (*RoleTemplate, error) { return obj.(*RoleTemplate), err } +func (s *roleTemplateClient) UpdateStatus(o *RoleTemplate) (*RoleTemplate, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*RoleTemplate), err +} + func (s *roleTemplateClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_scheme.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_scheme.go index 5cb495f5..31393239 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_scheme.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_scheme.go @@ -93,6 +93,7 @@ func addKnownTypes(scheme *runtime.Scheme) error { &Preference{}, &PreferenceList{}, &UserAttribute{}, + &UserAttributeList{}, &ProjectNetworkPolicy{}, &ProjectNetworkPolicyList{}, &ClusterLogging{}, @@ -127,8 +128,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &MultiClusterAppList{}, &MultiClusterAppRevision{}, &MultiClusterAppRevisionList{}, - &GlobalDNS{}, - &GlobalDNSList{}, + &GlobalDns{}, + &GlobalDnsList{}, &GlobalDNSProvider{}, &GlobalDNSProviderList{}, &KontainerDriver{}, @@ -149,12 +150,12 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ClusterTemplateList{}, &ClusterTemplateRevision{}, &ClusterTemplateRevisionList{}, - &RKEK8sSystemImage{}, - &RKEK8sSystemImageList{}, - &RKEK8sServiceOption{}, - &RKEK8sServiceOptionList{}, - &RKEAddon{}, - &RKEAddonList{}, + &RkeK8sSystemImage{}, + &RkeK8sSystemImageList{}, + &RkeK8sServiceOption{}, + &RkeK8sServiceOptionList{}, + &RkeAddon{}, + &RkeAddonList{}, &CisConfig{}, &CisConfigList{}, &CisBenchmarkVersion{}, diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_setting_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_setting_controller.go index 70ce9c91..5f36d855 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_setting_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_setting_controller.go @@ -73,8 +73,6 @@ type SettingController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler SettingHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type SettingInterface interface { @@ -125,7 +123,7 @@ func (l *settingLister) Get(namespace, name string) (*Setting, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: SettingGroupVersionKind.Group, - Resource: "setting", + Resource: SettingGroupVersionResource.Resource, }, key) } return obj.(*Setting), nil @@ -209,25 +207,12 @@ func (c settingFactory) List() runtime.Object { } func (s *settingClient) Controller() SettingController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.settingControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(SettingGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(SettingGroupVersionResource, SettingGroupVersionKind.Kind, false)) - c = &settingController{ + return &settingController{ GenericController: genericController, } - - s.client.settingControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type settingClient struct { @@ -261,6 +246,11 @@ func (s *settingClient) Update(o *Setting) (*Setting, error) { return obj.(*Setting), err } +func (s *settingClient) UpdateStatus(o *Setting) (*Setting, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Setting), err +} + func (s *settingClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_template_content_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_template_content_controller.go index 63b0e880..6e9c875f 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_template_content_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_template_content_controller.go @@ -73,8 +73,6 @@ type TemplateContentController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler TemplateContentHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type TemplateContentInterface interface { @@ -125,7 +123,7 @@ func (l *templateContentLister) Get(namespace, name string) (*TemplateContent, e if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: TemplateContentGroupVersionKind.Group, - Resource: "templateContent", + Resource: TemplateContentGroupVersionResource.Resource, }, key) } return obj.(*TemplateContent), nil @@ -209,25 +207,12 @@ func (c templateContentFactory) List() runtime.Object { } func (s *templateContentClient) Controller() TemplateContentController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.templateContentControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(TemplateContentGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(TemplateContentGroupVersionResource, TemplateContentGroupVersionKind.Kind, false)) - c = &templateContentController{ + return &templateContentController{ GenericController: genericController, } - - s.client.templateContentControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type templateContentClient struct { @@ -261,6 +246,11 @@ func (s *templateContentClient) Update(o *TemplateContent) (*TemplateContent, er return obj.(*TemplateContent), err } +func (s *templateContentClient) UpdateStatus(o *TemplateContent) (*TemplateContent, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*TemplateContent), err +} + func (s *templateContentClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_template_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_template_controller.go index 805093f0..de65fc8c 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_template_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_template_controller.go @@ -73,8 +73,6 @@ type TemplateController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler TemplateHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type TemplateInterface interface { @@ -125,7 +123,7 @@ func (l *templateLister) Get(namespace, name string) (*Template, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: TemplateGroupVersionKind.Group, - Resource: "template", + Resource: TemplateGroupVersionResource.Resource, }, key) } return obj.(*Template), nil @@ -209,25 +207,12 @@ func (c templateFactory) List() runtime.Object { } func (s *templateClient) Controller() TemplateController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.templateControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(TemplateGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(TemplateGroupVersionResource, TemplateGroupVersionKind.Kind, false)) - c = &templateController{ + return &templateController{ GenericController: genericController, } - - s.client.templateControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type templateClient struct { @@ -261,6 +246,11 @@ func (s *templateClient) Update(o *Template) (*Template, error) { return obj.(*Template), err } +func (s *templateClient) UpdateStatus(o *Template) (*Template, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Template), err +} + func (s *templateClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_template_version_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_template_version_controller.go index 0eae5e60..5702da31 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_template_version_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_template_version_controller.go @@ -73,8 +73,6 @@ type TemplateVersionController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler TemplateVersionHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type TemplateVersionInterface interface { @@ -125,7 +123,7 @@ func (l *templateVersionLister) Get(namespace, name string) (*TemplateVersion, e if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: TemplateVersionGroupVersionKind.Group, - Resource: "templateVersion", + Resource: TemplateVersionGroupVersionResource.Resource, }, key) } return obj.(*TemplateVersion), nil @@ -209,25 +207,12 @@ func (c templateVersionFactory) List() runtime.Object { } func (s *templateVersionClient) Controller() TemplateVersionController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.templateVersionControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(TemplateVersionGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(TemplateVersionGroupVersionResource, TemplateVersionGroupVersionKind.Kind, false)) - c = &templateVersionController{ + return &templateVersionController{ GenericController: genericController, } - - s.client.templateVersionControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type templateVersionClient struct { @@ -261,6 +246,11 @@ func (s *templateVersionClient) Update(o *TemplateVersion) (*TemplateVersion, er return obj.(*TemplateVersion), err } +func (s *templateVersionClient) UpdateStatus(o *TemplateVersion) (*TemplateVersion, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*TemplateVersion), err +} + func (s *templateVersionClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_token_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_token_controller.go index 23e9694d..c2211c9b 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_token_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_token_controller.go @@ -73,8 +73,6 @@ type TokenController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler TokenHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type TokenInterface interface { @@ -125,7 +123,7 @@ func (l *tokenLister) Get(namespace, name string) (*Token, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: TokenGroupVersionKind.Group, - Resource: "token", + Resource: TokenGroupVersionResource.Resource, }, key) } return obj.(*Token), nil @@ -209,25 +207,12 @@ func (c tokenFactory) List() runtime.Object { } func (s *tokenClient) Controller() TokenController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.tokenControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(TokenGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(TokenGroupVersionResource, TokenGroupVersionKind.Kind, false)) - c = &tokenController{ + return &tokenController{ GenericController: genericController, } - - s.client.tokenControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type tokenClient struct { @@ -261,6 +246,11 @@ func (s *tokenClient) Update(o *Token) (*Token, error) { return obj.(*Token), err } +func (s *tokenClient) UpdateStatus(o *Token) (*Token, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Token), err +} + func (s *tokenClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_user_attribute_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_user_attribute_controller.go index 04595870..6acc633f 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_user_attribute_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_user_attribute_controller.go @@ -73,8 +73,6 @@ type UserAttributeController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler UserAttributeHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type UserAttributeInterface interface { @@ -125,7 +123,7 @@ func (l *userAttributeLister) Get(namespace, name string) (*UserAttribute, error if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: UserAttributeGroupVersionKind.Group, - Resource: "userAttribute", + Resource: UserAttributeGroupVersionResource.Resource, }, key) } return obj.(*UserAttribute), nil @@ -209,25 +207,12 @@ func (c userAttributeFactory) List() runtime.Object { } func (s *userAttributeClient) Controller() UserAttributeController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.userAttributeControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(UserAttributeGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(UserAttributeGroupVersionResource, UserAttributeGroupVersionKind.Kind, false)) - c = &userAttributeController{ + return &userAttributeController{ GenericController: genericController, } - - s.client.userAttributeControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type userAttributeClient struct { @@ -261,6 +246,11 @@ func (s *userAttributeClient) Update(o *UserAttribute) (*UserAttribute, error) { return obj.(*UserAttribute), err } +func (s *userAttributeClient) UpdateStatus(o *UserAttribute) (*UserAttribute, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*UserAttribute), err +} + func (s *userAttributeClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_user_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_user_controller.go index 2ee252ba..051007c4 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_user_controller.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_user_controller.go @@ -73,8 +73,6 @@ type UserController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler UserHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type UserInterface interface { @@ -125,7 +123,7 @@ func (l *userLister) Get(namespace, name string) (*User, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: UserGroupVersionKind.Group, - Resource: "user", + Resource: UserGroupVersionResource.Resource, }, key) } return obj.(*User), nil @@ -209,25 +207,12 @@ func (c userFactory) List() runtime.Object { } func (s *userClient) Controller() UserController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.userControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(UserGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(UserGroupVersionResource, UserGroupVersionKind.Kind, false)) - c = &userController{ + return &userController{ GenericController: genericController, } - - s.client.userControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type userClient struct { @@ -261,6 +246,11 @@ func (s *userClient) Update(o *User) (*User, error) { return obj.(*User), err } +func (s *userClient) UpdateStatus(o *User) (*User, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*User), err +} + func (s *userClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_app_controller.go b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_app_controller.go index 95b429e8..ead9e7de 100644 --- a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_app_controller.go +++ b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_app_controller.go @@ -74,8 +74,6 @@ type AppController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler AppHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type AppInterface interface { @@ -126,7 +124,7 @@ func (l *appLister) Get(namespace, name string) (*App, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: AppGroupVersionKind.Group, - Resource: "app", + Resource: AppGroupVersionResource.Resource, }, key) } return obj.(*App), nil @@ -210,25 +208,12 @@ func (c appFactory) List() runtime.Object { } func (s *appClient) Controller() AppController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.appControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(AppGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(AppGroupVersionResource, AppGroupVersionKind.Kind, true)) - c = &appController{ + return &appController{ GenericController: genericController, } - - s.client.appControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type appClient struct { @@ -262,6 +247,11 @@ func (s *appClient) Update(o *App) (*App, error) { return obj.(*App), err } +func (s *appClient) UpdateStatus(o *App) (*App, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*App), err +} + func (s *appClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_app_revision_controller.go b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_app_revision_controller.go index fe14914e..a609bc20 100644 --- a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_app_revision_controller.go +++ b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_app_revision_controller.go @@ -74,8 +74,6 @@ type AppRevisionController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler AppRevisionHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type AppRevisionInterface interface { @@ -126,7 +124,7 @@ func (l *appRevisionLister) Get(namespace, name string) (*AppRevision, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: AppRevisionGroupVersionKind.Group, - Resource: "appRevision", + Resource: AppRevisionGroupVersionResource.Resource, }, key) } return obj.(*AppRevision), nil @@ -210,25 +208,12 @@ func (c appRevisionFactory) List() runtime.Object { } func (s *appRevisionClient) Controller() AppRevisionController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.appRevisionControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(AppRevisionGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(AppRevisionGroupVersionResource, AppRevisionGroupVersionKind.Kind, true)) - c = &appRevisionController{ + return &appRevisionController{ GenericController: genericController, } - - s.client.appRevisionControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type appRevisionClient struct { @@ -262,6 +247,11 @@ func (s *appRevisionClient) Update(o *AppRevision) (*AppRevision, error) { return obj.(*AppRevision), err } +func (s *appRevisionClient) UpdateStatus(o *AppRevision) (*AppRevision, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*AppRevision), err +} + func (s *appRevisionClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_basic_auth_controller.go b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_basic_auth_controller.go index 01437ce5..4bc6cc88 100644 --- a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_basic_auth_controller.go +++ b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_basic_auth_controller.go @@ -74,8 +74,6 @@ type BasicAuthController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler BasicAuthHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type BasicAuthInterface interface { @@ -126,7 +124,7 @@ func (l *basicAuthLister) Get(namespace, name string) (*BasicAuth, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: BasicAuthGroupVersionKind.Group, - Resource: "basicAuth", + Resource: BasicAuthGroupVersionResource.Resource, }, key) } return obj.(*BasicAuth), nil @@ -210,25 +208,12 @@ func (c basicAuthFactory) List() runtime.Object { } func (s *basicAuthClient) Controller() BasicAuthController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.basicAuthControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(BasicAuthGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(BasicAuthGroupVersionResource, BasicAuthGroupVersionKind.Kind, true)) - c = &basicAuthController{ + return &basicAuthController{ GenericController: genericController, } - - s.client.basicAuthControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type basicAuthClient struct { @@ -262,6 +247,11 @@ func (s *basicAuthClient) Update(o *BasicAuth) (*BasicAuth, error) { return obj.(*BasicAuth), err } +func (s *basicAuthClient) UpdateStatus(o *BasicAuth) (*BasicAuth, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*BasicAuth), err +} + func (s *basicAuthClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_certificate_controller.go b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_certificate_controller.go index 09b9b5c6..cfe2fa87 100644 --- a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_certificate_controller.go +++ b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_certificate_controller.go @@ -74,8 +74,6 @@ type CertificateController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler CertificateHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type CertificateInterface interface { @@ -126,7 +124,7 @@ func (l *certificateLister) Get(namespace, name string) (*Certificate, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: CertificateGroupVersionKind.Group, - Resource: "certificate", + Resource: CertificateGroupVersionResource.Resource, }, key) } return obj.(*Certificate), nil @@ -210,25 +208,12 @@ func (c certificateFactory) List() runtime.Object { } func (s *certificateClient) Controller() CertificateController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.certificateControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(CertificateGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(CertificateGroupVersionResource, CertificateGroupVersionKind.Kind, true)) - c = &certificateController{ + return &certificateController{ GenericController: genericController, } - - s.client.certificateControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type certificateClient struct { @@ -262,6 +247,11 @@ func (s *certificateClient) Update(o *Certificate) (*Certificate, error) { return obj.(*Certificate), err } +func (s *certificateClient) UpdateStatus(o *Certificate) (*Certificate, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Certificate), err +} + func (s *certificateClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_docker_credential_controller.go b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_docker_credential_controller.go index 4709658e..9b337f7d 100644 --- a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_docker_credential_controller.go +++ b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_docker_credential_controller.go @@ -74,8 +74,6 @@ type DockerCredentialController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler DockerCredentialHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type DockerCredentialInterface interface { @@ -126,7 +124,7 @@ func (l *dockerCredentialLister) Get(namespace, name string) (*DockerCredential, if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: DockerCredentialGroupVersionKind.Group, - Resource: "dockerCredential", + Resource: DockerCredentialGroupVersionResource.Resource, }, key) } return obj.(*DockerCredential), nil @@ -210,25 +208,12 @@ func (c dockerCredentialFactory) List() runtime.Object { } func (s *dockerCredentialClient) Controller() DockerCredentialController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.dockerCredentialControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(DockerCredentialGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(DockerCredentialGroupVersionResource, DockerCredentialGroupVersionKind.Kind, true)) - c = &dockerCredentialController{ + return &dockerCredentialController{ GenericController: genericController, } - - s.client.dockerCredentialControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type dockerCredentialClient struct { @@ -262,6 +247,11 @@ func (s *dockerCredentialClient) Update(o *DockerCredential) (*DockerCredential, return obj.(*DockerCredential), err } +func (s *dockerCredentialClient) UpdateStatus(o *DockerCredential) (*DockerCredential, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*DockerCredential), err +} + func (s *dockerCredentialClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_k8s_client.go b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_k8s_client.go index 2ae3b928..a046f50c 100644 --- a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_k8s_client.go +++ b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_k8s_client.go @@ -1,25 +1,14 @@ package v3 import ( - "context" - "sync" - - "github.com/rancher/norman/controller" + "github.com/rancher/lasso/pkg/client" + "github.com/rancher/lasso/pkg/controller" "github.com/rancher/norman/objectclient" - "github.com/rancher/norman/objectclient/dynamic" - "github.com/rancher/norman/restwatch" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/rest" ) -type ( - contextKeyType struct{} - contextClientsKeyType struct{} -) - type Interface interface { - RESTClient() rest.Interface - controller.Starter - ServiceAccountTokensGetter DockerCredentialsGetter CertificatesGetter @@ -43,86 +32,36 @@ type Interface interface { } type Client struct { - sync.Mutex - restClient rest.Interface - starters []controller.Starter - - serviceAccountTokenControllers map[string]ServiceAccountTokenController - dockerCredentialControllers map[string]DockerCredentialController - certificateControllers map[string]CertificateController - basicAuthControllers map[string]BasicAuthController - sshAuthControllers map[string]SSHAuthController - namespacedServiceAccountTokenControllers map[string]NamespacedServiceAccountTokenController - namespacedDockerCredentialControllers map[string]NamespacedDockerCredentialController - namespacedCertificateControllers map[string]NamespacedCertificateController - namespacedBasicAuthControllers map[string]NamespacedBasicAuthController - namespacedSshAuthControllers map[string]NamespacedSSHAuthController - workloadControllers map[string]WorkloadController - appControllers map[string]AppController - appRevisionControllers map[string]AppRevisionController - sourceCodeProviderControllers map[string]SourceCodeProviderController - sourceCodeProviderConfigControllers map[string]SourceCodeProviderConfigController - sourceCodeCredentialControllers map[string]SourceCodeCredentialController - pipelineControllers map[string]PipelineController - pipelineExecutionControllers map[string]PipelineExecutionController - pipelineSettingControllers map[string]PipelineSettingController - sourceCodeRepositoryControllers map[string]SourceCodeRepositoryController + controllerFactory controller.SharedControllerFactory + clientFactory client.SharedClientFactory } -func NewForConfig(config rest.Config) (Interface, error) { - if config.NegotiatedSerializer == nil { - config.NegotiatedSerializer = dynamic.NegotiatedSerializer +func NewForConfig(cfg rest.Config) (Interface, error) { + scheme := runtime.NewScheme() + if err := AddToScheme(scheme); err != nil { + return nil, err } - - restClient, err := restwatch.UnversionedRESTClientFor(&config) + controllerFactory, err := controller.NewSharedControllerFactoryFromConfig(&cfg, scheme) if err != nil { return nil, err } + return NewFromControllerFactory(controllerFactory) +} +func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error) { return &Client{ - restClient: restClient, - - serviceAccountTokenControllers: map[string]ServiceAccountTokenController{}, - dockerCredentialControllers: map[string]DockerCredentialController{}, - certificateControllers: map[string]CertificateController{}, - basicAuthControllers: map[string]BasicAuthController{}, - sshAuthControllers: map[string]SSHAuthController{}, - namespacedServiceAccountTokenControllers: map[string]NamespacedServiceAccountTokenController{}, - namespacedDockerCredentialControllers: map[string]NamespacedDockerCredentialController{}, - namespacedCertificateControllers: map[string]NamespacedCertificateController{}, - namespacedBasicAuthControllers: map[string]NamespacedBasicAuthController{}, - namespacedSshAuthControllers: map[string]NamespacedSSHAuthController{}, - workloadControllers: map[string]WorkloadController{}, - appControllers: map[string]AppController{}, - appRevisionControllers: map[string]AppRevisionController{}, - sourceCodeProviderControllers: map[string]SourceCodeProviderController{}, - sourceCodeProviderConfigControllers: map[string]SourceCodeProviderConfigController{}, - sourceCodeCredentialControllers: map[string]SourceCodeCredentialController{}, - pipelineControllers: map[string]PipelineController{}, - pipelineExecutionControllers: map[string]PipelineExecutionController{}, - pipelineSettingControllers: map[string]PipelineSettingController{}, - sourceCodeRepositoryControllers: map[string]SourceCodeRepositoryController{}, + controllerFactory: factory, + clientFactory: factory.SharedCacheFactory().SharedClientFactory(), }, nil } -func (c *Client) RESTClient() rest.Interface { - return c.restClient -} - -func (c *Client) Sync(ctx context.Context) error { - return controller.Sync(ctx, c.starters...) -} - -func (c *Client) Start(ctx context.Context, threadiness int) error { - return controller.Start(ctx, threadiness, c.starters...) -} - type ServiceAccountTokensGetter interface { ServiceAccountTokens(namespace string) ServiceAccountTokenInterface } func (c *Client) ServiceAccountTokens(namespace string) ServiceAccountTokenInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ServiceAccountTokenResource, ServiceAccountTokenGroupVersionKind, serviceAccountTokenFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ServiceAccountTokenGroupVersionResource, ServiceAccountTokenGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ServiceAccountTokenResource, ServiceAccountTokenGroupVersionKind, serviceAccountTokenFactory{}) return &serviceAccountTokenClient{ ns: namespace, client: c, @@ -135,7 +74,8 @@ type DockerCredentialsGetter interface { } func (c *Client) DockerCredentials(namespace string) DockerCredentialInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &DockerCredentialResource, DockerCredentialGroupVersionKind, dockerCredentialFactory{}) + sharedClient := c.clientFactory.ForResourceKind(DockerCredentialGroupVersionResource, DockerCredentialGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &DockerCredentialResource, DockerCredentialGroupVersionKind, dockerCredentialFactory{}) return &dockerCredentialClient{ ns: namespace, client: c, @@ -148,7 +88,8 @@ type CertificatesGetter interface { } func (c *Client) Certificates(namespace string) CertificateInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &CertificateResource, CertificateGroupVersionKind, certificateFactory{}) + sharedClient := c.clientFactory.ForResourceKind(CertificateGroupVersionResource, CertificateGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &CertificateResource, CertificateGroupVersionKind, certificateFactory{}) return &certificateClient{ ns: namespace, client: c, @@ -161,7 +102,8 @@ type BasicAuthsGetter interface { } func (c *Client) BasicAuths(namespace string) BasicAuthInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &BasicAuthResource, BasicAuthGroupVersionKind, basicAuthFactory{}) + sharedClient := c.clientFactory.ForResourceKind(BasicAuthGroupVersionResource, BasicAuthGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &BasicAuthResource, BasicAuthGroupVersionKind, basicAuthFactory{}) return &basicAuthClient{ ns: namespace, client: c, @@ -174,7 +116,8 @@ type SSHAuthsGetter interface { } func (c *Client) SSHAuths(namespace string) SSHAuthInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &SSHAuthResource, SSHAuthGroupVersionKind, sshAuthFactory{}) + sharedClient := c.clientFactory.ForResourceKind(SSHAuthGroupVersionResource, SSHAuthGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &SSHAuthResource, SSHAuthGroupVersionKind, sshAuthFactory{}) return &sshAuthClient{ ns: namespace, client: c, @@ -187,7 +130,8 @@ type NamespacedServiceAccountTokensGetter interface { } func (c *Client) NamespacedServiceAccountTokens(namespace string) NamespacedServiceAccountTokenInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &NamespacedServiceAccountTokenResource, NamespacedServiceAccountTokenGroupVersionKind, namespacedServiceAccountTokenFactory{}) + sharedClient := c.clientFactory.ForResourceKind(NamespacedServiceAccountTokenGroupVersionResource, NamespacedServiceAccountTokenGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &NamespacedServiceAccountTokenResource, NamespacedServiceAccountTokenGroupVersionKind, namespacedServiceAccountTokenFactory{}) return &namespacedServiceAccountTokenClient{ ns: namespace, client: c, @@ -200,7 +144,8 @@ type NamespacedDockerCredentialsGetter interface { } func (c *Client) NamespacedDockerCredentials(namespace string) NamespacedDockerCredentialInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &NamespacedDockerCredentialResource, NamespacedDockerCredentialGroupVersionKind, namespacedDockerCredentialFactory{}) + sharedClient := c.clientFactory.ForResourceKind(NamespacedDockerCredentialGroupVersionResource, NamespacedDockerCredentialGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &NamespacedDockerCredentialResource, NamespacedDockerCredentialGroupVersionKind, namespacedDockerCredentialFactory{}) return &namespacedDockerCredentialClient{ ns: namespace, client: c, @@ -213,7 +158,8 @@ type NamespacedCertificatesGetter interface { } func (c *Client) NamespacedCertificates(namespace string) NamespacedCertificateInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &NamespacedCertificateResource, NamespacedCertificateGroupVersionKind, namespacedCertificateFactory{}) + sharedClient := c.clientFactory.ForResourceKind(NamespacedCertificateGroupVersionResource, NamespacedCertificateGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &NamespacedCertificateResource, NamespacedCertificateGroupVersionKind, namespacedCertificateFactory{}) return &namespacedCertificateClient{ ns: namespace, client: c, @@ -226,7 +172,8 @@ type NamespacedBasicAuthsGetter interface { } func (c *Client) NamespacedBasicAuths(namespace string) NamespacedBasicAuthInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &NamespacedBasicAuthResource, NamespacedBasicAuthGroupVersionKind, namespacedBasicAuthFactory{}) + sharedClient := c.clientFactory.ForResourceKind(NamespacedBasicAuthGroupVersionResource, NamespacedBasicAuthGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &NamespacedBasicAuthResource, NamespacedBasicAuthGroupVersionKind, namespacedBasicAuthFactory{}) return &namespacedBasicAuthClient{ ns: namespace, client: c, @@ -239,7 +186,8 @@ type NamespacedSSHAuthsGetter interface { } func (c *Client) NamespacedSSHAuths(namespace string) NamespacedSSHAuthInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &NamespacedSSHAuthResource, NamespacedSSHAuthGroupVersionKind, namespacedSshAuthFactory{}) + sharedClient := c.clientFactory.ForResourceKind(NamespacedSSHAuthGroupVersionResource, NamespacedSSHAuthGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &NamespacedSSHAuthResource, NamespacedSSHAuthGroupVersionKind, namespacedSshAuthFactory{}) return &namespacedSshAuthClient{ ns: namespace, client: c, @@ -252,7 +200,8 @@ type WorkloadsGetter interface { } func (c *Client) Workloads(namespace string) WorkloadInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &WorkloadResource, WorkloadGroupVersionKind, workloadFactory{}) + sharedClient := c.clientFactory.ForResourceKind(WorkloadGroupVersionResource, WorkloadGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &WorkloadResource, WorkloadGroupVersionKind, workloadFactory{}) return &workloadClient{ ns: namespace, client: c, @@ -265,7 +214,8 @@ type AppsGetter interface { } func (c *Client) Apps(namespace string) AppInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &AppResource, AppGroupVersionKind, appFactory{}) + sharedClient := c.clientFactory.ForResourceKind(AppGroupVersionResource, AppGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &AppResource, AppGroupVersionKind, appFactory{}) return &appClient{ ns: namespace, client: c, @@ -278,7 +228,8 @@ type AppRevisionsGetter interface { } func (c *Client) AppRevisions(namespace string) AppRevisionInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &AppRevisionResource, AppRevisionGroupVersionKind, appRevisionFactory{}) + sharedClient := c.clientFactory.ForResourceKind(AppRevisionGroupVersionResource, AppRevisionGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &AppRevisionResource, AppRevisionGroupVersionKind, appRevisionFactory{}) return &appRevisionClient{ ns: namespace, client: c, @@ -291,7 +242,8 @@ type SourceCodeProvidersGetter interface { } func (c *Client) SourceCodeProviders(namespace string) SourceCodeProviderInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &SourceCodeProviderResource, SourceCodeProviderGroupVersionKind, sourceCodeProviderFactory{}) + sharedClient := c.clientFactory.ForResourceKind(SourceCodeProviderGroupVersionResource, SourceCodeProviderGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &SourceCodeProviderResource, SourceCodeProviderGroupVersionKind, sourceCodeProviderFactory{}) return &sourceCodeProviderClient{ ns: namespace, client: c, @@ -304,7 +256,8 @@ type SourceCodeProviderConfigsGetter interface { } func (c *Client) SourceCodeProviderConfigs(namespace string) SourceCodeProviderConfigInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &SourceCodeProviderConfigResource, SourceCodeProviderConfigGroupVersionKind, sourceCodeProviderConfigFactory{}) + sharedClient := c.clientFactory.ForResourceKind(SourceCodeProviderConfigGroupVersionResource, SourceCodeProviderConfigGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &SourceCodeProviderConfigResource, SourceCodeProviderConfigGroupVersionKind, sourceCodeProviderConfigFactory{}) return &sourceCodeProviderConfigClient{ ns: namespace, client: c, @@ -317,7 +270,8 @@ type SourceCodeCredentialsGetter interface { } func (c *Client) SourceCodeCredentials(namespace string) SourceCodeCredentialInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &SourceCodeCredentialResource, SourceCodeCredentialGroupVersionKind, sourceCodeCredentialFactory{}) + sharedClient := c.clientFactory.ForResourceKind(SourceCodeCredentialGroupVersionResource, SourceCodeCredentialGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &SourceCodeCredentialResource, SourceCodeCredentialGroupVersionKind, sourceCodeCredentialFactory{}) return &sourceCodeCredentialClient{ ns: namespace, client: c, @@ -330,7 +284,8 @@ type PipelinesGetter interface { } func (c *Client) Pipelines(namespace string) PipelineInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &PipelineResource, PipelineGroupVersionKind, pipelineFactory{}) + sharedClient := c.clientFactory.ForResourceKind(PipelineGroupVersionResource, PipelineGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &PipelineResource, PipelineGroupVersionKind, pipelineFactory{}) return &pipelineClient{ ns: namespace, client: c, @@ -343,7 +298,8 @@ type PipelineExecutionsGetter interface { } func (c *Client) PipelineExecutions(namespace string) PipelineExecutionInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &PipelineExecutionResource, PipelineExecutionGroupVersionKind, pipelineExecutionFactory{}) + sharedClient := c.clientFactory.ForResourceKind(PipelineExecutionGroupVersionResource, PipelineExecutionGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &PipelineExecutionResource, PipelineExecutionGroupVersionKind, pipelineExecutionFactory{}) return &pipelineExecutionClient{ ns: namespace, client: c, @@ -356,7 +312,8 @@ type PipelineSettingsGetter interface { } func (c *Client) PipelineSettings(namespace string) PipelineSettingInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &PipelineSettingResource, PipelineSettingGroupVersionKind, pipelineSettingFactory{}) + sharedClient := c.clientFactory.ForResourceKind(PipelineSettingGroupVersionResource, PipelineSettingGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &PipelineSettingResource, PipelineSettingGroupVersionKind, pipelineSettingFactory{}) return &pipelineSettingClient{ ns: namespace, client: c, @@ -369,7 +326,8 @@ type SourceCodeRepositoriesGetter interface { } func (c *Client) SourceCodeRepositories(namespace string) SourceCodeRepositoryInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &SourceCodeRepositoryResource, SourceCodeRepositoryGroupVersionKind, sourceCodeRepositoryFactory{}) + sharedClient := c.clientFactory.ForResourceKind(SourceCodeRepositoryGroupVersionResource, SourceCodeRepositoryGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &SourceCodeRepositoryResource, SourceCodeRepositoryGroupVersionKind, sourceCodeRepositoryFactory{}) return &sourceCodeRepositoryClient{ ns: namespace, client: c, diff --git a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_namespaced_basic_auth_controller.go b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_namespaced_basic_auth_controller.go index 9ec0753f..77427da6 100644 --- a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_namespaced_basic_auth_controller.go +++ b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_namespaced_basic_auth_controller.go @@ -74,8 +74,6 @@ type NamespacedBasicAuthController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler NamespacedBasicAuthHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type NamespacedBasicAuthInterface interface { @@ -126,7 +124,7 @@ func (l *namespacedBasicAuthLister) Get(namespace, name string) (*NamespacedBasi if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: NamespacedBasicAuthGroupVersionKind.Group, - Resource: "namespacedBasicAuth", + Resource: NamespacedBasicAuthGroupVersionResource.Resource, }, key) } return obj.(*NamespacedBasicAuth), nil @@ -210,25 +208,12 @@ func (c namespacedBasicAuthFactory) List() runtime.Object { } func (s *namespacedBasicAuthClient) Controller() NamespacedBasicAuthController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.namespacedBasicAuthControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(NamespacedBasicAuthGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(NamespacedBasicAuthGroupVersionResource, NamespacedBasicAuthGroupVersionKind.Kind, true)) - c = &namespacedBasicAuthController{ + return &namespacedBasicAuthController{ GenericController: genericController, } - - s.client.namespacedBasicAuthControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type namespacedBasicAuthClient struct { @@ -262,6 +247,11 @@ func (s *namespacedBasicAuthClient) Update(o *NamespacedBasicAuth) (*NamespacedB return obj.(*NamespacedBasicAuth), err } +func (s *namespacedBasicAuthClient) UpdateStatus(o *NamespacedBasicAuth) (*NamespacedBasicAuth, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*NamespacedBasicAuth), err +} + func (s *namespacedBasicAuthClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_namespaced_certificate_controller.go b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_namespaced_certificate_controller.go index 12bec14c..ee3eb4e4 100644 --- a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_namespaced_certificate_controller.go +++ b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_namespaced_certificate_controller.go @@ -74,8 +74,6 @@ type NamespacedCertificateController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler NamespacedCertificateHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type NamespacedCertificateInterface interface { @@ -126,7 +124,7 @@ func (l *namespacedCertificateLister) Get(namespace, name string) (*NamespacedCe if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: NamespacedCertificateGroupVersionKind.Group, - Resource: "namespacedCertificate", + Resource: NamespacedCertificateGroupVersionResource.Resource, }, key) } return obj.(*NamespacedCertificate), nil @@ -210,25 +208,12 @@ func (c namespacedCertificateFactory) List() runtime.Object { } func (s *namespacedCertificateClient) Controller() NamespacedCertificateController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.namespacedCertificateControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(NamespacedCertificateGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(NamespacedCertificateGroupVersionResource, NamespacedCertificateGroupVersionKind.Kind, true)) - c = &namespacedCertificateController{ + return &namespacedCertificateController{ GenericController: genericController, } - - s.client.namespacedCertificateControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type namespacedCertificateClient struct { @@ -262,6 +247,11 @@ func (s *namespacedCertificateClient) Update(o *NamespacedCertificate) (*Namespa return obj.(*NamespacedCertificate), err } +func (s *namespacedCertificateClient) UpdateStatus(o *NamespacedCertificate) (*NamespacedCertificate, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*NamespacedCertificate), err +} + func (s *namespacedCertificateClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_namespaced_docker_credential_controller.go b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_namespaced_docker_credential_controller.go index a5ec5520..838c4e2f 100644 --- a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_namespaced_docker_credential_controller.go +++ b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_namespaced_docker_credential_controller.go @@ -74,8 +74,6 @@ type NamespacedDockerCredentialController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler NamespacedDockerCredentialHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type NamespacedDockerCredentialInterface interface { @@ -126,7 +124,7 @@ func (l *namespacedDockerCredentialLister) Get(namespace, name string) (*Namespa if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: NamespacedDockerCredentialGroupVersionKind.Group, - Resource: "namespacedDockerCredential", + Resource: NamespacedDockerCredentialGroupVersionResource.Resource, }, key) } return obj.(*NamespacedDockerCredential), nil @@ -210,25 +208,12 @@ func (c namespacedDockerCredentialFactory) List() runtime.Object { } func (s *namespacedDockerCredentialClient) Controller() NamespacedDockerCredentialController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.namespacedDockerCredentialControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(NamespacedDockerCredentialGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(NamespacedDockerCredentialGroupVersionResource, NamespacedDockerCredentialGroupVersionKind.Kind, true)) - c = &namespacedDockerCredentialController{ + return &namespacedDockerCredentialController{ GenericController: genericController, } - - s.client.namespacedDockerCredentialControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type namespacedDockerCredentialClient struct { @@ -262,6 +247,11 @@ func (s *namespacedDockerCredentialClient) Update(o *NamespacedDockerCredential) return obj.(*NamespacedDockerCredential), err } +func (s *namespacedDockerCredentialClient) UpdateStatus(o *NamespacedDockerCredential) (*NamespacedDockerCredential, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*NamespacedDockerCredential), err +} + func (s *namespacedDockerCredentialClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_namespaced_service_account_token_controller.go b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_namespaced_service_account_token_controller.go index 7164a29b..89430d2c 100644 --- a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_namespaced_service_account_token_controller.go +++ b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_namespaced_service_account_token_controller.go @@ -74,8 +74,6 @@ type NamespacedServiceAccountTokenController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler NamespacedServiceAccountTokenHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type NamespacedServiceAccountTokenInterface interface { @@ -126,7 +124,7 @@ func (l *namespacedServiceAccountTokenLister) Get(namespace, name string) (*Name if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: NamespacedServiceAccountTokenGroupVersionKind.Group, - Resource: "namespacedServiceAccountToken", + Resource: NamespacedServiceAccountTokenGroupVersionResource.Resource, }, key) } return obj.(*NamespacedServiceAccountToken), nil @@ -210,25 +208,12 @@ func (c namespacedServiceAccountTokenFactory) List() runtime.Object { } func (s *namespacedServiceAccountTokenClient) Controller() NamespacedServiceAccountTokenController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.namespacedServiceAccountTokenControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(NamespacedServiceAccountTokenGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(NamespacedServiceAccountTokenGroupVersionResource, NamespacedServiceAccountTokenGroupVersionKind.Kind, true)) - c = &namespacedServiceAccountTokenController{ + return &namespacedServiceAccountTokenController{ GenericController: genericController, } - - s.client.namespacedServiceAccountTokenControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type namespacedServiceAccountTokenClient struct { @@ -262,6 +247,11 @@ func (s *namespacedServiceAccountTokenClient) Update(o *NamespacedServiceAccount return obj.(*NamespacedServiceAccountToken), err } +func (s *namespacedServiceAccountTokenClient) UpdateStatus(o *NamespacedServiceAccountToken) (*NamespacedServiceAccountToken, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*NamespacedServiceAccountToken), err +} + func (s *namespacedServiceAccountTokenClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_namespaced_ssh_auth_controller.go b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_namespaced_ssh_auth_controller.go index cfce8e25..7b93f8df 100644 --- a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_namespaced_ssh_auth_controller.go +++ b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_namespaced_ssh_auth_controller.go @@ -74,8 +74,6 @@ type NamespacedSSHAuthController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler NamespacedSSHAuthHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type NamespacedSSHAuthInterface interface { @@ -126,7 +124,7 @@ func (l *namespacedSshAuthLister) Get(namespace, name string) (*NamespacedSSHAut if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: NamespacedSSHAuthGroupVersionKind.Group, - Resource: "namespacedSshAuth", + Resource: NamespacedSSHAuthGroupVersionResource.Resource, }, key) } return obj.(*NamespacedSSHAuth), nil @@ -210,25 +208,12 @@ func (c namespacedSshAuthFactory) List() runtime.Object { } func (s *namespacedSshAuthClient) Controller() NamespacedSSHAuthController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.namespacedSshAuthControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(NamespacedSSHAuthGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(NamespacedSSHAuthGroupVersionResource, NamespacedSSHAuthGroupVersionKind.Kind, true)) - c = &namespacedSshAuthController{ + return &namespacedSshAuthController{ GenericController: genericController, } - - s.client.namespacedSshAuthControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type namespacedSshAuthClient struct { @@ -262,6 +247,11 @@ func (s *namespacedSshAuthClient) Update(o *NamespacedSSHAuth) (*NamespacedSSHAu return obj.(*NamespacedSSHAuth), err } +func (s *namespacedSshAuthClient) UpdateStatus(o *NamespacedSSHAuth) (*NamespacedSSHAuth, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*NamespacedSSHAuth), err +} + func (s *namespacedSshAuthClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_pipeline_controller.go b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_pipeline_controller.go index 36ca535e..27bc4c14 100644 --- a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_pipeline_controller.go +++ b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_pipeline_controller.go @@ -74,8 +74,6 @@ type PipelineController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler PipelineHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type PipelineInterface interface { @@ -126,7 +124,7 @@ func (l *pipelineLister) Get(namespace, name string) (*Pipeline, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: PipelineGroupVersionKind.Group, - Resource: "pipeline", + Resource: PipelineGroupVersionResource.Resource, }, key) } return obj.(*Pipeline), nil @@ -210,25 +208,12 @@ func (c pipelineFactory) List() runtime.Object { } func (s *pipelineClient) Controller() PipelineController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.pipelineControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(PipelineGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(PipelineGroupVersionResource, PipelineGroupVersionKind.Kind, true)) - c = &pipelineController{ + return &pipelineController{ GenericController: genericController, } - - s.client.pipelineControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type pipelineClient struct { @@ -262,6 +247,11 @@ func (s *pipelineClient) Update(o *Pipeline) (*Pipeline, error) { return obj.(*Pipeline), err } +func (s *pipelineClient) UpdateStatus(o *Pipeline) (*Pipeline, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Pipeline), err +} + func (s *pipelineClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_pipeline_execution_controller.go b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_pipeline_execution_controller.go index 3721e17b..a2ae6a98 100644 --- a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_pipeline_execution_controller.go +++ b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_pipeline_execution_controller.go @@ -74,8 +74,6 @@ type PipelineExecutionController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler PipelineExecutionHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type PipelineExecutionInterface interface { @@ -126,7 +124,7 @@ func (l *pipelineExecutionLister) Get(namespace, name string) (*PipelineExecutio if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: PipelineExecutionGroupVersionKind.Group, - Resource: "pipelineExecution", + Resource: PipelineExecutionGroupVersionResource.Resource, }, key) } return obj.(*PipelineExecution), nil @@ -210,25 +208,12 @@ func (c pipelineExecutionFactory) List() runtime.Object { } func (s *pipelineExecutionClient) Controller() PipelineExecutionController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.pipelineExecutionControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(PipelineExecutionGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(PipelineExecutionGroupVersionResource, PipelineExecutionGroupVersionKind.Kind, true)) - c = &pipelineExecutionController{ + return &pipelineExecutionController{ GenericController: genericController, } - - s.client.pipelineExecutionControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type pipelineExecutionClient struct { @@ -262,6 +247,11 @@ func (s *pipelineExecutionClient) Update(o *PipelineExecution) (*PipelineExecuti return obj.(*PipelineExecution), err } +func (s *pipelineExecutionClient) UpdateStatus(o *PipelineExecution) (*PipelineExecution, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*PipelineExecution), err +} + func (s *pipelineExecutionClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_pipeline_setting_controller.go b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_pipeline_setting_controller.go index b7f83691..b8cdf459 100644 --- a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_pipeline_setting_controller.go +++ b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_pipeline_setting_controller.go @@ -74,8 +74,6 @@ type PipelineSettingController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler PipelineSettingHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type PipelineSettingInterface interface { @@ -126,7 +124,7 @@ func (l *pipelineSettingLister) Get(namespace, name string) (*PipelineSetting, e if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: PipelineSettingGroupVersionKind.Group, - Resource: "pipelineSetting", + Resource: PipelineSettingGroupVersionResource.Resource, }, key) } return obj.(*PipelineSetting), nil @@ -210,25 +208,12 @@ func (c pipelineSettingFactory) List() runtime.Object { } func (s *pipelineSettingClient) Controller() PipelineSettingController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.pipelineSettingControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(PipelineSettingGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(PipelineSettingGroupVersionResource, PipelineSettingGroupVersionKind.Kind, true)) - c = &pipelineSettingController{ + return &pipelineSettingController{ GenericController: genericController, } - - s.client.pipelineSettingControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type pipelineSettingClient struct { @@ -262,6 +247,11 @@ func (s *pipelineSettingClient) Update(o *PipelineSetting) (*PipelineSetting, er return obj.(*PipelineSetting), err } +func (s *pipelineSettingClient) UpdateStatus(o *PipelineSetting) (*PipelineSetting, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*PipelineSetting), err +} + func (s *pipelineSettingClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_service_account_token_controller.go b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_service_account_token_controller.go index 4c6a421a..ae045ebf 100644 --- a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_service_account_token_controller.go +++ b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_service_account_token_controller.go @@ -74,8 +74,6 @@ type ServiceAccountTokenController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ServiceAccountTokenHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ServiceAccountTokenInterface interface { @@ -126,7 +124,7 @@ func (l *serviceAccountTokenLister) Get(namespace, name string) (*ServiceAccount if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ServiceAccountTokenGroupVersionKind.Group, - Resource: "serviceAccountToken", + Resource: ServiceAccountTokenGroupVersionResource.Resource, }, key) } return obj.(*ServiceAccountToken), nil @@ -210,25 +208,12 @@ func (c serviceAccountTokenFactory) List() runtime.Object { } func (s *serviceAccountTokenClient) Controller() ServiceAccountTokenController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.serviceAccountTokenControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ServiceAccountTokenGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ServiceAccountTokenGroupVersionResource, ServiceAccountTokenGroupVersionKind.Kind, true)) - c = &serviceAccountTokenController{ + return &serviceAccountTokenController{ GenericController: genericController, } - - s.client.serviceAccountTokenControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type serviceAccountTokenClient struct { @@ -262,6 +247,11 @@ func (s *serviceAccountTokenClient) Update(o *ServiceAccountToken) (*ServiceAcco return obj.(*ServiceAccountToken), err } +func (s *serviceAccountTokenClient) UpdateStatus(o *ServiceAccountToken) (*ServiceAccountToken, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ServiceAccountToken), err +} + func (s *serviceAccountTokenClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_source_code_credential_controller.go b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_source_code_credential_controller.go index dea0d3e4..3508e344 100644 --- a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_source_code_credential_controller.go +++ b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_source_code_credential_controller.go @@ -74,8 +74,6 @@ type SourceCodeCredentialController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler SourceCodeCredentialHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type SourceCodeCredentialInterface interface { @@ -126,7 +124,7 @@ func (l *sourceCodeCredentialLister) Get(namespace, name string) (*SourceCodeCre if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: SourceCodeCredentialGroupVersionKind.Group, - Resource: "sourceCodeCredential", + Resource: SourceCodeCredentialGroupVersionResource.Resource, }, key) } return obj.(*SourceCodeCredential), nil @@ -210,25 +208,12 @@ func (c sourceCodeCredentialFactory) List() runtime.Object { } func (s *sourceCodeCredentialClient) Controller() SourceCodeCredentialController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.sourceCodeCredentialControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(SourceCodeCredentialGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(SourceCodeCredentialGroupVersionResource, SourceCodeCredentialGroupVersionKind.Kind, true)) - c = &sourceCodeCredentialController{ + return &sourceCodeCredentialController{ GenericController: genericController, } - - s.client.sourceCodeCredentialControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type sourceCodeCredentialClient struct { @@ -262,6 +247,11 @@ func (s *sourceCodeCredentialClient) Update(o *SourceCodeCredential) (*SourceCod return obj.(*SourceCodeCredential), err } +func (s *sourceCodeCredentialClient) UpdateStatus(o *SourceCodeCredential) (*SourceCodeCredential, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*SourceCodeCredential), err +} + func (s *sourceCodeCredentialClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_source_code_provider_config_controller.go b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_source_code_provider_config_controller.go index b8713aef..5ad9a638 100644 --- a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_source_code_provider_config_controller.go +++ b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_source_code_provider_config_controller.go @@ -74,8 +74,6 @@ type SourceCodeProviderConfigController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler SourceCodeProviderConfigHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type SourceCodeProviderConfigInterface interface { @@ -126,7 +124,7 @@ func (l *sourceCodeProviderConfigLister) Get(namespace, name string) (*SourceCod if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: SourceCodeProviderConfigGroupVersionKind.Group, - Resource: "sourceCodeProviderConfig", + Resource: SourceCodeProviderConfigGroupVersionResource.Resource, }, key) } return obj.(*SourceCodeProviderConfig), nil @@ -210,25 +208,12 @@ func (c sourceCodeProviderConfigFactory) List() runtime.Object { } func (s *sourceCodeProviderConfigClient) Controller() SourceCodeProviderConfigController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.sourceCodeProviderConfigControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(SourceCodeProviderConfigGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(SourceCodeProviderConfigGroupVersionResource, SourceCodeProviderConfigGroupVersionKind.Kind, true)) - c = &sourceCodeProviderConfigController{ + return &sourceCodeProviderConfigController{ GenericController: genericController, } - - s.client.sourceCodeProviderConfigControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type sourceCodeProviderConfigClient struct { @@ -262,6 +247,11 @@ func (s *sourceCodeProviderConfigClient) Update(o *SourceCodeProviderConfig) (*S return obj.(*SourceCodeProviderConfig), err } +func (s *sourceCodeProviderConfigClient) UpdateStatus(o *SourceCodeProviderConfig) (*SourceCodeProviderConfig, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*SourceCodeProviderConfig), err +} + func (s *sourceCodeProviderConfigClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_source_code_provider_controller.go b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_source_code_provider_controller.go index cd25bcb2..50bc2057 100644 --- a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_source_code_provider_controller.go +++ b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_source_code_provider_controller.go @@ -73,8 +73,6 @@ type SourceCodeProviderController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler SourceCodeProviderHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type SourceCodeProviderInterface interface { @@ -125,7 +123,7 @@ func (l *sourceCodeProviderLister) Get(namespace, name string) (*SourceCodeProvi if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: SourceCodeProviderGroupVersionKind.Group, - Resource: "sourceCodeProvider", + Resource: SourceCodeProviderGroupVersionResource.Resource, }, key) } return obj.(*SourceCodeProvider), nil @@ -209,25 +207,12 @@ func (c sourceCodeProviderFactory) List() runtime.Object { } func (s *sourceCodeProviderClient) Controller() SourceCodeProviderController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.sourceCodeProviderControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(SourceCodeProviderGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(SourceCodeProviderGroupVersionResource, SourceCodeProviderGroupVersionKind.Kind, false)) - c = &sourceCodeProviderController{ + return &sourceCodeProviderController{ GenericController: genericController, } - - s.client.sourceCodeProviderControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type sourceCodeProviderClient struct { @@ -261,6 +246,11 @@ func (s *sourceCodeProviderClient) Update(o *SourceCodeProvider) (*SourceCodePro return obj.(*SourceCodeProvider), err } +func (s *sourceCodeProviderClient) UpdateStatus(o *SourceCodeProvider) (*SourceCodeProvider, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*SourceCodeProvider), err +} + func (s *sourceCodeProviderClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_source_code_repository_controller.go b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_source_code_repository_controller.go index 44d304a5..31c6aeff 100644 --- a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_source_code_repository_controller.go +++ b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_source_code_repository_controller.go @@ -74,8 +74,6 @@ type SourceCodeRepositoryController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler SourceCodeRepositoryHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type SourceCodeRepositoryInterface interface { @@ -126,7 +124,7 @@ func (l *sourceCodeRepositoryLister) Get(namespace, name string) (*SourceCodeRep if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: SourceCodeRepositoryGroupVersionKind.Group, - Resource: "sourceCodeRepository", + Resource: SourceCodeRepositoryGroupVersionResource.Resource, }, key) } return obj.(*SourceCodeRepository), nil @@ -210,25 +208,12 @@ func (c sourceCodeRepositoryFactory) List() runtime.Object { } func (s *sourceCodeRepositoryClient) Controller() SourceCodeRepositoryController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.sourceCodeRepositoryControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(SourceCodeRepositoryGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(SourceCodeRepositoryGroupVersionResource, SourceCodeRepositoryGroupVersionKind.Kind, true)) - c = &sourceCodeRepositoryController{ + return &sourceCodeRepositoryController{ GenericController: genericController, } - - s.client.sourceCodeRepositoryControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type sourceCodeRepositoryClient struct { @@ -262,6 +247,11 @@ func (s *sourceCodeRepositoryClient) Update(o *SourceCodeRepository) (*SourceCod return obj.(*SourceCodeRepository), err } +func (s *sourceCodeRepositoryClient) UpdateStatus(o *SourceCodeRepository) (*SourceCodeRepository, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*SourceCodeRepository), err +} + func (s *sourceCodeRepositoryClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_ssh_auth_controller.go b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_ssh_auth_controller.go index 4f1d7e31..8e615c42 100644 --- a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_ssh_auth_controller.go +++ b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_ssh_auth_controller.go @@ -74,8 +74,6 @@ type SSHAuthController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler SSHAuthHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type SSHAuthInterface interface { @@ -126,7 +124,7 @@ func (l *sshAuthLister) Get(namespace, name string) (*SSHAuth, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: SSHAuthGroupVersionKind.Group, - Resource: "sshAuth", + Resource: SSHAuthGroupVersionResource.Resource, }, key) } return obj.(*SSHAuth), nil @@ -210,25 +208,12 @@ func (c sshAuthFactory) List() runtime.Object { } func (s *sshAuthClient) Controller() SSHAuthController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.sshAuthControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(SSHAuthGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(SSHAuthGroupVersionResource, SSHAuthGroupVersionKind.Kind, true)) - c = &sshAuthController{ + return &sshAuthController{ GenericController: genericController, } - - s.client.sshAuthControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type sshAuthClient struct { @@ -262,6 +247,11 @@ func (s *sshAuthClient) Update(o *SSHAuth) (*SSHAuth, error) { return obj.(*SSHAuth), err } +func (s *sshAuthClient) UpdateStatus(o *SSHAuth) (*SSHAuth, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*SSHAuth), err +} + func (s *sshAuthClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_workload_controller.go b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_workload_controller.go index 6f38d91b..9cba1303 100644 --- a/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_workload_controller.go +++ b/vendor/github.com/rancher/types/apis/project.cattle.io/v3/zz_generated_workload_controller.go @@ -74,8 +74,6 @@ type WorkloadController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler WorkloadHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type WorkloadInterface interface { @@ -126,7 +124,7 @@ func (l *workloadLister) Get(namespace, name string) (*Workload, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: WorkloadGroupVersionKind.Group, - Resource: "workload", + Resource: WorkloadGroupVersionResource.Resource, }, key) } return obj.(*Workload), nil @@ -210,25 +208,12 @@ func (c workloadFactory) List() runtime.Object { } func (s *workloadClient) Controller() WorkloadController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.workloadControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(WorkloadGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(WorkloadGroupVersionResource, WorkloadGroupVersionKind.Kind, true)) - c = &workloadController{ + return &workloadController{ GenericController: genericController, } - - s.client.workloadControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type workloadClient struct { @@ -262,6 +247,11 @@ func (s *workloadClient) Update(o *Workload) (*Workload, error) { return obj.(*Workload), err } +func (s *workloadClient) UpdateStatus(o *Workload) (*Workload, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Workload), err +} + func (s *workloadClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/vendor/github.com/rancher/wrangler/pkg/ratelimit/none.go b/vendor/github.com/rancher/wrangler/pkg/ratelimit/none.go deleted file mode 100644 index e952e2ae..00000000 --- a/vendor/github.com/rancher/wrangler/pkg/ratelimit/none.go +++ /dev/null @@ -1,19 +0,0 @@ -package ratelimit - -import ( - "context" - - "k8s.io/client-go/util/flowcontrol" -) - -var ( - None = flowcontrol.RateLimiter((*none)(nil)) -) - -type none struct{} - -func (*none) TryAccept() bool { return true } -func (*none) Stop() {} -func (*none) Accept() {} -func (*none) QPS() float32 { return 1 } -func (*none) Wait(_ context.Context) error { return nil } diff --git a/vendor/k8s.io/client-go/discovery/cached/memory/memcache.go b/vendor/k8s.io/client-go/discovery/cached/memory/memcache.go new file mode 100644 index 00000000..82a7cc47 --- /dev/null +++ b/vendor/k8s.io/client-go/discovery/cached/memory/memcache.go @@ -0,0 +1,243 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package memory + +import ( + "errors" + "fmt" + "net" + "net/url" + "sync" + "syscall" + + "github.com/googleapis/gnostic/OpenAPIv2" + + errorsutil "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/version" + "k8s.io/client-go/discovery" + restclient "k8s.io/client-go/rest" +) + +type cacheEntry struct { + resourceList *metav1.APIResourceList + err error +} + +// memCacheClient can Invalidate() to stay up-to-date with discovery +// information. +// +// TODO: Switch to a watch interface. Right now it will poll after each +// Invalidate() call. +type memCacheClient struct { + delegate discovery.DiscoveryInterface + + lock sync.RWMutex + groupToServerResources map[string]*cacheEntry + groupList *metav1.APIGroupList + cacheValid bool +} + +// Error Constants +var ( + ErrCacheNotFound = errors.New("not found") +) + +var _ discovery.CachedDiscoveryInterface = &memCacheClient{} + +// isTransientConnectionError checks whether given error is "Connection refused" or +// "Connection reset" error which usually means that apiserver is temporarily +// unavailable. +func isTransientConnectionError(err error) bool { + urlError, ok := err.(*url.Error) + if !ok { + return false + } + opError, ok := urlError.Err.(*net.OpError) + if !ok { + return false + } + errno, ok := opError.Err.(syscall.Errno) + if !ok { + return false + } + return errno == syscall.ECONNREFUSED || errno == syscall.ECONNRESET +} + +func isTransientError(err error) bool { + if isTransientConnectionError(err) { + return true + } + + if t, ok := err.(errorsutil.APIStatus); ok && t.Status().Code >= 500 { + return true + } + + return errorsutil.IsTooManyRequests(err) +} + +// ServerResourcesForGroupVersion returns the supported resources for a group and version. +func (d *memCacheClient) ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error) { + d.lock.Lock() + defer d.lock.Unlock() + if !d.cacheValid { + if err := d.refreshLocked(); err != nil { + return nil, err + } + } + cachedVal, ok := d.groupToServerResources[groupVersion] + if !ok { + return nil, ErrCacheNotFound + } + + if cachedVal.err != nil && isTransientError(cachedVal.err) { + r, err := d.serverResourcesForGroupVersion(groupVersion) + if err != nil { + utilruntime.HandleError(fmt.Errorf("couldn't get resource list for %v: %v", groupVersion, err)) + } + cachedVal = &cacheEntry{r, err} + d.groupToServerResources[groupVersion] = cachedVal + } + + return cachedVal.resourceList, cachedVal.err +} + +// ServerResources returns the supported resources for all groups and versions. +// Deprecated: use ServerGroupsAndResources instead. +func (d *memCacheClient) ServerResources() ([]*metav1.APIResourceList, error) { + return discovery.ServerResources(d) +} + +// ServerGroupsAndResources returns the groups and supported resources for all groups and versions. +func (d *memCacheClient) ServerGroupsAndResources() ([]*metav1.APIGroup, []*metav1.APIResourceList, error) { + return discovery.ServerGroupsAndResources(d) +} + +func (d *memCacheClient) ServerGroups() (*metav1.APIGroupList, error) { + d.lock.Lock() + defer d.lock.Unlock() + if !d.cacheValid { + if err := d.refreshLocked(); err != nil { + return nil, err + } + } + return d.groupList, nil +} + +func (d *memCacheClient) RESTClient() restclient.Interface { + return d.delegate.RESTClient() +} + +func (d *memCacheClient) ServerPreferredResources() ([]*metav1.APIResourceList, error) { + return discovery.ServerPreferredResources(d) +} + +func (d *memCacheClient) ServerPreferredNamespacedResources() ([]*metav1.APIResourceList, error) { + return discovery.ServerPreferredNamespacedResources(d) +} + +func (d *memCacheClient) ServerVersion() (*version.Info, error) { + return d.delegate.ServerVersion() +} + +func (d *memCacheClient) OpenAPISchema() (*openapi_v2.Document, error) { + return d.delegate.OpenAPISchema() +} + +func (d *memCacheClient) Fresh() bool { + d.lock.RLock() + defer d.lock.RUnlock() + // Return whether the cache is populated at all. It is still possible that + // a single entry is missing due to transient errors and the attempt to read + // that entry will trigger retry. + return d.cacheValid +} + +// Invalidate enforces that no cached data that is older than the current time +// is used. +func (d *memCacheClient) Invalidate() { + d.lock.Lock() + defer d.lock.Unlock() + d.cacheValid = false + d.groupToServerResources = nil + d.groupList = nil +} + +// refreshLocked refreshes the state of cache. The caller must hold d.lock for +// writing. +func (d *memCacheClient) refreshLocked() error { + // TODO: Could this multiplicative set of calls be replaced by a single call + // to ServerResources? If it's possible for more than one resulting + // APIResourceList to have the same GroupVersion, the lists would need merged. + gl, err := d.delegate.ServerGroups() + if err != nil || len(gl.Groups) == 0 { + utilruntime.HandleError(fmt.Errorf("couldn't get current server API group list: %v", err)) + return err + } + + wg := &sync.WaitGroup{} + resultLock := &sync.Mutex{} + rl := map[string]*cacheEntry{} + for _, g := range gl.Groups { + for _, v := range g.Versions { + gv := v.GroupVersion + wg.Add(1) + go func() { + defer wg.Done() + defer utilruntime.HandleCrash() + + r, err := d.serverResourcesForGroupVersion(gv) + if err != nil { + utilruntime.HandleError(fmt.Errorf("couldn't get resource list for %v: %v", gv, err)) + } + + resultLock.Lock() + defer resultLock.Unlock() + rl[gv] = &cacheEntry{r, err} + }() + } + } + wg.Wait() + + d.groupToServerResources, d.groupList = rl, gl + d.cacheValid = true + return nil +} + +func (d *memCacheClient) serverResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error) { + r, err := d.delegate.ServerResourcesForGroupVersion(groupVersion) + if err != nil { + return r, err + } + if len(r.APIResources) == 0 { + return r, fmt.Errorf("Got empty response for: %v", groupVersion) + } + return r, nil +} + +// NewMemCacheClient creates a new CachedDiscoveryInterface which caches +// discovery information in memory and will stay up-to-date if Invalidate is +// called with regularity. +// +// NOTE: The client will NOT resort to live lookups on cache misses. +func NewMemCacheClient(delegate discovery.DiscoveryInterface) discovery.CachedDiscoveryInterface { + return &memCacheClient{ + delegate: delegate, + groupToServerResources: map[string]*cacheEntry{}, + } +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 7bce1385..bf19691d 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -9,8 +9,9 @@ github.com/Masterminds/goutils github.com/Masterminds/semver/v3 # github.com/Masterminds/sprig/v3 v3.0.0 github.com/Masterminds/sprig/v3 -# github.com/Microsoft/go-winio v0.4.12 +# github.com/Microsoft/go-winio v0.4.14 github.com/Microsoft/go-winio +github.com/Microsoft/go-winio/pkg/guid # github.com/PuerkitoBio/purell v1.1.1 github.com/PuerkitoBio/purell # github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 @@ -115,7 +116,7 @@ github.com/google/uuid github.com/googleapis/gnostic/OpenAPIv2 github.com/googleapis/gnostic/compiler github.com/googleapis/gnostic/extensions -# github.com/gregjones/httpcache v0.0.0-20190212212710-3befbb6ad0cc +# github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 github.com/gregjones/httpcache github.com/gregjones/httpcache/diskcache # github.com/hashicorp/golang-lru v0.5.3 @@ -162,7 +163,7 @@ github.com/opencontainers/image-spec/specs-go github.com/opencontainers/image-spec/specs-go/v1 # github.com/peterbourgon/diskv v2.0.1+incompatible github.com/peterbourgon/diskv -# github.com/pkg/errors v0.8.1 +# github.com/pkg/errors v0.9.1 github.com/pkg/errors # github.com/pmezard/go-difflib v1.0.0 github.com/pmezard/go-difflib/difflib @@ -179,30 +180,34 @@ github.com/prometheus/common/model github.com/prometheus/procfs github.com/prometheus/procfs/internal/fs github.com/prometheus/procfs/internal/util -# github.com/rancher/norman v0.0.0-20200326201949-eb806263e8ad +# github.com/rancher/lasso v0.0.0-20200515155337-a34e1e26ad91 +github.com/rancher/lasso/pkg/cache +github.com/rancher/lasso/pkg/client +github.com/rancher/lasso/pkg/controller +github.com/rancher/lasso/pkg/log +github.com/rancher/lasso/pkg/mapper +github.com/rancher/lasso/pkg/scheme +# github.com/rancher/norman v0.0.0-20200517050325-f53cae161640 github.com/rancher/norman/condition github.com/rancher/norman/controller github.com/rancher/norman/httperror github.com/rancher/norman/lifecycle github.com/rancher/norman/metrics github.com/rancher/norman/objectclient -github.com/rancher/norman/objectclient/dynamic github.com/rancher/norman/resource -github.com/rancher/norman/restwatch github.com/rancher/norman/types github.com/rancher/norman/types/convert github.com/rancher/norman/types/definition github.com/rancher/norman/types/slice github.com/rancher/norman/types/values -# github.com/rancher/types v0.0.0-20200326224235-0d1e1dcc8d55 +# github.com/rancher/types v0.0.0-20200602180723-12f6c0979333 github.com/rancher/types/apis/management.cattle.io/v3 github.com/rancher/types/apis/project.cattle.io/v3 github.com/rancher/types/condition github.com/rancher/types/image github.com/rancher/types/kdm -# github.com/rancher/wrangler v0.5.4-0.20200326191509-4054411d9736 +# github.com/rancher/wrangler v0.6.2-0.20200515155908-1923f3f8ec3f github.com/rancher/wrangler/pkg/name -github.com/rancher/wrangler/pkg/ratelimit # github.com/russross/blackfriday v1.5.2 github.com/russross/blackfriday # github.com/sirupsen/logrus v1.4.2 @@ -403,6 +408,7 @@ k8s.io/cli-runtime/pkg/resource # k8s.io/client-go v12.0.0+incompatible => k8s.io/client-go v0.18.0 k8s.io/client-go/discovery k8s.io/client-go/discovery/cached/disk +k8s.io/client-go/discovery/cached/memory k8s.io/client-go/dynamic k8s.io/client-go/kubernetes k8s.io/client-go/kubernetes/scheme