diff --git a/go.mod b/go.mod index 540d25771..73eb4c6c6 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/go-git/go-billy/v5 v5.9.0 github.com/go-git/go-git/v5 v5.19.1 github.com/google/uuid v1.6.0 - github.com/gorilla/websocket v1.5.3 + github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 github.com/ipshipyard/p2p-forge v0.7.0 github.com/libp2p/go-libp2p v0.46.0 github.com/miekg/dns v1.1.66 @@ -29,9 +29,9 @@ require ( golang.org/x/crypto v0.50.0 golang.org/x/sync v0.20.0 gopkg.in/yaml.v3 v3.0.1 - k8s.io/api v0.31.10 - k8s.io/apimachinery v0.31.10 - k8s.io/client-go v0.31.10 + k8s.io/api v0.33.12 + k8s.io/apimachinery v0.33.12 + k8s.io/client-go v0.33.12 resenje.org/x v0.6.0 ) @@ -69,21 +69,18 @@ require ( github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect - github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.22.4 // indirect + github.com/go-openapi/swag v0.23.0 // indirect github.com/go-viper/mapstructure/v2 v2.4.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect - github.com/golang/protobuf v1.5.4 // indirect - github.com/google/gnostic-models v0.6.8 // indirect + github.com/google/gnostic-models v0.6.9 // indirect github.com/google/go-cmp v0.7.0 // indirect - github.com/google/gofuzz v1.2.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/holiman/uint256 v1.3.2 // indirect github.com/huin/goupnp v1.3.0 // indirect - github.com/imdario/mergo v0.3.13 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/ipfs/go-cid v0.5.0 // indirect github.com/ipfs/go-log/v2 v2.6.0 // indirect @@ -156,7 +153,6 @@ require ( github.com/spf13/afero v1.12.0 // indirect github.com/spf13/cast v1.7.1 // indirect github.com/spf13/pflag v1.0.6 // indirect - github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect @@ -191,12 +187,12 @@ require ( gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect k8s.io/klog/v2 v2.130.1 // indirect - k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect - k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect + k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect + k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect lukechampine.com/blake3 v1.4.1 // indirect - sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect + sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect + sigs.k8s.io/randfill v1.0.0 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/go.sum b/go.sum index 693ab995b..d0df4d5c5 100644 --- a/go.sum +++ b/go.sum @@ -136,13 +136,14 @@ github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= -github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= -github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs= @@ -155,12 +156,10 @@ github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXe github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ= github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUvekVysuuOpQKo3191zZyTpiI6se1N1ULghS0sw= -github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= -github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs= github.com/golang/snappy v1.0.0/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= -github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= +github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw= +github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= @@ -171,8 +170,8 @@ github.com/google/pprof v0.0.0-20250607225305-033d6d78b36a h1://KbezygeMJZCSHH+H github.com/google/pprof v0.0.0-20250607225305-033d6d78b36a/go.mod h1:5hDyRhoBCxViHszMt12TnOpEI4VVi+U8Gm9iphldiMA= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= -github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo= +github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA= github.com/grafana/pyroscope-go v1.2.7 h1:VWBBlqxjyR0Cwk2W6UrE8CdcdD80GOFNutj0Kb1T8ac= github.com/grafana/pyroscope-go v1.2.7/go.mod h1:o/bpSLiJYYP6HQtvcoVKiE9s5RiNgjYTj1DhiddP2Pc= github.com/grafana/pyroscope-go/godeltaprof v0.1.9 h1:c1Us8i6eSmkW+Ez05d3co8kasnuOY813tbMN8i/a3Og= @@ -194,8 +193,6 @@ github.com/holiman/uint256 v1.3.2 h1:a9EgMPSC1AAaj1SZL5zIQD3WbwTuHrMGOerLjGmM/TA github.com/holiman/uint256 v1.3.2/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= -github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= -github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb-client-go/v2 v2.4.0 h1:HGBfZYStlx3Kqvsv1h2pJixbCl/jhnFtxpKFAv9Tu5k= @@ -639,32 +636,33 @@ gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYs gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.31.10 h1:hR39mlD3fxAMVotfj1aAEUOZhNMf+pL/XpL2zKvfLMk= -k8s.io/api v0.31.10/go.mod h1:UwhlGlhYzRQuDudTdvUZ6bZZAKp0Zs82m+qEw/BZxCU= -k8s.io/apimachinery v0.31.10 h1:fKQxHMu8IFRsC5wsiA7ySL9Z/dw9LOmVs3cifAx1cXk= -k8s.io/apimachinery v0.31.10/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= -k8s.io/client-go v0.31.10 h1:2WvGOFKKggxmx6kB6DP1NjdvLPyI6z+CtDWcQsyHpTI= -k8s.io/client-go v0.31.10/go.mod h1:zRlFekIgyvhAEb8osZ6ar1//EqqGgW9C/j5jGVFNMXI= +k8s.io/api v0.33.12 h1:XxoFmt5RfiBRQM5jNzFwfHCSnJ4CK+fE4xmHvIxvdQw= +k8s.io/api v0.33.12/go.mod h1:U37aPE14I+eOx85zTqiuJUyOBeSYjGXFM8gFxhLKEgU= +k8s.io/apimachinery v0.33.12 h1:60YBbAWDzJYDJpZtiY4w0WgQyHoG9MZk/QyOknOjm20= +k8s.io/apimachinery v0.33.12/go.mod h1:a8VYBaEU2Z6n2IxTG2Hs6WX5i0wQFPGyl4YFab4kn90= +k8s.io/client-go v0.33.12 h1:c6bUsOCwRl1bwTFNuNfZkR1y1HXsFxI0poCEzMYDKjU= +k8s.io/client-go v0.33.12/go.mod h1:Ct4pzYnHMA0XeWUnSSqAp5xPKUanzTGA80Mr3OZN9OY= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= -k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= -k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= -k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4= +k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8= +k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro= +k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= lukechampine.com/blake3 v1.4.1 h1:I3Smz7gso8w4/TunLKec6K2fn+kyKtDxr/xcQEN84Wg= lukechampine.com/blake3 v1.4.1/go.mod h1:QFosUxmjB8mnrWFSNwKmvxHpfY72bmD2tQ0kBMM3kwo= resenje.org/x v0.6.0 h1:afn9E4XhglF4y9Kq0VH5tdSyjnsVKxiYgB6HFj7ebss= resenje.org/x v0.6.0/go.mod h1:qgwe4MCzh57EkkMDurg24ug7HHfZtAjtBkmCihNmOpM= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8= +sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo= +sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= +sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= +sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= +sigs.k8s.io/structured-merge-diff/v4 v4.6.0 h1:IUA9nvMmnKWcj5jl84xn+T5MnlZKThmUW1TdblaLVAc= +sigs.k8s.io/structured-merge-diff/v4 v4.6.0/go.mod h1:dDy58f92j70zLsuZVuUX5Wp9vtxXpaZnkPGWeqDfCps= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/pkg/k8s/mocks/app.go b/pkg/k8s/mocks/app.go index a5a2207d3..6a0417ae4 100644 --- a/pkg/k8s/mocks/app.go +++ b/pkg/k8s/mocks/app.go @@ -2,7 +2,6 @@ package mocks import ( v1 "k8s.io/client-go/kubernetes/typed/apps/v1" - rest "k8s.io/client-go/rest" ) const ( @@ -14,38 +13,15 @@ const ( // compile simulation whether ClientsetMock implements interface var _ v1.AppsV1Interface = (*AppV1)(nil) -type AppV1 struct{} +type AppV1 struct { + v1.AppsV1Interface +} func NewAppV1() *AppV1 { return &AppV1{} } -// ControllerRevisions implements v1.AppsV1Interface -func (*AppV1) ControllerRevisions(namespace string) v1.ControllerRevisionInterface { - panic("unimplemented") -} - -// DaemonSets implements v1.AppsV1Interface -func (*AppV1) DaemonSets(namespace string) v1.DaemonSetInterface { - panic("unimplemented") -} - -// Deployments implements v1.AppsV1Interface -func (*AppV1) Deployments(namespace string) v1.DeploymentInterface { - panic("unimplemented") -} - -// ReplicaSets implements v1.AppsV1Interface -func (*AppV1) ReplicaSets(namespace string) v1.ReplicaSetInterface { - panic("unimplemented") -} - // StatefulSets implements v1.AppsV1Interface func (*AppV1) StatefulSets(namespace string) v1.StatefulSetInterface { return NewStatefulSet(namespace) } - -// RESTClient implements v1.AppsV1Interface -func (*AppV1) RESTClient() rest.Interface { - panic("unimplemented") -} diff --git a/pkg/k8s/mocks/clientset.go b/pkg/k8s/mocks/clientset.go index 0360535c8..bbc0fcd4d 100644 --- a/pkg/k8s/mocks/clientset.go +++ b/pkg/k8s/mocks/clientset.go @@ -1,334 +1,35 @@ package mocks import ( - discovery "k8s.io/client-go/discovery" - admissionregistrationv1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1" - admissionregistrationv1alpha1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1" - admissionregistrationv1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" - internalv1alpha1 "k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1" + "k8s.io/client-go/kubernetes" appsv1 "k8s.io/client-go/kubernetes/typed/apps/v1" - appsv1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1" - appsv1beta2 "k8s.io/client-go/kubernetes/typed/apps/v1beta2" - authenticationv1 "k8s.io/client-go/kubernetes/typed/authentication/v1" - authenticationv1alpha1 "k8s.io/client-go/kubernetes/typed/authentication/v1alpha1" - authenticationv1beta1 "k8s.io/client-go/kubernetes/typed/authentication/v1beta1" - authorizationv1 "k8s.io/client-go/kubernetes/typed/authorization/v1" - authorizationv1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1" - autoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1" - v2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2" - autoscalingv2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1" - autoscalingv2beta2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2" - batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1" - batchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1" - certificatesv1 "k8s.io/client-go/kubernetes/typed/certificates/v1" - certificatesv1alpha1 "k8s.io/client-go/kubernetes/typed/certificates/v1alpha1" - certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" - coordinationv1 "k8s.io/client-go/kubernetes/typed/coordination/v1" - "k8s.io/client-go/kubernetes/typed/coordination/v1alpha1" - coordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" - discoveryv1 "k8s.io/client-go/kubernetes/typed/discovery/v1" - discoveryv1beta1 "k8s.io/client-go/kubernetes/typed/discovery/v1beta1" - eventsv1 "k8s.io/client-go/kubernetes/typed/events/v1" - eventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1" - extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" - v1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1" - flowcontrolv1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1" - "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2" - "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3" networkingv1 "k8s.io/client-go/kubernetes/typed/networking/v1" - networkingv1alpha1 "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" - networkingv1beta1 "k8s.io/client-go/kubernetes/typed/networking/v1beta1" - nodev1 "k8s.io/client-go/kubernetes/typed/node/v1" - nodev1alpha1 "k8s.io/client-go/kubernetes/typed/node/v1alpha1" - nodev1beta1 "k8s.io/client-go/kubernetes/typed/node/v1beta1" - policyv1 "k8s.io/client-go/kubernetes/typed/policy/v1" - policyv1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1" - rbacv1 "k8s.io/client-go/kubernetes/typed/rbac/v1" - rbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1" - rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1" - "k8s.io/client-go/kubernetes/typed/resource/v1alpha3" - schedulingv1 "k8s.io/client-go/kubernetes/typed/scheduling/v1" - schedulingv1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1" - schedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" - storagev1 "k8s.io/client-go/kubernetes/typed/storage/v1" - storagev1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1" - storagev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1" - storagemigrationv1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1" ) -type Clientset struct{} - -// CoordinationV1alpha1 implements kubernetes.Interface. -func (c *Clientset) CoordinationV1alpha1() v1alpha1.CoordinationV1alpha1Interface { - panic("unimplemented") -} - -// ResourceV1alpha3 implements kubernetes.Interface. -func (c *Clientset) ResourceV1alpha3() v1alpha3.ResourceV1alpha3Interface { - panic("unimplemented") -} - -// AdmissionregistrationV1alpha1 implements kubernetes.Interface. -func (c *Clientset) AdmissionregistrationV1alpha1() admissionregistrationv1alpha1.AdmissionregistrationV1alpha1Interface { - panic("unimplemented") -} - -// AuthenticationV1alpha1 implements kubernetes.Interface. -func (c *Clientset) AuthenticationV1alpha1() authenticationv1alpha1.AuthenticationV1alpha1Interface { - panic("unimplemented") -} - -// AutoscalingV2 implements kubernetes.Interface. -func (c *Clientset) AutoscalingV2() v2.AutoscalingV2Interface { - panic("unimplemented") -} - -// CertificatesV1alpha1 implements kubernetes.Interface. -func (c *Clientset) CertificatesV1alpha1() certificatesv1alpha1.CertificatesV1alpha1Interface { - panic("unimplemented") -} - -// FlowcontrolV1 implements kubernetes.Interface. -func (c *Clientset) FlowcontrolV1() v1.FlowcontrolV1Interface { - panic("unimplemented") -} - -// FlowcontrolV1beta2 implements kubernetes.Interface. -func (c *Clientset) FlowcontrolV1beta2() v1beta2.FlowcontrolV1beta2Interface { - panic("unimplemented") -} - -// FlowcontrolV1beta3 implements kubernetes.Interface. -func (c *Clientset) FlowcontrolV1beta3() v1beta3.FlowcontrolV1beta3Interface { - panic("unimplemented") -} - -// NetworkingV1alpha1 implements kubernetes.Interface. -func (c *Clientset) NetworkingV1alpha1() networkingv1alpha1.NetworkingV1alpha1Interface { - panic("unimplemented") -} - -// StoragemigrationV1alpha1 implements kubernetes.Interface. -func (c *Clientset) StoragemigrationV1alpha1() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface { - panic("unimplemented") +// Clientset is a partial mock of kubernetes.Interface. Only the typed clients +// exercised by the tests are implemented; the embedded interface satisfies the +// rest and absorbs any methods added in future client-go versions. Calling an +// unimplemented client panics (nil-pointer dereference on the embedded value). +type Clientset struct { + kubernetes.Interface } func NewClientset() *Clientset { return &Clientset{} } -// AdmissionregistrationV1 implements kubernetes.Interface -func (*Clientset) AdmissionregistrationV1() admissionregistrationv1.AdmissionregistrationV1Interface { - panic("unimplemented") -} - -// AdmissionregistrationV1beta1 implements kubernetes.Interface -func (*Clientset) AdmissionregistrationV1beta1() admissionregistrationv1beta1.AdmissionregistrationV1beta1Interface { - panic("unimplemented") -} - -// AppsV1 implements kubernetes.Interface +// AppsV1 implements kubernetes.Interface. func (*Clientset) AppsV1() appsv1.AppsV1Interface { return NewAppV1() } -// AppsV1beta1 implements kubernetes.Interface -func (*Clientset) AppsV1beta1() appsv1beta1.AppsV1beta1Interface { - panic("unimplemented") -} - -// AppsV1beta2 implements kubernetes.Interface -func (*Clientset) AppsV1beta2() appsv1beta2.AppsV1beta2Interface { - panic("unimplemented") -} - -// AuthenticationV1 implements kubernetes.Interface -func (*Clientset) AuthenticationV1() authenticationv1.AuthenticationV1Interface { - panic("unimplemented") -} - -// AuthenticationV1beta1 implements kubernetes.Interface -func (*Clientset) AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface { - panic("unimplemented") -} - -// AuthorizationV1 implements kubernetes.Interface -func (*Clientset) AuthorizationV1() authorizationv1.AuthorizationV1Interface { - panic("unimplemented") -} - -// AuthorizationV1beta1 implements kubernetes.Interface -func (*Clientset) AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface { - panic("unimplemented") -} - -// AutoscalingV1 implements kubernetes.Interface -func (*Clientset) AutoscalingV1() autoscalingv1.AutoscalingV1Interface { - panic("unimplemented") -} - -// AutoscalingV2beta1 implements kubernetes.Interface -func (*Clientset) AutoscalingV2beta1() autoscalingv2beta1.AutoscalingV2beta1Interface { - panic("unimplemented") -} - -// AutoscalingV2beta2 implements kubernetes.Interface -func (*Clientset) AutoscalingV2beta2() autoscalingv2beta2.AutoscalingV2beta2Interface { - panic("unimplemented") -} - -// BatchV1 implements kubernetes.Interface -func (*Clientset) BatchV1() batchv1.BatchV1Interface { - panic("unimplemented") -} - -// BatchV1beta1 implements kubernetes.Interface -func (*Clientset) BatchV1beta1() batchv1beta1.BatchV1beta1Interface { - panic("unimplemented") -} - -// CertificatesV1 implements kubernetes.Interface -func (*Clientset) CertificatesV1() certificatesv1.CertificatesV1Interface { - panic("unimplemented") -} - -// CertificatesV1beta1 implements kubernetes.Interface -func (*Clientset) CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface { - panic("unimplemented") -} - -// CoordinationV1 implements kubernetes.Interface -func (*Clientset) CoordinationV1() coordinationv1.CoordinationV1Interface { - panic("unimplemented") -} - -// CoordinationV1beta1 implements kubernetes.Interface -func (*Clientset) CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface { - panic("unimplemented") -} - -// CoreV1 implements kubernetes.Interface -func (c *Clientset) CoreV1() corev1.CoreV1Interface { +// CoreV1 implements kubernetes.Interface. +func (*Clientset) CoreV1() corev1.CoreV1Interface { return NewCoreV1() } -// Discovery implements kubernetes.Interface -func (*Clientset) Discovery() discovery.DiscoveryInterface { - panic("unimplemented") -} - -// DiscoveryV1 implements kubernetes.Interface -func (*Clientset) DiscoveryV1() discoveryv1.DiscoveryV1Interface { - panic("unimplemented") -} - -// DiscoveryV1beta1 implements kubernetes.Interface -func (*Clientset) DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interface { - panic("unimplemented") -} - -// EventsV1 implements kubernetes.Interface -func (*Clientset) EventsV1() eventsv1.EventsV1Interface { - panic("unimplemented") -} - -// EventsV1beta1 implements kubernetes.Interface -func (*Clientset) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface { - panic("unimplemented") -} - -// ExtensionsV1beta1 implements kubernetes.Interface -func (*Clientset) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface { - panic("unimplemented") -} - -// FlowcontrolV1beta1 implements kubernetes.Interface -func (*Clientset) FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface { - panic("unimplemented") -} - -// InternalV1alpha1 implements kubernetes.Interface -func (*Clientset) InternalV1alpha1() internalv1alpha1.InternalV1alpha1Interface { - panic("unimplemented") -} - -// NetworkingV1 implements kubernetes.Interface +// NetworkingV1 implements kubernetes.Interface. func (*Clientset) NetworkingV1() networkingv1.NetworkingV1Interface { return NewNetworkingV1() } - -// NetworkingV1beta1 implements kubernetes.Interface -func (*Clientset) NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface { - panic("unimplemented") -} - -// NodeV1 implements kubernetes.Interface -func (*Clientset) NodeV1() nodev1.NodeV1Interface { - panic("unimplemented") -} - -// NodeV1alpha1 implements kubernetes.Interface -func (*Clientset) NodeV1alpha1() nodev1alpha1.NodeV1alpha1Interface { - panic("unimplemented") -} - -// NodeV1beta1 implements kubernetes.Interface -func (*Clientset) NodeV1beta1() nodev1beta1.NodeV1beta1Interface { - panic("unimplemented") -} - -// PolicyV1 implements kubernetes.Interface -func (*Clientset) PolicyV1() policyv1.PolicyV1Interface { - panic("unimplemented") -} - -// PolicyV1beta1 implements kubernetes.Interface -func (*Clientset) PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface { - panic("unimplemented") -} - -// RbacV1 implements kubernetes.Interface -func (*Clientset) RbacV1() rbacv1.RbacV1Interface { - panic("unimplemented") -} - -// RbacV1alpha1 implements kubernetes.Interface -func (*Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface { - panic("unimplemented") -} - -// RbacV1beta1 implements kubernetes.Interface -func (*Clientset) RbacV1beta1() rbacv1beta1.RbacV1beta1Interface { - panic("unimplemented") -} - -// SchedulingV1 implements kubernetes.Interface -func (*Clientset) SchedulingV1() schedulingv1.SchedulingV1Interface { - panic("unimplemented") -} - -// SchedulingV1alpha1 implements kubernetes.Interface -func (*Clientset) SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface { - panic("unimplemented") -} - -// SchedulingV1beta1 implements kubernetes.Interface -func (*Clientset) SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface { - panic("unimplemented") -} - -// StorageV1 implements kubernetes.Interface -func (*Clientset) StorageV1() storagev1.StorageV1Interface { - panic("unimplemented") -} - -// StorageV1alpha1 implements kubernetes.Interface -func (*Clientset) StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface { - panic("unimplemented") -} - -// StorageV1beta1 implements kubernetes.Interface -func (*Clientset) StorageV1beta1() storagev1beta1.StorageV1beta1Interface { - panic("unimplemented") -} diff --git a/pkg/k8s/mocks/configmap.go b/pkg/k8s/mocks/configmap.go index 4d7d8868e..a3b323db8 100644 --- a/pkg/k8s/mocks/configmap.go +++ b/pkg/k8s/mocks/configmap.go @@ -8,26 +8,20 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - cofnigcorev1 "k8s.io/client-go/applyconfigurations/core/v1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" ) // compile simulation whether ClientsetMock implements interface var _ corev1.ConfigMapInterface = (*ConfigMap)(nil) -type ConfigMap struct{} +type ConfigMap struct { + corev1.ConfigMapInterface +} func NewConfigMap() *ConfigMap { return &ConfigMap{} } -// Apply implements v1.ConfigMapInterface -func (*ConfigMap) Apply(ctx context.Context, configMap *cofnigcorev1.ConfigMapApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ConfigMap, err error) { - panic("unimplemented") -} - // Create implements v1.ConfigMapInterface func (c *ConfigMap) Create(ctx context.Context, configMap *v1.ConfigMap, opts metav1.CreateOptions) (*v1.ConfigMap, error) { if configMap.Name == CreateBad { @@ -46,26 +40,6 @@ func (c *ConfigMap) Delete(ctx context.Context, name string, opts metav1.DeleteO } } -// DeleteCollection implements v1.ConfigMapInterface -func (*ConfigMap) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - panic("unimplemented") -} - -// Get implements v1.ConfigMapInterface -func (*ConfigMap) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ConfigMap, error) { - panic("unimplemented") -} - -// List implements v1.ConfigMapInterface -func (*ConfigMap) List(ctx context.Context, opts metav1.ListOptions) (*v1.ConfigMapList, error) { - panic("unimplemented") -} - -// Patch implements v1.ConfigMapInterface -func (*ConfigMap) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ConfigMap, err error) { - panic("unimplemented") -} - // Update implements v1.ConfigMapInterface func (c *ConfigMap) Update(ctx context.Context, configMap *v1.ConfigMap, opts metav1.UpdateOptions) (*v1.ConfigMap, error) { if configMap.Name == UpdateBad { @@ -74,8 +48,3 @@ func (c *ConfigMap) Update(ctx context.Context, configMap *v1.ConfigMap, opts me return nil, errors.NewNotFound(schema.GroupResource{}, configMap.Name) } } - -// Watch implements v1.ConfigMapInterface -func (*ConfigMap) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - panic("unimplemented") -} diff --git a/pkg/k8s/mocks/core.go b/pkg/k8s/mocks/core.go index 200dd3711..d08acc1b1 100644 --- a/pkg/k8s/mocks/core.go +++ b/pkg/k8s/mocks/core.go @@ -2,58 +2,29 @@ package mocks import ( corev1 "k8s.io/client-go/kubernetes/typed/core/v1" - rest "k8s.io/client-go/rest" ) // compile simulation whether ClientsetMock implements interface var _ corev1.CoreV1Interface = (*CoreV1)(nil) -type CoreV1 struct{} +type CoreV1 struct { + corev1.CoreV1Interface +} func NewCoreV1() *CoreV1 { return &CoreV1{} } -// ComponentStatuses implements v1.CoreV1Interface -func (*CoreV1) ComponentStatuses() corev1.ComponentStatusInterface { - panic("unimplemented") -} - // ConfigMaps implements v1.CoreV1Interface func (*CoreV1) ConfigMaps(namespace string) corev1.ConfigMapInterface { return NewConfigMap() } -// Endpoints implements v1.CoreV1Interface -func (*CoreV1) Endpoints(namespace string) corev1.EndpointsInterface { - panic("unimplemented") -} - -// Events implements v1.CoreV1Interface -func (*CoreV1) Events(namespace string) corev1.EventInterface { - panic("unimplemented") -} - -// LimitRanges implements v1.CoreV1Interface -func (*CoreV1) LimitRanges(namespace string) corev1.LimitRangeInterface { - panic("unimplemented") -} - // Namespaces implements v1.CoreV1Interface func (*CoreV1) Namespaces() corev1.NamespaceInterface { return NewNamespace() } -// Nodes implements v1.CoreV1Interface -func (*CoreV1) Nodes() corev1.NodeInterface { - panic("unimplemented") -} - -// PersistentVolumes implements v1.CoreV1Interface -func (*CoreV1) PersistentVolumes() corev1.PersistentVolumeInterface { - panic("unimplemented") -} - // PersistentVolumeClaims implements v1.CoreV1Interface func (*CoreV1) PersistentVolumeClaims(namespace string) corev1.PersistentVolumeClaimInterface { return NewPvc() @@ -64,21 +35,6 @@ func (*CoreV1) Pods(namespace string) corev1.PodInterface { return NewPod() } -// PodTemplates implements v1.CoreV1Interface -func (*CoreV1) PodTemplates(namespace string) corev1.PodTemplateInterface { - panic("unimplemented") -} - -// ReplicationControllers implements v1.CoreV1Interface -func (*CoreV1) ReplicationControllers(namespace string) corev1.ReplicationControllerInterface { - panic("unimplemented") -} - -// ResourceQuotas implements v1.CoreV1Interface -func (*CoreV1) ResourceQuotas(namespace string) corev1.ResourceQuotaInterface { - panic("unimplemented") -} - // Secrets implements v1.CoreV1Interface func (*CoreV1) Secrets(namespace string) corev1.SecretInterface { return NewSecret() @@ -93,8 +49,3 @@ func (*CoreV1) Services(namespace string) corev1.ServiceInterface { func (*CoreV1) ServiceAccounts(namespace string) corev1.ServiceAccountInterface { return NewServiceAccount() } - -// RESTClient implements v1.CoreV1Interface -func (*CoreV1) RESTClient() rest.Interface { - panic("unimplemented") -} diff --git a/pkg/k8s/mocks/ingress.go b/pkg/k8s/mocks/ingress.go index cef89f778..be27ea057 100644 --- a/pkg/k8s/mocks/ingress.go +++ b/pkg/k8s/mocks/ingress.go @@ -8,31 +8,20 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - networkingv1 "k8s.io/client-go/applyconfigurations/networking/v1" v1 "k8s.io/client-go/kubernetes/typed/networking/v1" ) // compile simulation whether ClientsetMock implements interface var _ v1.IngressInterface = (*Ingress)(nil) -type Ingress struct{} +type Ingress struct { + v1.IngressInterface +} func NewIngress() *Ingress { return &Ingress{} } -// Apply implements v1.IngressInterface -func (*Ingress) Apply(ctx context.Context, ingress *networkingv1.IngressApplyConfiguration, opts metav1.ApplyOptions) (result *netv1.Ingress, err error) { - panic("unimplemented") -} - -// ApplyStatus implements v1.IngressInterface -func (*Ingress) ApplyStatus(ctx context.Context, ingress *networkingv1.IngressApplyConfiguration, opts metav1.ApplyOptions) (result *netv1.Ingress, err error) { - panic("unimplemented") -} - // Create implements v1.IngressInterface func (*Ingress) Create(ctx context.Context, ingress *netv1.Ingress, opts metav1.CreateOptions) (*netv1.Ingress, error) { if ingress.Name == CreateBad { @@ -51,26 +40,6 @@ func (*Ingress) Delete(ctx context.Context, name string, opts metav1.DeleteOptio } } -// DeleteCollection implements v1.IngressInterface -func (*Ingress) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - panic("unimplemented") -} - -// Get implements v1.IngressInterface -func (*Ingress) Get(ctx context.Context, name string, opts metav1.GetOptions) (*netv1.Ingress, error) { - panic("unimplemented") -} - -// List implements v1.IngressInterface -func (*Ingress) List(ctx context.Context, opts metav1.ListOptions) (*netv1.IngressList, error) { - panic("unimplemented") -} - -// Patch implements v1.IngressInterface -func (*Ingress) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *netv1.Ingress, err error) { - panic("unimplemented") -} - // Update implements v1.IngressInterface func (*Ingress) Update(ctx context.Context, ingress *netv1.Ingress, opts metav1.UpdateOptions) (*netv1.Ingress, error) { if ingress.Name == UpdateBad { @@ -79,13 +48,3 @@ func (*Ingress) Update(ctx context.Context, ingress *netv1.Ingress, opts metav1. return nil, errors.NewNotFound(schema.GroupResource{}, ingress.Name) } } - -// UpdateStatus implements v1.IngressInterface -func (*Ingress) UpdateStatus(ctx context.Context, ingress *netv1.Ingress, opts metav1.UpdateOptions) (*netv1.Ingress, error) { - panic("unimplemented") -} - -// Watch implements v1.IngressInterface -func (*Ingress) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - panic("unimplemented") -} diff --git a/pkg/k8s/mocks/namespace.go b/pkg/k8s/mocks/namespace.go index ebeb7b30d..7790e5eed 100644 --- a/pkg/k8s/mocks/namespace.go +++ b/pkg/k8s/mocks/namespace.go @@ -7,36 +7,20 @@ import ( "github.com/ethersphere/beekeeper" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - corev1 "k8s.io/client-go/applyconfigurations/core/v1" typedv1 "k8s.io/client-go/kubernetes/typed/core/v1" ) // compile simulation whether ClientsetMock implements interface var _ typedv1.NamespaceInterface = (*Namespace)(nil) -type Namespace struct{} +type Namespace struct { + typedv1.NamespaceInterface +} func NewNamespace() *Namespace { return &Namespace{} } -// Finalize implements v1.NamespaceInterface -func (*Namespace) Finalize(ctx context.Context, item *v1.Namespace, opts metav1.UpdateOptions) (*v1.Namespace, error) { - panic("unimplemented") -} - -// Apply implements v1.NamespaceInterface -func (*Namespace) Apply(ctx context.Context, namespace *corev1.NamespaceApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Namespace, err error) { - panic("unimplemented") -} - -// ApplyStatus implements v1.NamespaceInterface -func (*Namespace) ApplyStatus(ctx context.Context, namespace *corev1.NamespaceApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Namespace, err error) { - panic("unimplemented") -} - // Create implements v1.NamespaceInterface func (nm *Namespace) Create(ctx context.Context, namespace *v1.Namespace, opts metav1.CreateOptions) (*v1.Namespace, error) { return namespace, nil @@ -61,28 +45,3 @@ func (*Namespace) Get(ctx context.Context, name string, opts metav1.GetOptions) }, }, nil } - -// List implements v1.NamespaceInterface -func (*Namespace) List(ctx context.Context, opts metav1.ListOptions) (*v1.NamespaceList, error) { - panic("unimplemented") -} - -// Patch implements v1.NamespaceInterface -func (*Namespace) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Namespace, err error) { - panic("unimplemented") -} - -// Update implements v1.NamespaceInterface -func (*Namespace) Update(ctx context.Context, namespace *v1.Namespace, opts metav1.UpdateOptions) (*v1.Namespace, error) { - panic("unimplemented") -} - -// UpdateStatus implements v1.NamespaceInterface -func (*Namespace) UpdateStatus(ctx context.Context, namespace *v1.Namespace, opts metav1.UpdateOptions) (*v1.Namespace, error) { - panic("unimplemented") -} - -// Watch implements v1.NamespaceInterface -func (*Namespace) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - panic("unimplemented") -} diff --git a/pkg/k8s/mocks/networking.go b/pkg/k8s/mocks/networking.go index ace158465..432ffd024 100644 --- a/pkg/k8s/mocks/networking.go +++ b/pkg/k8s/mocks/networking.go @@ -2,13 +2,14 @@ package mocks import ( v1 "k8s.io/client-go/kubernetes/typed/networking/v1" - rest "k8s.io/client-go/rest" ) // compile simulation whether ClientsetMock implements interface var _ v1.NetworkingV1Interface = (*NetworkingV1)(nil) -type NetworkingV1 struct{} +type NetworkingV1 struct { + v1.NetworkingV1Interface +} func NewNetworkingV1() *NetworkingV1 { return &NetworkingV1{} @@ -18,18 +19,3 @@ func NewNetworkingV1() *NetworkingV1 { func (*NetworkingV1) Ingresses(namespace string) v1.IngressInterface { return NewIngress() } - -// IngressClasses implements v1.NetworkingV1Interface -func (*NetworkingV1) IngressClasses() v1.IngressClassInterface { - panic("unimplemented") -} - -// NetworkPolicies implements v1.NetworkingV1Interface -func (*NetworkingV1) NetworkPolicies(namespace string) v1.NetworkPolicyInterface { - panic("unimplemented") -} - -// RESTClient implements v1.NetworkingV1Interface -func (*NetworkingV1) RESTClient() rest.Interface { - panic("unimplemented") -} diff --git a/pkg/k8s/mocks/persistentvolumeclaim.go b/pkg/k8s/mocks/persistentvolumeclaim.go index 81a6e4a91..4842332dc 100644 --- a/pkg/k8s/mocks/persistentvolumeclaim.go +++ b/pkg/k8s/mocks/persistentvolumeclaim.go @@ -8,31 +8,20 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - configcorev1 "k8s.io/client-go/applyconfigurations/core/v1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" ) // compile simulation whether ClientsetMock implements interface var _ corev1.PersistentVolumeClaimInterface = (*Pvc)(nil) -type Pvc struct{} +type Pvc struct { + corev1.PersistentVolumeClaimInterface +} func NewPvc() *Pvc { return &Pvc{} } -// Apply implements v1.PersistentVolumeClaimInterface -func (*Pvc) Apply(ctx context.Context, persistentVolumeClaim *configcorev1.PersistentVolumeClaimApplyConfiguration, opts metav1.ApplyOptions) (result *v1.PersistentVolumeClaim, err error) { - panic("unimplemented") -} - -// ApplyStatus implements v1.PersistentVolumeClaimInterface -func (*Pvc) ApplyStatus(ctx context.Context, persistentVolumeClaim *configcorev1.PersistentVolumeClaimApplyConfiguration, opts metav1.ApplyOptions) (result *v1.PersistentVolumeClaim, err error) { - panic("unimplemented") -} - // Create implements v1.PersistentVolumeClaimInterface func (*Pvc) Create(ctx context.Context, persistentVolumeClaim *v1.PersistentVolumeClaim, opts metav1.CreateOptions) (*v1.PersistentVolumeClaim, error) { if persistentVolumeClaim.Name == CreateBad { @@ -51,26 +40,6 @@ func (*Pvc) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) } } -// DeleteCollection implements v1.PersistentVolumeClaimInterface -func (*Pvc) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - panic("unimplemented") -} - -// Get implements v1.PersistentVolumeClaimInterface -func (*Pvc) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.PersistentVolumeClaim, error) { - panic("unimplemented") -} - -// List implements v1.PersistentVolumeClaimInterface -func (*Pvc) List(ctx context.Context, opts metav1.ListOptions) (*v1.PersistentVolumeClaimList, error) { - panic("unimplemented") -} - -// Patch implements v1.PersistentVolumeClaimInterface -func (*Pvc) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PersistentVolumeClaim, err error) { - panic("unimplemented") -} - // Update implements v1.PersistentVolumeClaimInterface func (*Pvc) Update(ctx context.Context, persistentVolumeClaim *v1.PersistentVolumeClaim, opts metav1.UpdateOptions) (*v1.PersistentVolumeClaim, error) { if persistentVolumeClaim.Name == UpdateBad { @@ -79,13 +48,3 @@ func (*Pvc) Update(ctx context.Context, persistentVolumeClaim *v1.PersistentVolu return nil, errors.NewNotFound(schema.GroupResource{}, persistentVolumeClaim.Name) } } - -// UpdateStatus implements v1.PersistentVolumeClaimInterface -func (*Pvc) UpdateStatus(ctx context.Context, persistentVolumeClaim *v1.PersistentVolumeClaim, opts metav1.UpdateOptions) (*v1.PersistentVolumeClaim, error) { - panic("unimplemented") -} - -// Watch implements v1.PersistentVolumeClaimInterface -func (*Pvc) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - panic("unimplemented") -} diff --git a/pkg/k8s/mocks/pod.go b/pkg/k8s/mocks/pod.go index 7e773fbd1..15f1f3419 100644 --- a/pkg/k8s/mocks/pod.go +++ b/pkg/k8s/mocks/pod.go @@ -5,102 +5,23 @@ import ( "fmt" v1 "k8s.io/api/core/v1" - policyv1 "k8s.io/api/policy/v1" - policy "k8s.io/api/policy/v1beta1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - configcorev1 "k8s.io/client-go/applyconfigurations/core/v1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" - restclient "k8s.io/client-go/rest" ) // compile simulation whether ClientsetMock implements interface var _ corev1.PodInterface = (*Pod)(nil) -type Pod struct{} +type Pod struct { + corev1.PodInterface +} func NewPod() *Pod { return &Pod{} } -// Bind implements v1.PodInterface -func (*Pod) Bind(ctx context.Context, binding *v1.Binding, opts metav1.CreateOptions) error { - panic("unimplemented") -} - -// Evict implements v1.PodInterface -func (*Pod) Evict(ctx context.Context, eviction *policy.Eviction) error { - panic("unimplemented") -} - -// EvictV1 implements v1.PodInterface -func (*Pod) EvictV1(ctx context.Context, eviction *policyv1.Eviction) error { - panic("unimplemented") -} - -// EvictV1beta1 implements v1.PodInterface -func (*Pod) EvictV1beta1(ctx context.Context, eviction *policy.Eviction) error { - panic("unimplemented") -} - -// GetLogs implements v1.PodInterface -func (*Pod) GetLogs(name string, opts *v1.PodLogOptions) *restclient.Request { - panic("unimplemented") -} - -// ProxyGet implements v1.PodInterface -func (*Pod) ProxyGet(scheme string, name string, port string, path string, params map[string]string) restclient.ResponseWrapper { - panic("unimplemented") -} - -// Apply implements v1.PodInterface -func (*Pod) Apply(ctx context.Context, pod *configcorev1.PodApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Pod, err error) { - panic("unimplemented") -} - -// ApplyStatus implements v1.PodInterface -func (*Pod) ApplyStatus(ctx context.Context, pod *configcorev1.PodApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Pod, err error) { - panic("unimplemented") -} - -// DeleteCollection implements v1.PodInterface -func (*Pod) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - panic("unimplemented") -} - -// Get implements v1.PodInterface -func (*Pod) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Pod, error) { - panic("unimplemented") -} - -// List implements v1.PodInterface -func (*Pod) List(ctx context.Context, opts metav1.ListOptions) (*v1.PodList, error) { - panic("unimplemented") -} - -// Patch implements v1.PodInterface -func (*Pod) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Pod, err error) { - panic("unimplemented") -} - -// UpdateEphemeralContainers implements v1.PodInterface -func (*Pod) UpdateEphemeralContainers(ctx context.Context, podName string, pod *v1.Pod, opts metav1.UpdateOptions) (*v1.Pod, error) { - panic("unimplemented") -} - -// UpdateStatus implements v1.PodInterface -func (*Pod) UpdateStatus(ctx context.Context, pod *v1.Pod, opts metav1.UpdateOptions) (*v1.Pod, error) { - panic("unimplemented") -} - -// Watch implements v1.PodInterface -func (*Pod) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - panic("unimplemented") -} - // Create implements v1.PodInterface func (*Pod) Create(ctx context.Context, pod *v1.Pod, opts metav1.CreateOptions) (*v1.Pod, error) { if pod.Name == CreateBad { diff --git a/pkg/k8s/mocks/secret.go b/pkg/k8s/mocks/secret.go index 1c77a8b47..47db6d4b5 100644 --- a/pkg/k8s/mocks/secret.go +++ b/pkg/k8s/mocks/secret.go @@ -8,26 +8,20 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - configcorev1 "k8s.io/client-go/applyconfigurations/core/v1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" ) // compile simulation whether ClientsetMock implements interface var _ corev1.SecretInterface = (*Secret)(nil) -type Secret struct{} +type Secret struct { + corev1.SecretInterface +} func NewSecret() *Secret { return &Secret{} } -// Apply implements v1.SecretInterface -func (*Secret) Apply(ctx context.Context, secret *configcorev1.SecretApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Secret, err error) { - panic("unimplemented") -} - // Create implements v1.SecretInterface func (*Secret) Create(ctx context.Context, secret *v1.Secret, opts metav1.CreateOptions) (*v1.Secret, error) { if secret.Name == CreateBad { @@ -46,26 +40,6 @@ func (*Secret) Delete(ctx context.Context, name string, opts metav1.DeleteOption } } -// DeleteCollection implements v1.SecretInterface -func (*Secret) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - panic("unimplemented") -} - -// Get implements v1.SecretInterface -func (*Secret) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Secret, error) { - panic("unimplemented") -} - -// List implements v1.SecretInterface -func (*Secret) List(ctx context.Context, opts metav1.ListOptions) (*v1.SecretList, error) { - panic("unimplemented") -} - -// Patch implements v1.SecretInterface -func (*Secret) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Secret, err error) { - panic("unimplemented") -} - // Update implements v1.SecretInterface func (*Secret) Update(ctx context.Context, secret *v1.Secret, opts metav1.UpdateOptions) (*v1.Secret, error) { if secret.Name == UpdateBad { @@ -74,8 +48,3 @@ func (*Secret) Update(ctx context.Context, secret *v1.Secret, opts metav1.Update return nil, errors.NewNotFound(schema.GroupResource{}, secret.Name) } } - -// Watch implements v1.SecretInterface -func (*Secret) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - panic("unimplemented") -} diff --git a/pkg/k8s/mocks/service.go b/pkg/k8s/mocks/service.go index 4b5fd3a3d..63f3ee776 100644 --- a/pkg/k8s/mocks/service.go +++ b/pkg/k8s/mocks/service.go @@ -8,37 +8,20 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - configcorev1 "k8s.io/client-go/applyconfigurations/core/v1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" - restclient "k8s.io/client-go/rest" ) // compile simulation whether ClientsetMock implements interface var _ corev1.ServiceInterface = (*Service)(nil) -type Service struct{} +type Service struct { + corev1.ServiceInterface +} func NewService() *Service { return &Service{} } -// ProxyGet implements v1.ServiceInterface -func (*Service) ProxyGet(scheme string, name string, port string, path string, params map[string]string) restclient.ResponseWrapper { - panic("unimplemented") -} - -// Apply implements v1.ServiceInterface -func (*Service) Apply(ctx context.Context, service *configcorev1.ServiceApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Service, err error) { - panic("unimplemented") -} - -// ApplyStatus implements v1.ServiceInterface -func (*Service) ApplyStatus(ctx context.Context, service *configcorev1.ServiceApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Service, err error) { - panic("unimplemented") -} - // Create implements v1.ServiceInterface func (*Service) Create(ctx context.Context, service *v1.Service, opts metav1.CreateOptions) (*v1.Service, error) { if service.Name == CreateBad { @@ -72,16 +55,6 @@ func (*Service) Get(ctx context.Context, name string, opts metav1.GetOptions) (* return nil, fmt.Errorf("mock error: unknown") } -// List implements v1.ServiceInterface -func (*Service) List(ctx context.Context, opts metav1.ListOptions) (*v1.ServiceList, error) { - panic("unimplemented") -} - -// Patch implements v1.ServiceInterface -func (*Service) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Service, err error) { - panic("unimplemented") -} - // Update implements v1.ServiceInterface func (*Service) Update(ctx context.Context, service *v1.Service, opts metav1.UpdateOptions) (*v1.Service, error) { if service.Name == UpdateBad { @@ -90,13 +63,3 @@ func (*Service) Update(ctx context.Context, service *v1.Service, opts metav1.Upd return nil, errors.NewNotFound(schema.GroupResource{}, service.Name) } } - -// UpdateStatus implements v1.ServiceInterface -func (*Service) UpdateStatus(ctx context.Context, service *v1.Service, opts metav1.UpdateOptions) (*v1.Service, error) { - panic("unimplemented") -} - -// Watch implements v1.ServiceInterface -func (*Service) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - panic("unimplemented") -} diff --git a/pkg/k8s/mocks/serviceaccount.go b/pkg/k8s/mocks/serviceaccount.go index 4729cfaf2..bd57ba026 100644 --- a/pkg/k8s/mocks/serviceaccount.go +++ b/pkg/k8s/mocks/serviceaccount.go @@ -4,31 +4,24 @@ import ( "context" "fmt" - authenticationv1 "k8s.io/api/authentication/v1" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - configcorev1 "k8s.io/client-go/applyconfigurations/core/v1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" ) // compile simulation whether ClientsetMock implements interface var _ corev1.ServiceAccountInterface = (*ServiceAccount)(nil) -type ServiceAccount struct{} +type ServiceAccount struct { + corev1.ServiceAccountInterface +} func NewServiceAccount() *ServiceAccount { return &ServiceAccount{} } -// Apply implements v1.ServiceAccountInterface -func (*ServiceAccount) Apply(ctx context.Context, serviceAccount *configcorev1.ServiceAccountApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ServiceAccount, err error) { - panic("unimplemented") -} - // Create implements v1.ServiceAccountInterface func (*ServiceAccount) Create(ctx context.Context, serviceAccount *v1.ServiceAccount, opts metav1.CreateOptions) (*v1.ServiceAccount, error) { if serviceAccount.Name == CreateBad { @@ -38,11 +31,6 @@ func (*ServiceAccount) Create(ctx context.Context, serviceAccount *v1.ServiceAcc } } -// CreateToken implements v1.ServiceAccountInterface -func (*ServiceAccount) CreateToken(ctx context.Context, serviceAccountName string, tokenRequest *authenticationv1.TokenRequest, opts metav1.CreateOptions) (*authenticationv1.TokenRequest, error) { - panic("unimplemented") -} - // Delete implements v1.ServiceAccountInterface func (*ServiceAccount) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { if name == DeleteBad { @@ -52,26 +40,6 @@ func (*ServiceAccount) Delete(ctx context.Context, name string, opts metav1.Dele } } -// DeleteCollection implements v1.ServiceAccountInterface -func (*ServiceAccount) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - panic("unimplemented") -} - -// Get implements v1.ServiceAccountInterface -func (*ServiceAccount) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ServiceAccount, error) { - panic("unimplemented") -} - -// List implements v1.ServiceAccountInterface -func (*ServiceAccount) List(ctx context.Context, opts metav1.ListOptions) (*v1.ServiceAccountList, error) { - panic("unimplemented") -} - -// Patch implements v1.ServiceAccountInterface -func (*ServiceAccount) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ServiceAccount, err error) { - panic("unimplemented") -} - // Update implements v1.ServiceAccountInterface func (*ServiceAccount) Update(ctx context.Context, serviceAccount *v1.ServiceAccount, opts metav1.UpdateOptions) (*v1.ServiceAccount, error) { if serviceAccount.Name == UpdateBad { @@ -80,8 +48,3 @@ func (*ServiceAccount) Update(ctx context.Context, serviceAccount *v1.ServiceAcc return nil, errors.NewNotFound(schema.GroupResource{}, serviceAccount.Name) } } - -// Watch implements v1.ServiceAccountInterface -func (*ServiceAccount) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - panic("unimplemented") -} diff --git a/pkg/k8s/mocks/statefulset.go b/pkg/k8s/mocks/statefulset.go index a72d6e137..93937faeb 100644 --- a/pkg/k8s/mocks/statefulset.go +++ b/pkg/k8s/mocks/statefulset.go @@ -5,14 +5,10 @@ import ( "fmt" v1 "k8s.io/api/apps/v1" - autoscalingv1 "k8s.io/api/autoscaling/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - configappsv1 "k8s.io/client-go/applyconfigurations/apps/v1" - applyconfigurationsautoscalingv1 "k8s.io/client-go/applyconfigurations/autoscaling/v1" appsv1 "k8s.io/client-go/kubernetes/typed/apps/v1" ) @@ -20,6 +16,7 @@ import ( var _ appsv1.StatefulSetInterface = (*StatefulSet)(nil) type StatefulSet struct { + appsv1.StatefulSetInterface ns string } @@ -29,21 +26,6 @@ func NewStatefulSet(ns string) *StatefulSet { } } -// ApplyScale implements v1.StatefulSetInterface -func (*StatefulSet) ApplyScale(ctx context.Context, statefulSetName string, scale *applyconfigurationsautoscalingv1.ScaleApplyConfiguration, opts metav1.ApplyOptions) (*autoscalingv1.Scale, error) { - panic("unimplemented") -} - -// Apply implements v1.StatefulSetInterface -func (*StatefulSet) Apply(ctx context.Context, statefulSet *configappsv1.StatefulSetApplyConfiguration, opts metav1.ApplyOptions) (result *v1.StatefulSet, err error) { - panic("unimplemented") -} - -// ApplyStatus implements v1.StatefulSetInterface -func (*StatefulSet) ApplyStatus(ctx context.Context, statefulSet *configappsv1.StatefulSetApplyConfiguration, opts metav1.ApplyOptions) (result *v1.StatefulSet, err error) { - panic("unimplemented") -} - // Create implements v1.StatefulSetInterface func (*StatefulSet) Create(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.CreateOptions) (*v1.StatefulSet, error) { if statefulSet.Name == CreateBad { @@ -62,11 +44,6 @@ func (*StatefulSet) Delete(ctx context.Context, name string, opts metav1.DeleteO } } -// DeleteCollection implements v1.StatefulSetInterface -func (*StatefulSet) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - panic("unimplemented") -} - // Get implements v1.StatefulSetInterface func (*StatefulSet) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.StatefulSet, error) { if name == "statefulset_bad" { @@ -75,11 +52,6 @@ func (*StatefulSet) Get(ctx context.Context, name string, opts metav1.GetOptions return nil, fmt.Errorf("mock error: unknown") } -// GetScale implements v1.StatefulSetInterface -func (*StatefulSet) GetScale(ctx context.Context, statefulSetName string, options metav1.GetOptions) (*autoscalingv1.Scale, error) { - panic("unimplemented") -} - // List implements v1.StatefulSetInterface func (ss *StatefulSet) List(ctx context.Context, opts metav1.ListOptions) (*v1.StatefulSetList, error) { if ss.ns == "bad_test" { @@ -89,11 +61,6 @@ func (ss *StatefulSet) List(ctx context.Context, opts metav1.ListOptions) (*v1.S } } -// Patch implements v1.StatefulSetInterface -func (*StatefulSet) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.StatefulSet, err error) { - panic("unimplemented") -} - // Update implements v1.StatefulSetInterface func (*StatefulSet) Update(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.UpdateOptions) (*v1.StatefulSet, error) { if statefulSet.Name == UpdateBad { @@ -103,16 +70,6 @@ func (*StatefulSet) Update(ctx context.Context, statefulSet *v1.StatefulSet, opt } } -// UpdateScale implements v1.StatefulSetInterface -func (*StatefulSet) UpdateScale(ctx context.Context, statefulSetName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (*autoscalingv1.Scale, error) { - panic("unimplemented") -} - -// UpdateStatus implements v1.StatefulSetInterface -func (*StatefulSet) UpdateStatus(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.UpdateOptions) (*v1.StatefulSet, error) { - panic("unimplemented") -} - // Watch implements v1.StatefulSetInterface func (*StatefulSet) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { switch opts.FieldSelector {