diff --git a/commands/pkgcmd.go b/commands/pkgcmd.go index a2b851a2eb..eb6cd75b83 100644 --- a/commands/pkgcmd.go +++ b/commands/pkgcmd.go @@ -20,8 +20,6 @@ import ( "github.com/GoogleContainerTools/kpt/internal/cmddiff" "github.com/GoogleContainerTools/kpt/internal/cmdget" "github.com/GoogleContainerTools/kpt/internal/cmdinit" - "github.com/GoogleContainerTools/kpt/internal/cmdpull" - "github.com/GoogleContainerTools/kpt/internal/cmdpush" "github.com/GoogleContainerTools/kpt/internal/cmdupdate" "github.com/GoogleContainerTools/kpt/internal/docs/generated/pkgdocs" "github.com/GoogleContainerTools/kpt/thirdparty/cmdconfig/commands/cmdtree" @@ -49,8 +47,7 @@ func GetPkgCommand(ctx context.Context, name string) *cobra.Command { pkg.AddCommand( cmdget.NewCommand(ctx, name), cmdinit.NewCommand(ctx, name), cmdupdate.NewCommand(ctx, name), cmddiff.NewCommand(ctx, name), - cmdtree.NewCommand(ctx, name), cmdpull.NewCommand(ctx, name), - cmdpush.NewCommand(ctx, name), + cmdtree.NewCommand(ctx, name), ) return pkg } diff --git a/go.mod b/go.mod index c8d51773e5..e0d1bcd2bf 100644 --- a/go.mod +++ b/go.mod @@ -3,11 +3,9 @@ module github.com/GoogleContainerTools/kpt go 1.17 require ( - github.com/Masterminds/semver v1.5.0 github.com/cpuguy83/go-md2man/v2 v2.0.1 github.com/go-errors/errors v1.4.2 github.com/google/go-cmp v0.5.7 - github.com/google/go-containerregistry v0.8.0 github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 github.com/igorsobreira/titlecase v0.0.0-20140109233139-4156b5b858ac github.com/otiai10/copy v1.7.0 @@ -44,12 +42,7 @@ require ( github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5 // indirect - github.com/containerd/stargz-snapshotter/estargz v0.10.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/docker/cli v20.10.12+incompatible // indirect - github.com/docker/distribution v2.7.1+incompatible // indirect - github.com/docker/docker v20.10.12+incompatible // indirect - github.com/docker/docker-credential-helpers v0.6.4 // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect @@ -70,10 +63,8 @@ require ( github.com/jonboulle/clockwork v0.2.2 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.13.6 // indirect github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect github.com/mailru/easyjson v0.7.6 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-wordwrap v1.0.0 // indirect github.com/mitchellh/mapstructure v1.4.3 // indirect github.com/moby/spdystream v0.2.0 // indirect @@ -82,23 +73,18 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect github.com/onsi/gomega v1.17.0 // indirect - github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.0.2-0.20211117181255-693428a734f5 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/russross/blackfriday v1.5.2 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sergi/go-diff v1.1.0 // indirect - github.com/sirupsen/logrus v1.8.1 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/spyzhov/ajson v0.4.2 // indirect - github.com/vbatts/tar-split v0.11.2 // indirect go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect golang.org/x/net v0.0.0-20211216030914-fe4d6282115f // indirect golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect - golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect golang.org/x/text v0.3.7 // indirect @@ -106,6 +92,7 @@ require ( golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.27.1 // indirect + gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect diff --git a/go.sum b/go.sum index bd4bc06ffe..2db6ee1336 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,3 @@ -bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= 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.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -49,27 +48,19 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= github.com/Azure/go-autorest/autorest v0.11.18 h1:90Y4srNYrwOtAgVo3ndrQkTYn6kf1Eg/AjTFJ8Is2aM= github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= -github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= -github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/adal v0.9.13 h1:Mp5hbtOePIzM8pJVRa3YLrWWmZtoxRXqUEzCfJt3+/Q= github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= @@ -79,27 +70,6 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= 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/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= -github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= -github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= -github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= -github.com/Microsoft/go-winio v0.4.16-0.20201130162521-d1ffc52c7331/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.4.17-0.20210324224401-5516f17a5958/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.4.17/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= -github.com/Microsoft/hcsshim v0.8.7-0.20190325164909-8abdbb8205e4/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= -github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= -github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8= -github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2ow3VK6a9Lg= -github.com/Microsoft/hcsshim v0.8.15/go.mod h1:x38A4YbHbdxJtc0sF6oIz+RG0npwSCAvn69iY6URG00= -github.com/Microsoft/hcsshim v0.8.16/go.mod h1:o5/SZqmR7x9JNKsW3pu+nqHm0MF8vbA+VxGOoXdC600= -github.com/Microsoft/hcsshim v0.8.23/go.mod h1:4zegtUJth7lAvFyc6cH2gGQ5B3OFQim01nnU2M8jKDg= -github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU= -github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY= 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/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= @@ -107,13 +77,11 @@ github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tN github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= 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/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= 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= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= @@ -124,28 +92,16 @@ 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-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 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-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= -github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= -github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= 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/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= -github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= -github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= -github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= -github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= -github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= @@ -157,16 +113,9 @@ github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cb github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5 h1:7aWHqerlJ41y6FOsEUvknqgXnGmJyJSbjhAWq5pO4F8= github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= -github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= -github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= -github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc= -github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= -github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= -github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= 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= @@ -180,154 +129,32 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= -github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE= -github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU= -github.com/containerd/aufs v0.0.0-20210316121734-20793ff83c97/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= -github.com/containerd/aufs v1.0.0/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= -github.com/containerd/btrfs v0.0.0-20201111183144-404b9149801e/go.mod h1:jg2QkJcsabfHugurUvvPhS3E08Oxiuh5W/g1ybB4e0E= -github.com/containerd/btrfs v0.0.0-20210316141732-918d888fb676/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= -github.com/containerd/btrfs v1.0.0/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= -github.com/containerd/cgroups v0.0.0-20190717030353-c4b9ac5c7601/go.mod h1:X9rLEHIqSf/wfK8NsPqxJmeZgW4pcfzdXITDrUSJ6uI= -github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= -github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM= -github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= -github.com/containerd/cgroups v0.0.0-20200824123100-0b889c03f102/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= -github.com/containerd/cgroups v0.0.0-20210114181951-8a68de567b68/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= -github.com/containerd/cgroups v1.0.1/go.mod h1:0SJrPIenamHDcZhEcJMNBB85rHcUsw4f25ZfBiPYRkU= -github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= -github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= -github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= -github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= -github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= -github.com/containerd/containerd v1.2.10/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.1-0.20191213020239-082f7e3aed57/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.4.0-beta.2.0.20200729163537-40b22ef07410/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.4.1/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.4.9/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.5.0-beta.1/go.mod h1:5HfvG1V2FsKesEGQ17k5/T7V960Tmcumvqn8Mc+pCYQ= -github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo/uBBoBORwEx6ardVcmKU= -github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09ZvgqEq8EfBp/m3lcVZIvPHhI= -github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s= -github.com/containerd/containerd v1.5.8/go.mod h1:YdFSv5bTFLpG2HIYmfqDpSYYTDX+mc5qtSuYx1YUb/s= -github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo= -github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y= -github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EXlVlkqNba9rJe3j7w3Xa924itAMLgZH4UD/Q4PExuQ= -github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= -github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= -github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= -github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= -github.com/containerd/fifo v0.0.0-20201026212402-0724c46b320c/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= -github.com/containerd/fifo v0.0.0-20210316144830-115abcc95a1d/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= -github.com/containerd/fifo v1.0.0/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= -github.com/containerd/go-cni v1.0.1/go.mod h1:+vUpYxKvAF72G9i1WoDOiPGRtQpqsNW/ZHtSlv++smU= -github.com/containerd/go-cni v1.0.2/go.mod h1:nrNABBHzu0ZwCug9Ije8hL2xBCYh/pjfMb1aZGrrohk= -github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= -github.com/containerd/go-runc v0.0.0-20190911050354-e029b79d8cda/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= -github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328/go.mod h1:PpyHrqVs8FTi9vpyHwPwiNEGaACDxT/N/pLcvMSRA9g= -github.com/containerd/go-runc v0.0.0-20201020171139-16b287bc67d0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= -github.com/containerd/go-runc v1.0.0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= -github.com/containerd/imgcrypt v1.0.1/go.mod h1:mdd8cEPW7TPgNG4FpuP3sGBiQ7Yi/zak9TYCG3juvb0= -github.com/containerd/imgcrypt v1.0.4-0.20210301171431-0ae5c75f59ba/go.mod h1:6TNsg0ctmizkrOgXRNQjAPFWpMYRWuiB6dSF4Pfa5SA= -github.com/containerd/imgcrypt v1.1.1-0.20210312161619-7ed62a527887/go.mod h1:5AZJNI6sLHJljKuI9IHnw1pWqo/F0nGDOuR9zgTs7ow= -github.com/containerd/imgcrypt v1.1.1/go.mod h1:xpLnwiQmEUJPvQoAapeb2SNCxz7Xr6PJrXQb0Dpc4ms= -github.com/containerd/nri v0.0.0-20201007170849-eb1350a75164/go.mod h1:+2wGSDGFYfE5+So4M5syatU0N0f0LbWpuqyMi4/BE8c= -github.com/containerd/nri v0.0.0-20210316161719-dbaa18c31c14/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= -github.com/containerd/nri v0.1.0/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= -github.com/containerd/stargz-snapshotter/estargz v0.10.1 h1:hd1EoVjI2Ax8Cr64tdYqnJ4i4pZU49FkEf5kU8KxQng= -github.com/containerd/stargz-snapshotter/estargz v0.10.1/go.mod h1:aE5PCyhFMwR8sbrErO5eM2GcvkyXTTJremG883D4qF0= -github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= -github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= -github.com/containerd/ttrpc v0.0.0-20191028202541-4f1b8fe65a5c/go.mod h1:LPm1u0xBw8r8NOKoOdNMeVHSawSsltak+Ihv+etqsE8= -github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= -github.com/containerd/ttrpc v1.0.2/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= -github.com/containerd/ttrpc v1.1.0/go.mod h1:XX4ZTnoOId4HklF4edwc4DcqskFZuvXB1Evzy5KFQpQ= -github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= -github.com/containerd/typeurl v0.0.0-20190911142611-5eb25027c9fd/go.mod h1:GeKYzf2pQcqv7tJ0AoCuuhtnqhva5LNU3U+OyKxxJpk= -github.com/containerd/typeurl v1.0.1/go.mod h1:TB1hUtrpaiO88KEK56ijojHS1+NeF0izUACaJW2mdXg= -github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= -github.com/containerd/zfs v0.0.0-20200918131355-0a33824f23a2/go.mod h1:8IgZOBdv8fAgXddBT4dBXJPtxyRsejFIpXoklgxgEjw= -github.com/containerd/zfs v0.0.0-20210301145711-11e8f1707f62/go.mod h1:A9zfAbMlQwE+/is6hi0Xw8ktpL+6glmqZYtevJgaB8Y= -github.com/containerd/zfs v0.0.0-20210315114300-dde8f0fda960/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= -github.com/containerd/zfs v0.0.0-20210324211415-d5c4544f0433/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= -github.com/containerd/zfs v1.0.0/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= -github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= -github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= -github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= -github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHVlzhJpcY6TQxn/fUyDDM= -github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8= -github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc= -github.com/containers/ocicrypt v1.1.0/go.mod h1:b8AOe0YR67uU8OqfVNcznfFpAzu3rdgUV4GP9qXPfu4= -github.com/containers/ocicrypt v1.1.1/go.mod h1:Dm55fwWm1YZAjYRaJ94z2mfZikIyIN4B0oB3dj3jFxY= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= -github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -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/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= -github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKYj/3DxU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= -github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= -github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= -github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= -github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I= -github.com/danieljoos/wincred v1.1.0/go.mod h1:XYlo+eRTsVA9aHGp7NGjFkPla4m+DCL7hqDjlFjiygg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= -github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= -github.com/docker/cli v20.10.12+incompatible h1:lZlz0uzG+GH+c0plStMUdF/qk3ppmgnswpR5EbqzVGA= -github.com/docker/cli v20.10.12+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= -github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -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 v20.10.12+incompatible h1:CEeNmFM0QZIsJCZKMkZx0ZcahTiewkrgiwfYD+dfl1U= -github.com/docker/docker v20.10.12+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker-credential-helpers v0.6.4 h1:axCks+yV+2MR3/kZhAmy07yC56WZ2Pwu/fKWtKuZB0o= -github.com/docker/docker-credential-helpers v0.6.4/go.mod h1:ofX3UI0Gz1TteYBjtgs07O36Pyasyp66D2uKT7H8W1c= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= -github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= -github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= -github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= -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/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/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= @@ -345,7 +172,6 @@ github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPO github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= -github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -359,18 +185,14 @@ github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible h1:7ZaBxOI7TMoYBfyA3cQHErNNyAWIKUMIwqxEtgHOs5c= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= -github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= github.com/fvbommel/sortorder v1.0.1 h1:dSnXLt4mJYH25uDDGa3biZNQsozaUWDSWeKJ0qqFfzE= github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= -github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= -github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= @@ -378,7 +200,6 @@ github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3Bop github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= @@ -393,38 +214,25 @@ github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbV github.com/go-logr/zapr v0.4.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= -github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= -github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= -github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= -github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= -github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= -github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/protobuf v1.1.1/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/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 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-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -479,8 +287,6 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -github.com/google/go-containerregistry v0.8.0 h1:mtR24eN6rapCN+shds82qFEIWWmg64NPMuyCNT7/Ogc= -github.com/google/go-containerregistry v0.8.0/go.mod h1:wW5v71NHGnQyb4k+gSshjxidrC7lN33MdWEn+Mz9TsI= 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= @@ -505,41 +311,32 @@ github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLe github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= -github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= 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/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -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.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= -github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= 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= @@ -549,7 +346,6 @@ github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39E github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= @@ -581,17 +377,11 @@ github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1: github.com/igorsobreira/titlecase v0.0.0-20140109233139-4156b5b858ac h1:AfRcPFr4uK97K6YaYi9XmNY/cTPF+cLspaXocdqkdCQ= github.com/igorsobreira/titlecase v0.0.0-20140109233139-4156b5b858ac/go.mod h1:KOzUkqpWM2xArNm82cehGc5PBFYV1Qadzzt81aJi7F0= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= @@ -599,7 +389,6 @@ github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8Hm github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -614,12 +403,7 @@ github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvW github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc= -github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= 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/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= @@ -627,8 +411,8 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= 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/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= @@ -644,34 +428,27 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= 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.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= -github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= 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= @@ -683,15 +460,8 @@ github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= -github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= -github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= -github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= -github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ= -github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= -github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 h1:yH0SvLzcbZxcJXho2yh7CqdENGMQe73Cw3woZBpPli0= github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -703,68 +473,32 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= -github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/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= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= -github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= github.com/onsi/gomega v1.15.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v1.0.0-rc1.0.20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.0.2-0.20211117181255-693428a734f5 h1:q37d91F6BO4Jp1UqWiun0dUFYaqv6WsKTLTCaWv+8LY= -github.com/opencontainers/image-spec v1.0.2-0.20211117181255-693428a734f5/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.0-rc93/go.mod h1:3NOsor4w32B2tC0Zbl8Knk4Wg84SM2ImC1fxBuqJ/H0= -github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= -github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.2-0.20190207185410-29686dbc5559/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= -github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE= -github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo= -github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/otiai10/copy v1.7.0 h1:hVoPiN+t+7d2nzzwMiDHPSOogsWAStewq3TwU05+clE= github.com/otiai10/copy v1.7.0/go.mod h1:rmRl6QPdJj6EiUqXQ/4Nn2lLXoNQjFCQbbNrxgc/t3U= @@ -776,7 +510,6 @@ github.com/otiai10/mint v1.3.3/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH 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/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= @@ -784,7 +517,6 @@ github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR github.com/philopon/go-toposort v0.0.0-20170620085441-9be86dbd762f h1:WyCn68lTiytVSkk7W1K9nBiSGTSRlUOdyTnSjwrIlok= github.com/philopon/go-toposort v0.0.0-20170620085441-9be86dbd762f/go.mod h1:/iRjX3DdSK956SzsUdV55J+wIsQ+2IBWmBrB4RvZfk4= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 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= @@ -794,41 +526,31 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= -github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.28.0 h1:vGVfV9KrDTvWt5boZO0I19g2E3CsWfpPPKZM9dt3mEw= github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= @@ -841,25 +563,17 @@ github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig= -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/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= -github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= 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/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= @@ -871,8 +585,6 @@ github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= @@ -881,8 +593,6 @@ github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= @@ -892,14 +602,11 @@ github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= github.com/spyzhov/ajson v0.4.2 h1:JMByd/jZApPKDvNsmO90X2WWGbmT2ahDFp73QhZbg3s= github.com/spyzhov/ajson v0.4.2/go.mod h1:63V+CGM6f1Bu/p4nLIN8885ojBdt88TbLoSFzyqMuVA= -github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= -github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -908,33 +615,10 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= -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/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/vbatts/tar-split v0.11.2 h1:Via6XqJr0hceW4wff3QRzD5gAk/tatMw/4ZA7cTlIME= -github.com/vbatts/tar-split v0.11.2/go.mod h1:vV3ZuO2yWSVsz+pfFzDG/upWH1JhjOiEaWq6kXyQ3VI= -github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= -github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= -github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= -github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI= -github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= -github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= -github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= -github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xlab/treeprint v1.1.0 h1:G/1DjNkPpfZCFt9CSh6b5/nY4VimlbHF3Rh4obvtzDk= @@ -946,15 +630,8 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= -github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= -github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= @@ -965,7 +642,6 @@ go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lL go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= -go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= 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= @@ -987,7 +663,6 @@ go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16g go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 h1:+FNtrFTmVw0YZGpBGX56XDee331t6JAXeK2bcyhLOOc= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= -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.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= @@ -1002,23 +677,17 @@ go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= -golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/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-20190510104115-cbcb75029529/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-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/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-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s39J9CbLn7Cc5a7IC5rwsMQ= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1062,7 +731,6 @@ golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1076,14 +744,11 @@ golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 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-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1099,13 +764,11 @@ golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= @@ -1118,7 +781,6 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211216030914-fe4d6282115f h1:hEYJvxw1lSnWIl8X9ofsYMklzaDs90JI2az5YMd4fPM= golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -1151,7 +813,6 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1167,41 +828,27 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190422165155-953cdadca894/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= -golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1212,23 +859,14 @@ golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201117170446-d9b008d0a637/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201202213521-69691e467435/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1238,11 +876,9 @@ golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1259,7 +895,6 @@ golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1280,11 +915,9 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -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/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1301,7 +934,6 @@ golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= @@ -1352,7 +984,6 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= -golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= 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/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1360,7 +991,6 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1N golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= -google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -1402,13 +1032,11 @@ google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCID google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk= 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-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/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= @@ -1417,7 +1045,6 @@ google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvx google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200117163144-32f20d992d24/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -1440,7 +1067,6 @@ google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201102152239-715cce707fb0/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1472,14 +1098,11 @@ google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20211203200212-54befc351ae9/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/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.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -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/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= @@ -1503,7 +1126,7 @@ google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnD google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1519,19 +1142,15 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= 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-20141024133853-64131543e789/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/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -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/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= 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.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= @@ -1540,8 +1159,6 @@ gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= 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/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/square/go-jose.v2 v2.5.1/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= @@ -1570,9 +1187,6 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= -k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= -k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= k8s.io/api v0.22.2/go.mod h1:y3ydYpLJAaDI+BbSe2xmGcqxiWHmWjkEeIbiwHvnPR8= k8s.io/api v0.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= k8s.io/api v0.23.3 h1:KNrME8KHGr12Ozjf8ytOewKzZh6hl/hHUZeHddT3a38= @@ -1581,25 +1195,16 @@ k8s.io/apiextensions-apiserver v0.22.2/go.mod h1:2E0Ve/isxNl7tWLSUDgi6+cmwHi5fQR k8s.io/apiextensions-apiserver v0.23.0/go.mod h1:xIFAEEDlAZgpVBl/1VSjGDmLoXAWRG40+GsWhKhAxY4= k8s.io/apiextensions-apiserver v0.23.3 h1:JvPJA7hSEAqMRteveq4aj9semilAZYcJv+9HHFWfUdM= k8s.io/apiextensions-apiserver v0.23.3/go.mod h1:/ZpRXdgKZA6DvIVPEmXDCZJN53YIQEUDF+hrpIQJL38= -k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= k8s.io/apimachinery v0.22.2/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= k8s.io/apimachinery v0.23.3 h1:7IW6jxNzrXTsP0c8yXz2E5Yx/WTzVPTsHIx/2Vm0cIk= k8s.io/apimachinery v0.23.3/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= -k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= -k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= -k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= k8s.io/apiserver v0.22.2/go.mod h1:vrpMmbyjWrgdyOvZTSpsusQq5iigKNWv9o9KlDAbBHI= k8s.io/apiserver v0.23.0/go.mod h1:Cec35u/9zAepDPPFyT+UMrgqOCjgJ5qtfVJDxjZYmt4= k8s.io/apiserver v0.23.3/go.mod h1:3HhsTmC+Pn+Jctw+Ow0LHA4dQ4oXrQ4XJDzrVDG64T4= k8s.io/cli-runtime v0.22.2/go.mod h1:tkm2YeORFpbgQHEK/igqttvPTRIHFRz5kATlw53zlMI= k8s.io/cli-runtime v0.23.3 h1:aJiediw+uUbxkfO6BNulcAMTUoU9Om43g3R7rIkYqcw= k8s.io/cli-runtime v0.23.3/go.mod h1:yA00O5pDqnjkBh8fkuugBbfIfjB1nOpz+aYLotbnOfc= -k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= -k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k= -k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0= k8s.io/client-go v0.22.2/go.mod h1:sAlhrkVDf50ZHx6z4K0S40wISNTarf1r800F+RlCF6U= k8s.io/client-go v0.23.0/go.mod h1:hrDnpnK1mSr65lHHcUuIZIXDgEbzc7/683c6hyG4jTA= k8s.io/client-go v0.23.3 h1:23QYUmCQ/W6hW78xIwm3XqZrrKZM+LWDqW2zfo+szJs= @@ -1607,38 +1212,27 @@ k8s.io/client-go v0.23.3/go.mod h1:47oMd+YvAOqZM7pcQ6neJtBiFH7alOyfunYN48VsmwE= k8s.io/code-generator v0.22.2/go.mod h1:eV77Y09IopzeXOJzndrDyCI88UBok2h6WxAlBwpxa+o= k8s.io/code-generator v0.23.0/go.mod h1:vQvOhDXhuzqiVfM/YHp+dmg10WDZCchJVObc9MvowsE= k8s.io/code-generator v0.23.3/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= -k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= -k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= -k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= k8s.io/component-base v0.22.2/go.mod h1:5Br2QhI9OTe79p+TzPe9JKNQYvEKbq9rTJDWllunGug= k8s.io/component-base v0.23.0/go.mod h1:DHH5uiFvLC1edCpvcTDV++NKULdYYU6pR9Tt3HIKMKI= k8s.io/component-base v0.23.3 h1:q+epprVdylgecijVGVdf4MbizEL2feW4ssd7cdo6LVY= k8s.io/component-base v0.23.3/go.mod h1:1Smc4C60rWG7d3HjSYpIwEbySQ3YWg0uzH5a2AtaTLg= k8s.io/component-helpers v0.22.2/go.mod h1:+N61JAR9aKYSWbnLA88YcFr9K/6ISYvRNybX7QW7Rs8= -k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= -k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= -k8s.io/cri-api v0.20.4/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= -k8s.io/cri-api v0.20.6/go.mod h1:ew44AjNXwyn1s0U4xCKGodU7J1HzBeZ1MpGrpa5r8Yc= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.10.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.40.1 h1:P4RRucWk/lFOlDdkAr3mc7iWFkgKrZY9qZMAgek06S4= k8s.io/klog/v2 v2.40.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= k8s.io/kubectl v0.22.2 h1:KMyYNZoBshaL3XKx04X07DtpoD4vMrdkfiN/G2Qx/PU= k8s.io/kubectl v0.22.2/go.mod h1:BApg2j0edxLArCOfO0ievI27EeTQqBDMNU9VQH734iQ= -k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/metrics v0.22.2/go.mod h1:GUcsBtpsqQD1tKFS/2wCKu4ZBowwRncLOJH1rgWs3uw= -k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210820185131-d34e5cb4466e/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= @@ -1648,8 +1242,6 @@ k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.22/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25/go.mod h1:Mlj9PNLmG9bZ6BHFwFKDo5afkpWyUISkb9Me0GnK66I= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.27/go.mod h1:tq2nT0Kx7W+/f2JVE+zxYtUhdjuELJkVpNz+x/QN5R4= @@ -1672,12 +1264,10 @@ sigs.k8s.io/kustomize/kyaml v0.13.0/go.mod h1:FTJxEZ86ScK184NpGSAQcfEqee0nul8oLC sigs.k8s.io/kustomize/kyaml v0.13.3 h1:tNNQIC+8cc+aXFTVg+RtQAOsjwUdYBZRAgYOVI3RBc4= sigs.k8s.io/kustomize/kyaml v0.13.3/go.mod h1:/ya3Gk4diiQzlE4mBh7wykyLRFZNvqlbh+JnwQ9Vhrc= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/structured-merge-diff/v4 v4.2.0/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/internal/cmdget/cmdget.go b/internal/cmdget/cmdget.go index e27942477a..889b083829 100644 --- a/internal/cmdget/cmdget.go +++ b/internal/cmdget/cmdget.go @@ -28,8 +28,6 @@ import ( "github.com/GoogleContainerTools/kpt/internal/util/cmdutil" "github.com/GoogleContainerTools/kpt/internal/util/get" "github.com/GoogleContainerTools/kpt/internal/util/parse" - "github.com/GoogleContainerTools/kpt/internal/util/pathutil" - "github.com/GoogleContainerTools/kpt/internal/util/remote" kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1" "github.com/spf13/cobra" "sigs.k8s.io/kustomize/kyaml/filesys" @@ -41,7 +39,7 @@ func NewRunner(ctx context.Context, parent string) *Runner { ctx: ctx, } c := &cobra.Command{ - Use: "get {REPO_URI[.git]/PKG_PATH[@VERSION]|IMAGE:TAG} [LOCAL_DEST_DIRECTORY]", + Use: "get REPO_URI[.git]/PKG_PATH[@VERSION] [LOCAL_DEST_DIRECTORY]", Args: cobra.MinimumNArgs(1), Short: docs.GetShort, Long: docs.GetShort + "\n" + docs.GetLong, @@ -87,29 +85,15 @@ func (r *Runner) preRunE(_ *cobra.Command, args []string) error { args[1] = resolvedPath } } - destination, err := parse.ParseArgs(r.ctx, args, parse.Options{ - SetGit: func(git *kptfilev1.Git) error { - r.Get.Git = git - r.Get.Upstream = remote.NewGitUpstream(git) - return nil - }, - SetOci: func(oci *kptfilev1.Oci) error { - r.Get.Upstream = remote.NewOciUpstream(oci) - return nil - }, - }) - if err != nil { - return err - } - - absDestPath, _, err := pathutil.ResolveAbsAndRelPaths(destination) + t, err := parse.GitParseArgs(r.ctx, args) if err != nil { - return err + return errors.E(op, err) } - p, err := pkg.New(filesys.FileSystemOrOnDisk{}, absDestPath) + r.Get.Git = &t.Git + p, err := pkg.New(filesys.FileSystemOrOnDisk{}, t.Destination) if err != nil { - return errors.E(op, types.UniquePath(destination), err) + return errors.E(op, types.UniquePath(t.Destination), err) } r.Get.Destination = string(p.UniquePath) diff --git a/internal/cmdget/cmdget_test.go b/internal/cmdget/cmdget_test.go index b43b01eff2..feb58cd914 100644 --- a/internal/cmdget/cmdget_test.go +++ b/internal/cmdget/cmdget_test.go @@ -345,7 +345,6 @@ func TestCmd_Execute_flagAndArgParsing(t *testing.T) { validations: func(repo, dir string, r *cmdget.Runner, err error) { assert.Error(t, err) assert.Contains(t, err.Error(), "specify '.git'") - assert.Contains(t, err.Error(), "specify 'oci://'") }, }, "valid strategy provided": { diff --git a/internal/cmdpull/cmdpull.go b/internal/cmdpull/cmdpull.go deleted file mode 100644 index 08a63b0535..0000000000 --- a/internal/cmdpull/cmdpull.go +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright 2021 Google LLC -// -// 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 cmdpull - -import ( - "context" - "os" - - docs "github.com/GoogleContainerTools/kpt/internal/docs/generated/pkgdocs" - "github.com/GoogleContainerTools/kpt/internal/errors" - "github.com/GoogleContainerTools/kpt/internal/pkg" - "github.com/GoogleContainerTools/kpt/internal/types" - "github.com/GoogleContainerTools/kpt/internal/util/argutil" - "github.com/GoogleContainerTools/kpt/internal/util/cmdutil" - "github.com/GoogleContainerTools/kpt/internal/util/parse" - "github.com/GoogleContainerTools/kpt/internal/util/pathutil" - "github.com/GoogleContainerTools/kpt/internal/util/pull" - "github.com/GoogleContainerTools/kpt/internal/util/remote" - kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1" - "github.com/spf13/cobra" - "sigs.k8s.io/kustomize/kyaml/filesys" -) - -// NewRunner returns a command runner -func NewRunner(ctx context.Context, parent string) *Runner { - r := &Runner{ - ctx: ctx, - } - c := &cobra.Command{ - Use: "pull {REPO_URI[.git]/PKG_PATH[@VERSION]|IMAGE:TAG} [LOCAL_DEST_DIRECTORY]", - Args: cobra.MinimumNArgs(1), - Short: docs.PullShort, - Long: docs.PullShort + "\n" + docs.PullLong, - Example: docs.PullExamples, - RunE: r.runE, - PreRunE: r.preRunE, - } - cmdutil.FixDocs("kpt", parent, c) - r.Command = c - return r -} - -func NewCommand(ctx context.Context, parent string) *cobra.Command { - return NewRunner(ctx, parent).Command -} - -// Runner contains the run function -type Runner struct { - ctx context.Context - Pull pull.Command - Command *cobra.Command -} - -func (r *Runner) preRunE(_ *cobra.Command, args []string) error { - const op errors.Op = "cmdpull.preRunE" - if len(args) == 1 { - args = append(args, pkg.CurDir) - } else { - _, err := os.Lstat(args[1]) - if err == nil || os.IsExist(err) { - resolvedPath, err := argutil.ResolveSymlink(r.ctx, args[1]) - if err != nil { - return errors.E(op, err) - } - args[1] = resolvedPath - } - } - destination, err := parse.ParseArgs(r.ctx, args, parse.Options{ - SetGit: func(git *kptfilev1.Git) error { - r.Pull.Origin = remote.NewGitOrigin(git) - return nil - }, - SetOci: func(oci *kptfilev1.Oci) error { - r.Pull.Origin = remote.NewOciOrigin(oci) - return nil - }, - }) - if err != nil { - return err - } - - absDestPath, _, err := pathutil.ResolveAbsAndRelPaths(destination) - if err != nil { - return err - } - - p, err := pkg.New(filesys.FileSystemOrOnDisk{}, absDestPath) - if err != nil { - return errors.E(op, types.UniquePath(destination), err) - } - r.Pull.Destination = string(p.UniquePath) - - return nil -} - -func (r *Runner) runE(c *cobra.Command, _ []string) error { - const op errors.Op = "cmdpull.runE" - if err := r.Pull.Run(r.ctx); err != nil { - return errors.E(op, types.UniquePath(r.Pull.Destination), err) - } - - return nil -} diff --git a/internal/cmdpush/cmdpush.go b/internal/cmdpush/cmdpush.go deleted file mode 100644 index ba059cb138..0000000000 --- a/internal/cmdpush/cmdpush.go +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright 2021 Google LLC -// -// 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 cmdpush - -import ( - "context" - "fmt" - "os" - "path/filepath" - "strings" - - docs "github.com/GoogleContainerTools/kpt/internal/docs/generated/pkgdocs" - "github.com/GoogleContainerTools/kpt/internal/errors" - "github.com/GoogleContainerTools/kpt/internal/pkg" - "github.com/GoogleContainerTools/kpt/internal/types" - "github.com/GoogleContainerTools/kpt/internal/util/argutil" - "github.com/GoogleContainerTools/kpt/internal/util/cmdutil" - "github.com/GoogleContainerTools/kpt/internal/util/parse" - "github.com/GoogleContainerTools/kpt/internal/util/pathutil" - "github.com/GoogleContainerTools/kpt/internal/util/push" - "github.com/GoogleContainerTools/kpt/internal/util/remote" - kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1" - "github.com/spf13/cobra" - "sigs.k8s.io/kustomize/kyaml/filesys" -) - -// NewRunner returns a command runner -func NewRunner(ctx context.Context, parent string) *Runner { - r := &Runner{ - ctx: ctx, - } - c := &cobra.Command{ - Use: "push [DIR@VERSION] [flags]", - Args: cobra.MaximumNArgs(1), - Short: docs.PushShort, - Long: docs.PushShort + "\n" + docs.PushLong, - Example: docs.PushExamples, - RunE: r.runE, - PreRunE: r.preRunE, - } - - c.Flags().StringVar(&r.Origin, "origin", "", - "assigns or changes the location where the package should be pushed. Default is to push it to "+ - "the origin from which the package was pulled.") - c.Flags().BoolVar(&r.Increment, "increment", false, - "increment the version of the package when pushed. This will increment the DIR@VERSION if provided, "+ - "otherwise it will increment the origin's version when pulled. The version must be semver or integer, and "+ - "may have an optional leading 'v'") - cmdutil.FixDocs("kpt", parent, c) - r.Command = c - return r -} - -func NewCommand(ctx context.Context, parent string) *cobra.Command { - return NewRunner(ctx, parent).Command -} - -// Runner contains the run function -type Runner struct { - ctx context.Context - Push push.Command - Command *cobra.Command - Origin string - Increment bool -} - -func (r *Runner) preRunE(_ *cobra.Command, args []string) error { - const op errors.Op = "cmdpush.preRunE" - - var path string - var ref string - - if len(args) >= 1 { - parts := strings.Split(args[0], "@") - if len(parts) > 2 { - return errors.E(op, errors.InvalidParam, fmt.Errorf("at most 1 version permitted")) - } - - path = parts[0] - if len(parts) == 2 { - ref = parts[1] - } - } - - if path == "" { - // default to current directory - path = "." - } - - resolvedPath, err := argutil.ResolveSymlink(r.ctx, path) - if err != nil { - return err - } - - if ref != "" { - r.Push.Ref = ref - } - - r.Push.Increment = r.Increment - absResolvedPath, _, err := pathutil.ResolveAbsAndRelPaths(resolvedPath) - if err != nil { - return err - } - r.Push.Pkg, err = pkg.New(filesys.FileSystemOrOnDisk{}, absResolvedPath) - if err != nil { - return errors.E(op, err) - } - relPath, err := resolveRelPath(r.Push.Pkg.UniquePath) - if err != nil { - return errors.E(op, r.Push.Pkg.UniquePath, err) - } - if strings.HasPrefix(relPath, pkg.ParentDir) { - return errors.E(op, r.Push.Pkg.UniquePath, fmt.Errorf("package path must be under current working directory")) - } - - if r.Origin != "" { - _, err := parse.ParseArgs(r.ctx, []string{r.Origin, path}, parse.Options{ - SetOci: func(oci *kptfilev1.Oci) error { - r.Push.Origin = remote.NewOciOrigin(oci) - return nil - }, - }) - if err != nil { - return err - } - } - - return nil -} - -func (r *Runner) runE(c *cobra.Command, _ []string) error { - const op errors.Op = "cmdpush.runE" - if err := r.Push.Run(r.ctx); err != nil { - return errors.E(op, r.Push.Pkg.UniquePath, err) - } - - return nil -} - -func resolveRelPath(path types.UniquePath) (string, error) { - const op errors.Op = "cmdpush.resolveRelPath" - cwd, err := os.Getwd() - if err != nil { - return "", errors.E(op, errors.IO, - fmt.Errorf("error looking up current working directory: %w", err)) - } - - relPath, err := filepath.Rel(cwd, path.String()) - if err != nil { - return "", errors.E(op, errors.IO, - fmt.Errorf("error resolving the relative path: %w", err)) - } - return relPath, nil -} diff --git a/internal/docs/generated/pkgdocs/docs.go b/internal/docs/generated/pkgdocs/docs.go index 588f10614a..bb1970edca 100644 --- a/internal/docs/generated/pkgdocs/docs.go +++ b/internal/docs/generated/pkgdocs/docs.go @@ -97,7 +97,7 @@ var DiffExamples = ` var GetShort = `Fetch a package from a git repo.` var GetLong = ` - kpt pkg get {REPO_URI[.git]/PKG_PATH[@VERSION]|IMAGE:TAG} [LOCAL_DEST_DIRECTORY] [flags] + kpt pkg get REPO_URI[.git]/PKG_PATH[@VERSION] [LOCAL_DEST_DIRECTORY] [flags] Args: @@ -119,13 +119,6 @@ Args: A git tag, branch, ref or commit for the remote version of the package to fetch. Defaults to the default branch of the repository. - IMAGE: - Reference to an OCI image containing a package in the root directory. - - TAG: - An image tag or @sha256 digest for the remote version of the image - to fetch. Defaults to the 'latest' tag on the image. - LOCAL_DEST_DIRECTORY: The local directory to write the package to. Defaults to a subdirectory of the current working directory named after the upstream package. @@ -200,157 +193,6 @@ var InitExamples = ` $ kpt pkg init ` -var PullShort = `TODO(oci-support) rewrite: Fetch a package from a git repo.` -var PullLong = ` - kpt pkg get {REPO_URI[.git]/PKG_PATH[@VERSION]|IMAGE:TAG} [LOCAL_DEST_DIRECTORY] [flags] - -Args: - - REPO_URI: - URI of a git repository containing 1 or more packages as subdirectories. - In most cases the .git suffix should be specified to delimit the REPO_URI - from the PKG_PATH, but this is not required for widely recognized repo - prefixes. If get cannot parse the repo for the directory and version, - then it will print an error asking for '.git' to be specified as part of - the argument. - - PKG_PATH: - Path to remote subdirectory containing Kubernetes resource configuration - files or directories. Defaults to the root directory. - Uses '/' as the path separator (regardless of OS). - e.g. staging/cockroachdb - - VERSION: - A git tag, branch, ref or commit for the remote version of the package - to fetch. Defaults to the default branch of the repository. - - IMAGE: - Reference to an OCI image containing a package in the root directory. - - TAG: - An image tag or @sha256 digest for the remote version of the image - to fetch. Defaults to the 'latest' tag on the image. - - LOCAL_DEST_DIRECTORY: - The local directory to write the package to. Defaults to a subdirectory of the - current working directory named after the upstream package. - -Flags: - - --strategy: - Defines which strategy should be used to update the package. It defaults to - 'resource-merge'. - - * resource-merge: Perform a structural comparison of the original / - updated resources, and merge the changes into the local package. - * fast-forward: Fail without updating if the local package was modified - since it was fetched. - * force-delete-replace: Wipe all the local changes to the package and replace - it with the remote version. - -Env Vars: - - KPT_CACHE_DIR: - Controls where to cache remote packages when fetching them. - Defaults to /.kpt/repos/ - On macOS and Linux is determined by the $HOME env variable, while on - Windows it is given by the %USERPROFILE% env variable. -` -var PullExamples = ` - - # Fetch package cockroachdb from github.com/kubernetes/examples/staging/cockroachdb - # This creates a new subdirectory 'cockroachdb' for the downloaded package. - $ kpt pkg get https://github.com/kubernetes/examples.git/staging/cockroachdb@master - - - # Fetch package cockroachdb from github.com/kubernetes/examples/staging/cockroachdb - # This will create a new directory 'my-package' for the downloaded package if it - # doesn't already exist. - $ kpt pkg get https://github.com/kubernetes/examples.git/staging/cockroachdb@master ./my-package/ - - - # Fetch package examples from github.com/kubernetes/examples at the specified - # git hash. - # This will create a new directory 'examples' for the package. - $ kpt pkg get https://github.com/kubernetes/examples.git/@6fe2792 -` - -var PushShort = `TODO(oci-support) rewrite: Fetch a package from a git repo.` -var PushLong = ` -TODO(oci-support) rewrite: - kpt pkg get {REPO_URI[.git]/PKG_PATH[@VERSION]|IMAGE:TAG} [LOCAL_DEST_DIRECTORY] [flags] - -Args: - - REPO_URI: - URI of a git repository containing 1 or more packages as subdirectories. - In most cases the .git suffix should be specified to delimit the REPO_URI - from the PKG_PATH, but this is not required for widely recognized repo - prefixes. If get cannot parse the repo for the directory and version, - then it will print an error asking for '.git' to be specified as part of - the argument. - - PKG_PATH: - Path to remote subdirectory containing Kubernetes resource configuration - files or directories. Defaults to the root directory. - Uses '/' as the path separator (regardless of OS). - e.g. staging/cockroachdb - - VERSION: - A git tag, branch, ref or commit for the remote version of the package - to fetch. Defaults to the default branch of the repository. - - IMAGE: - Reference to an OCI image containing a package in the root directory. - - TAG: - An image tag or @sha256 digest for the remote version of the image - to fetch. Defaults to the 'latest' tag on the image. - - LOCAL_DEST_DIRECTORY: - The local directory to write the package to. Defaults to a subdirectory of the - current working directory named after the upstream package. - -Flags: - - --strategy: - Defines which strategy should be used to update the package. It defaults to - 'resource-merge'. - - * resource-merge: Perform a structural comparison of the original / - updated resources, and merge the changes into the local package. - * fast-forward: Fail without updating if the local package was modified - since it was fetched. - * force-delete-replace: Wipe all the local changes to the package and replace - it with the remote version. - -Env Vars: - - KPT_CACHE_DIR: - Controls where to cache remote packages when fetching them. - Defaults to /.kpt/repos/ - On macOS and Linux is determined by the $HOME env variable, while on - Windows it is given by the %USERPROFILE% env variable. -` -var PushExamples = ` - - # Fetch package cockroachdb from github.com/kubernetes/examples/staging/cockroachdb - # This creates a new subdirectory 'cockroachdb' for the downloaded package. - $ kpt pkg get https://github.com/kubernetes/examples.git/staging/cockroachdb@master - - - # Fetch package cockroachdb from github.com/kubernetes/examples/staging/cockroachdb - # This will create a new directory 'my-package' for the downloaded package if it - # doesn't already exist. - $ kpt pkg get https://github.com/kubernetes/examples.git/staging/cockroachdb@master ./my-package/ - - - # Fetch package examples from github.com/kubernetes/examples at the specified - # git hash. - # This will create a new directory 'examples' for the package. - $ kpt pkg get https://github.com/kubernetes/examples.git/@6fe2792 -` - var TreeShort = `Display resources, files and packages in a tree structure.` var TreeLong = ` kpt pkg tree [DIR] diff --git a/internal/errors/errors.go b/internal/errors/errors.go index 4c34e89a8f..4800ffbfa0 100644 --- a/internal/errors/errors.go +++ b/internal/errors/errors.go @@ -142,7 +142,6 @@ const ( InvalidParam // Value is not valid. MissingParam // Required value is missing or empty. Git // Errors from Git - OCI // Errors from OCI IO // Error doing IO operations YAML // yaml document can't be parsed ) @@ -161,8 +160,6 @@ func (c Class) String() string { return "missing parameter value" case Git: return "git error" - case OCI: - return "OCI error" case IO: return "IO error" case YAML: diff --git a/internal/testutil/setup_manager.go b/internal/testutil/setup_manager.go index 1be9e9a458..8b5ab5c057 100644 --- a/internal/testutil/setup_manager.go +++ b/internal/testutil/setup_manager.go @@ -25,7 +25,6 @@ import ( "github.com/GoogleContainerTools/kpt/internal/printer/fake" "github.com/GoogleContainerTools/kpt/internal/testutil/pkgbuilder" "github.com/GoogleContainerTools/kpt/internal/util/get" - "github.com/GoogleContainerTools/kpt/internal/util/remote" kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1" "github.com/stretchr/testify/assert" "sigs.k8s.io/kustomize/kyaml/yaml" @@ -107,11 +106,11 @@ func (g *TestSetupManager) Init() bool { // Get the content from the upstream repo into the local workspace. if !assert.NoError(g.T, get.Command{ Destination: filepath.Join(g.LocalWorkspace.WorkspaceDirectory, g.targetDir), - Upstream: remote.NewGitUpstream(&kptfilev1.Git{ + Git: &kptfilev1.Git{ Repo: g.Repos[Upstream].RepoDirectory, Ref: g.GetRef, Directory: g.GetSubDirectory, - })}.Run(fake.CtxWithDefaultPrinter())) { + }}.Run(fake.CtxWithDefaultPrinter())) { return false } localGit, err := gitutil.NewLocalGitRunner(g.LocalWorkspace.WorkspaceDirectory) @@ -203,11 +202,11 @@ func UpdateGitDir(t *testing.T, name string, gitDir GitDirectory, changes []Cont func (g *TestSetupManager) GetSubPkg(dest, repo, upstreamDir string) { assert.NoError(g.T, get.Command{ Destination: path.Join(g.LocalWorkspace.FullPackagePath(), dest), - Upstream: remote.NewGitUpstream(&kptfilev1.Git{ + Git: &kptfilev1.Git{ Repo: g.Repos[repo].RepoDirectory, Ref: g.GetRef, Directory: path.Join(g.GetSubDirectory, upstreamDir), - })}.Run(fake.CtxWithDefaultPrinter())) + }}.Run(fake.CtxWithDefaultPrinter())) localGit, err := gitutil.NewLocalGitRunner(g.LocalWorkspace.WorkspaceDirectory) assert.NoError(g.T, err) diff --git a/internal/util/diff/diff.go b/internal/util/diff/diff.go index 2e92ae967e..97bb443538 100644 --- a/internal/util/diff/diff.go +++ b/internal/util/diff/diff.go @@ -28,9 +28,10 @@ import ( "github.com/GoogleContainerTools/kpt/internal/gitutil" "github.com/GoogleContainerTools/kpt/internal/pkg" "github.com/GoogleContainerTools/kpt/internal/util/addmergecomment" + "github.com/GoogleContainerTools/kpt/internal/util/fetch" "github.com/GoogleContainerTools/kpt/internal/util/pkgutil" - "github.com/GoogleContainerTools/kpt/internal/util/remote" kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1" + "github.com/GoogleContainerTools/kpt/pkg/kptfile/kptfileutil" "sigs.k8s.io/kustomize/kyaml/errors" "sigs.k8s.io/kustomize/kyaml/filesys" ) @@ -111,8 +112,8 @@ type Command struct { // PkgDiffer specifies package differ PkgDiffer PkgDiffer - // Contains information about the upstream package to fetch - Upstream remote.Upstream + // PkgGetter specifies packaging sourcing adapter + PkgGetter PkgGetter } func (c *Command) Run(ctx context.Context) error { @@ -123,15 +124,6 @@ func (c *Command) Run(ctx context.Context) error { return errors.Errorf("package missing Kptfile at '%s': %v", c.Path, err) } - c.Upstream, err = remote.NewUpstream(kptFile) - if err != nil { - return errors.Errorf("upstream required: %v", err) - } - upstreamRef, err := c.Upstream.Ref() - if err != nil { - return errors.Errorf("upstream ref required: %v", err) - } - // Create a staging directory to store all compared packages stagingDirectory, err := ioutil.TempDir("", "kpt-") if err != nil { @@ -147,7 +139,7 @@ func (c *Command) Run(ctx context.Context) error { // Stage current package // This prevents prepareForDiff from modifying the local package localPkgName := NameStagingDirectory(LocalPackageSource, - upstreamRef) + kptFile.Upstream.Git.Ref) currPkg, err := stageDirectory(stagingDirectory, localPkgName) if err != nil { return errors.Errorf("failed to create stage dir for current package: %v", err) @@ -159,11 +151,14 @@ func (c *Command) Run(ctx context.Context) error { } // get the upstreamPkg at current version - upstreamPkgName, err := stageDirectory(stagingDirectory, NameStagingDirectory(RemotePackageSource, upstreamRef)) - if err != nil { - return err - } - upstreamPkg, _, err := c.Upstream.FetchUpstream(ctx, upstreamPkgName) + upstreamPkgName := NameStagingDirectory(RemotePackageSource, + kptFile.Upstream.Git.Ref) + upstreamPkg, err := c.PkgGetter.GetPkg(ctx, + stagingDirectory, + upstreamPkgName, + kptFile.Upstream.Git.Repo, + kptFile.Upstream.Git.Directory, + kptFile.Upstream.Git.Ref) if err != nil { return err } @@ -171,18 +166,13 @@ func (c *Command) Run(ctx context.Context) error { var upstreamTargetPkg string if c.Ref == "" { - switch kptFile.UpstreamLock.Type { - case kptfilev1.GitOrigin: - gur, err := gitutil.NewGitUpstreamRepo(ctx, kptFile.UpstreamLock.Git.Repo) - if err != nil { - return err - } - c.Ref, err = gur.GetDefaultBranch(ctx) - if err != nil { - return err - } - case kptfilev1.OciOrigin: - c.Ref = "latest" + gur, err := gitutil.NewGitUpstreamRepo(ctx, kptFile.UpstreamLock.Git.Repo) + if err != nil { + return err + } + c.Ref, err = gur.GetDefaultBranch(ctx) + if err != nil { + return err } } @@ -190,14 +180,13 @@ func (c *Command) Run(ctx context.Context) error { c.DiffType == DiffTypeCombined || c.DiffType == DiffType3Way { // get the upstream pkg at the target version - upstreamTargetPkgName, err := stageDirectory(stagingDirectory, NameStagingDirectory(TargetRemotePackageSource, c.Ref)) - if err != nil { - return err - } - if err := c.Upstream.SetRef(c.Ref); err != nil { - return err - } - upstreamTargetPkg, _, err = c.Upstream.FetchUpstream(ctx, upstreamTargetPkgName) + upstreamTargetPkgName := NameStagingDirectory(TargetRemotePackageSource, + c.Ref) + upstreamTargetPkg, err = c.PkgGetter.GetPkg(ctx, stagingDirectory, + upstreamTargetPkgName, + kptFile.Upstream.Git.Repo, + kptFile.Upstream.Git.Directory, + c.Ref) if err != nil { return err } @@ -243,6 +232,9 @@ func (c *Command) DefaultValues() { if c.Output == nil { c.Output = os.Stdout } + if c.PkgGetter == nil { + c.PkgGetter = defaultPkgGetter{} + } if c.PkgDiffer == nil { c.PkgDiffer = &defaultPkgDiffer{ DiffType: c.DiffType, @@ -331,6 +323,52 @@ func (d *defaultPkgDiffer) prepareForDiff(dir string) error { return nil } +// PkgGetter knows how to fetch a package given a git repo, path and ref. +type PkgGetter interface { + GetPkg(ctx context.Context, stagingDir, targetDir, repo, path, ref string) (dir string, err error) +} + +// defaultPkgGetter uses fetch.Command abstraction to implement PkgGetter. +type defaultPkgGetter struct{} + +// GetPkg checks out a repository into a temporary directory for diffing +// and returns the directory containing the checked out package or an error. +// repo is the git repository the package was cloned from. e.g. https:// +// path is the sub directory of the git repository that the package was cloned from +// ref is the git ref the package was cloned from +func (pg defaultPkgGetter) GetPkg(ctx context.Context, stagingDir, targetDir, repo, path, ref string) (string, error) { + dir, err := stageDirectory(stagingDir, targetDir) + if err != nil { + return dir, err + } + + name := filepath.Base(dir) + kf := kptfileutil.DefaultKptfile(name) + kf.Upstream = &kptfilev1.Upstream{ + Type: kptfilev1.GitOrigin, + Git: &kptfilev1.Git{ + Repo: repo, + Directory: path, + Ref: ref, + }, + } + err = kptfileutil.WriteFile(dir, kf) + if err != nil { + return dir, err + } + + p, err := pkg.New(filesys.FileSystemOrOnDisk{}, dir) + if err != nil { + return dir, err + } + + cmdGet := &fetch.Command{ + Pkg: p, + } + err = cmdGet.Run(ctx) + return dir, err +} + // stageDirectory creates a subdirectory of the provided path for temporary operations // path is the parent staged directory and should already exist // subpath is the subdirectory that should be created inside path diff --git a/internal/util/fetch/fetch.go b/internal/util/fetch/fetch.go index b7ca9a5f21..6b2040e0a3 100644 --- a/internal/util/fetch/fetch.go +++ b/internal/util/fetch/fetch.go @@ -17,11 +17,24 @@ package fetch import ( "context" "fmt" + "io/ioutil" + "os" + "path" + "path/filepath" + "strings" + + "github.com/otiai10/copy" + "sigs.k8s.io/kustomize/kyaml/filesys" "github.com/GoogleContainerTools/kpt/internal/errors" + "github.com/GoogleContainerTools/kpt/internal/gitutil" "github.com/GoogleContainerTools/kpt/internal/pkg" - "github.com/GoogleContainerTools/kpt/internal/util/remote" + "github.com/GoogleContainerTools/kpt/internal/printer" + "github.com/GoogleContainerTools/kpt/internal/types" + "github.com/GoogleContainerTools/kpt/internal/util/git" + "github.com/GoogleContainerTools/kpt/internal/util/pkgutil" kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1" + "github.com/GoogleContainerTools/kpt/pkg/kptfile/kptfileutil" ) // Command takes the upstream information in the Kptfile at the path for the @@ -43,15 +56,16 @@ func (c Command) Run(ctx context.Context) error { return errors.E(op, c.Pkg.UniquePath, err) } - ups, err := remote.NewUpstream(kf) - if err != nil { - return errors.E(op, c.Pkg.UniquePath, err) + g := kf.Upstream.Git + repoSpec := &git.RepoSpec{ + OrgRepo: g.Repo, + Path: g.Directory, + Ref: g.Ref, } - - if err := ups.CloneUpstream(ctx, c.Pkg.UniquePath.String()); err != nil { + err = cloneAndCopy(ctx, repoSpec, c.Pkg.UniquePath.String()) + if err != nil { return errors.E(op, c.Pkg.UniquePath, err) } - return nil } @@ -62,34 +76,183 @@ func (c Command) validate(kf *kptfilev1.KptFile) error { if kf.Upstream == nil { return errors.E(op, errors.MissingParam, fmt.Errorf("kptfile doesn't contain upstream information")) } - switch kf.Upstream.Type { - case kptfilev1.GitOrigin: - if kf.Upstream.Git == nil { - return errors.E(op, errors.MissingParam, fmt.Errorf("kptfile upstream doesn't have git information")) - } - g := kf.Upstream.Git - if len(g.Repo) == 0 { - return errors.E(op, errors.MissingParam, fmt.Errorf("must specify repo")) - } - if len(g.Ref) == 0 { - return errors.E(op, errors.MissingParam, fmt.Errorf("must specify ref")) - } - if len(g.Directory) == 0 { - return errors.E(op, errors.MissingParam, fmt.Errorf("must specify directory")) - } + if kf.Upstream.Git == nil { + return errors.E(op, errors.MissingParam, fmt.Errorf("kptfile upstream doesn't have git information")) + } - case kptfilev1.OciOrigin: - if kf.Upstream.Oci == nil { - return errors.E(op, errors.MissingParam, fmt.Errorf("kptfile upstream doesn't have oci information")) - } - if len(kf.Upstream.Oci.Image) == 0 { - return errors.E(op, errors.MissingParam, fmt.Errorf("must specify image")) + g := kf.Upstream.Git + if len(g.Repo) == 0 { + return errors.E(op, errors.MissingParam, fmt.Errorf("must specify repo")) + } + if len(g.Ref) == 0 { + return errors.E(op, errors.MissingParam, fmt.Errorf("must specify ref")) + } + if len(g.Directory) == 0 { + return errors.E(op, errors.MissingParam, fmt.Errorf("must specify directory")) + } + return nil +} + +// cloneAndCopy fetches the provided repo and copies the content into the +// directory specified by dest. The provided name is set as `metadata.name` +// of the Kptfile of the package. +func cloneAndCopy(ctx context.Context, r *git.RepoSpec, dest string) error { + const op errors.Op = "fetch.cloneAndCopy" + pr := printer.FromContextOrDie(ctx) + + err := ClonerUsingGitExec(ctx, r) + if err != nil { + return errors.E(op, errors.Git, types.UniquePath(dest), err) + } + defer os.RemoveAll(r.Dir) + + sourcePath := filepath.Join(r.Dir, r.Path) + pr.Printf("Adding package %q.\n", strings.TrimPrefix(r.Path, "/")) + if err := pkgutil.CopyPackage(sourcePath, dest, true, pkg.All); err != nil { + return errors.E(op, types.UniquePath(dest), err) + } + + if err := kptfileutil.UpdateKptfileWithoutOrigin(dest, sourcePath, false); err != nil { + return errors.E(op, types.UniquePath(dest), err) + } + + if err := kptfileutil.UpdateUpstreamLockFromGit(dest, r); err != nil { + return errors.E(op, errors.Git, types.UniquePath(dest), err) + } + return nil +} + +// ClonerUsingGitExec uses a local git install, as opposed +// to say, some remote API, to obtain a local clone of +// a remote repo. It looks for tags with the directory as a prefix to allow +// for versioning multiple kpt packages in a single repo independently. It +// relies on the private clonerUsingGitExec function to try fetching different +// refs. +func ClonerUsingGitExec(ctx context.Context, repoSpec *git.RepoSpec) error { + const op errors.Op = "fetch.ClonerUsingGitExec" + + // Create a local representation of the upstream repo. This will initialize + // the cache for the specified repo uri if it isn't already there. It also + // fetches and caches all tag and branch refs from the upstream repo. + upstreamRepo, err := gitutil.NewGitUpstreamRepo(ctx, repoSpec.CloneSpec()) + if err != nil { + return errors.E(op, errors.Git, errors.Repo(repoSpec.CloneSpec()), err) + } + + // Check if we have a ref in the upstream that matches the package-specific + // reference. If we do, we use that reference. + ps := strings.Split(repoSpec.Path, "/") + for len(ps) != 0 { + p := path.Join(ps...) + packageRef := path.Join(strings.TrimLeft(p, "/"), repoSpec.Ref) + if _, found := upstreamRepo.ResolveTag(packageRef); found { + repoSpec.Ref = packageRef + break } + ps = ps[:len(ps)-1] + } + + // Pull the required ref into the repo git cache. + dir, err := upstreamRepo.GetRepo(ctx, []string{repoSpec.Ref}) + if err != nil { + return errors.E(op, errors.Git, errors.Repo(repoSpec.CloneSpec()), err) + } + + gitRunner, err := gitutil.NewLocalGitRunner(dir) + if err != nil { + return errors.E(op, errors.Git, errors.Repo(repoSpec.CloneSpec()), err) + } + + // Find the commit SHA for the ref that was just fetched. We need the SHA + // rather than the ref to be able to do a hard reset of the cache repo. + commit, found := upstreamRepo.ResolveRef(repoSpec.Ref) + if !found { + commit = repoSpec.Ref + } + + // Reset the local repo to the commit we need. Doing a hard reset instead of + // a checkout means we don't create any local branches so we don't need to + // worry about fast-forwarding them with changes from upstream. It also makes + // sure that any changes in the local worktree are cleaned out. + _, err = gitRunner.Run(ctx, "reset", "--hard", commit) + if err != nil { + gitutil.AmendGitExecError(err, func(e *gitutil.GitExecError) { + e.Repo = repoSpec.CloneSpec() + e.Ref = commit + }) + return errors.E(op, errors.Git, errors.Repo(repoSpec.CloneSpec()), err) + } + + // We need to create a temp directory where we can copy the content of the repo. + // During update, we need to checkout multiple versions of the same repo, so + // we can't do merges directly from the cache. + repoSpec.Dir, err = ioutil.TempDir("", "kpt-get-") + if err != nil { + return errors.E(op, errors.Internal, fmt.Errorf("error creating temp directory: %w", err)) + } + repoSpec.Commit = commit - default: - return errors.E(op, errors.MissingParam, fmt.Errorf("kptfile upstream type must be one of: %s,%s", kptfilev1.GitOrigin, kptfilev1.OciOrigin)) + pkgPath := filepath.Join(dir, repoSpec.Path) + // Verify that the requested path exists in the repo. + _, err = os.Stat(pkgPath) + if os.IsNotExist(err) { + return errors.E(op, + errors.Internal, + err, + fmt.Errorf("path %q does not exist in repo %q", repoSpec.Path, repoSpec.OrgRepo)) } + // Copy the content of the pkg into the temp directory. + // Note that we skip the content outside the package directory. + err = copyDir(ctx, pkgPath, repoSpec.AbsPath()) + if err != nil { + return errors.E(op, errors.Internal, fmt.Errorf("error copying package: %w", err)) + } + + // Verify that if a Kptfile exists in the package, it contains the correct + // version of the Kptfile. + _, err = pkg.ReadKptfile(filesys.FileSystemOrOnDisk{}, pkgPath) + if err != nil { + // A Kptfile isn't required, so it is fine if there is no Kptfile. + if errors.Is(err, os.ErrNotExist) { + return nil + } + + // If the error is of type KptfileError, we replace it with a + // RemoteKptfileError. This allows us to provide information about the + // git source of the Kptfile instead of the path to some random + // temporary directory. + var kfError *pkg.KptfileError + if errors.As(err, &kfError) { + return &pkg.RemoteKptfileError{ + RepoSpec: repoSpec, + Err: kfError.Err, + } + } + } return nil } + +// copyDir copies a src directory to a dst directory. +// copyDir skips copying the .git directory from the src and ignores symlinks. +func copyDir(ctx context.Context, srcDir string, dstDir string) error { + pr := printer.FromContextOrDie(ctx) + opts := copy.Options{ + Skip: func(src string) (bool, error) { + return strings.HasSuffix(src, ".git"), nil + }, + OnSymlink: func(src string) copy.SymlinkAction { + // try to print relative path of symlink + // if we can, else absolute path which is not + // pretty because it contains path to temporary repo dir + displayPath, err := filepath.Rel(srcDir, src) + if err != nil { + displayPath = src + } + pr.Printf("[Warn] Ignoring symlink %q \n", displayPath) + return copy.Skip + }, + } + return copy.Copy(srcDir, dstDir, opts) +} diff --git a/internal/util/get/example_test.go b/internal/util/get/example_test.go index 8ab1765ac1..6d0669e3b7 100644 --- a/internal/util/get/example_test.go +++ b/internal/util/get/example_test.go @@ -19,45 +19,44 @@ import ( "github.com/GoogleContainerTools/kpt/internal/printer/fake" "github.com/GoogleContainerTools/kpt/internal/util/get" - "github.com/GoogleContainerTools/kpt/internal/util/remote" kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1" ) func ExampleCommand() { - err := get.Command{Upstream: remote.NewGitUpstream(&kptfilev1.Git{ + err := get.Command{Git: &kptfilev1.Git{ Repo: "https://github.com/example-org/example-repo", Ref: "v1.0", - })}.Run(fake.CtxWithDefaultPrinter()) + }}.Run(fake.CtxWithDefaultPrinter()) if err != nil { // handle error } } func ExampleCommand_branch() { - err := get.Command{Upstream: remote.NewGitUpstream(&kptfilev1.Git{ + err := get.Command{Git: &kptfilev1.Git{ Repo: "https://github.com/example-org/example-repo", Ref: "refs/heads/v1.0", - })}.Run(fake.CtxWithDefaultPrinter()) + }}.Run(fake.CtxWithDefaultPrinter()) if err != nil { // handle error } } func ExampleCommand_tag() { - err := get.Command{Upstream: remote.NewGitUpstream(&kptfilev1.Git{ + err := get.Command{Git: &kptfilev1.Git{ Repo: "https://github.com/example-org/example-repo", Ref: "refs/tags/v1.0", - })}.Run(fake.CtxWithDefaultPrinter()) + }}.Run(fake.CtxWithDefaultPrinter()) if err != nil { // handle error } } func ExampleCommand_commit() { - err := get.Command{Upstream: remote.NewGitUpstream(&kptfilev1.Git{ + err := get.Command{Git: &kptfilev1.Git{ Repo: "https://github.com/example-org/example-repo", Ref: "8186bef8e5c0621bf80fa8106bd595aae8b62884", - })}.Run(fake.CtxWithDefaultPrinter()) + }}.Run(fake.CtxWithDefaultPrinter()) if err != nil { // handle error } @@ -65,11 +64,11 @@ func ExampleCommand_commit() { func ExampleCommand_subdir() { err := get.Command{ - Upstream: remote.NewGitUpstream(&kptfilev1.Git{ + Git: &kptfilev1.Git{ Repo: "https://github.com/example-org/example-repo", Ref: "v1.0", Directory: filepath.Join("path", "to", "package"), - }), + }, }.Run(fake.CtxWithDefaultPrinter()) if err != nil { // handle error @@ -78,10 +77,10 @@ func ExampleCommand_subdir() { func ExampleCommand_destination() { err := get.Command{ - Upstream: remote.NewGitUpstream(&kptfilev1.Git{ + Git: &kptfilev1.Git{ Repo: "https://github.com/example-org/example-repo", Ref: "v1.0", - }), + }, Destination: "destination-dir"}.Run(fake.CtxWithDefaultPrinter()) if err != nil { // handle error diff --git a/internal/util/get/get.go b/internal/util/get/get.go index d5e9c7d290..43b6cf10a0 100644 --- a/internal/util/get/get.go +++ b/internal/util/get/get.go @@ -20,7 +20,9 @@ import ( goerrors "errors" "fmt" "os" + "path" "path/filepath" + "strings" "github.com/GoogleContainerTools/kpt/internal/errors" "github.com/GoogleContainerTools/kpt/internal/pkg" @@ -30,7 +32,6 @@ import ( "github.com/GoogleContainerTools/kpt/internal/util/attribution" "github.com/GoogleContainerTools/kpt/internal/util/fetch" "github.com/GoogleContainerTools/kpt/internal/util/pathutil" - "github.com/GoogleContainerTools/kpt/internal/util/remote" "github.com/GoogleContainerTools/kpt/internal/util/stack" kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1" "github.com/GoogleContainerTools/kpt/pkg/kptfile/kptfileutil" @@ -44,9 +45,6 @@ type Command struct { // Git contains information about the git repo to fetch Git *kptfilev1.Git - // Contains information about the upstraem package to fetch - Upstream remote.Upstream - // Destination is the output directory to clone the package to. Defaults to the name of the package -- // either the base repo name, or the base subdirectory name. Destination string @@ -76,10 +74,19 @@ func (c Command) Run(ctx context.Context) error { return errors.E(op, errors.IO, types.UniquePath(c.Destination), err) } - kf := kptfileutil.DefaultKptfile(c.Name) + // normalize path to a filepath + repoDir := c.Git.Directory + if !strings.HasSuffix(repoDir, "file://") { + repoDir = filepath.Join(path.Split(repoDir)) + } + c.Git.Directory = repoDir - kf.Upstream = c.Upstream.BuildUpstream() - kf.Upstream.UpdateStrategy = c.UpdateStrategy + kf := kptfileutil.DefaultKptfile(c.Name) + kf.Upstream = &kptfilev1.Upstream{ + Type: kptfilev1.GitOrigin, + Git: c.Git, + UpdateStrategy: c.UpdateStrategy, + } err = kptfileutil.WriteFile(c.Destination, kf) if err != nil { @@ -134,14 +141,8 @@ func (c Command) fetchPackages(ctx context.Context, rootPkg *pkg.Pkg) error { if kf.Upstream != nil && kf.UpstreamLock == nil { packageCount += 1 pr.PrintPackage(p, !(p == rootPkg)) - - upstream, err := remote.NewUpstream(kf) - if err != nil { - return errors.E(op, p.UniquePath, err) - } - pr.Printf("Fetching %s\n", upstream.String()) - - err = (&fetch.Command{ + pr.Printf("Fetching %s@%s\n", kf.Upstream.Git.Repo, kf.Upstream.Git.Ref) + err := (&fetch.Command{ Pkg: p, }).Run(ctx) if err != nil { @@ -164,12 +165,23 @@ func (c Command) fetchPackages(ctx context.Context, rootPkg *pkg.Pkg) error { // DefaultValues sets values to the default values if they were unspecified func (c *Command) DefaultValues() error { const op errors.Op = "get.DefaultValues" - if c.Upstream == nil { - return errors.E(op, errors.MissingParam, fmt.Errorf("must specify git repo or image reference information")) + if c.Git == nil { + return errors.E(op, errors.MissingParam, fmt.Errorf("must specify git repo information")) } - if err := c.Upstream.Validate(); err != nil { - return errors.E(op, err) + g := c.Git + if len(g.Repo) == 0 { + return errors.E(op, errors.MissingParam, fmt.Errorf("must specify repo")) + } + if len(g.Ref) == 0 { + return errors.E(op, errors.MissingParam, fmt.Errorf("must specify ref")) } + if len(c.Destination) == 0 { + return errors.E(op, errors.MissingParam, fmt.Errorf("must specify destination")) + } + if len(g.Directory) == 0 { + return errors.E(op, errors.MissingParam, fmt.Errorf("must specify directory")) + } + if !filepath.IsAbs(c.Destination) { return errors.E(op, errors.InvalidParam, fmt.Errorf("destination must be an absolute path")) } diff --git a/internal/util/get/get_test.go b/internal/util/get/get_test.go index 393d16277c..96c0ca0198 100644 --- a/internal/util/get/get_test.go +++ b/internal/util/get/get_test.go @@ -24,7 +24,6 @@ import ( "github.com/GoogleContainerTools/kpt/internal/testutil" "github.com/GoogleContainerTools/kpt/internal/testutil/pkgbuilder" . "github.com/GoogleContainerTools/kpt/internal/util/get" - "github.com/GoogleContainerTools/kpt/internal/util/remote" kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1" "github.com/stretchr/testify/assert" "sigs.k8s.io/kustomize/kyaml/kio" @@ -49,7 +48,7 @@ func TestCommand_Run_failEmptyRepo(t *testing.T) { if !assert.Error(t, err) { t.FailNow() } - assert.Contains(t, err.Error(), "must specify git repo or image reference information") + assert.Contains(t, err.Error(), "must specify git repo information") } // TestCommand_Run_failEmptyRepo verifies that Command fail if not repo is provided. @@ -58,9 +57,9 @@ func TestCommand_Run_failNoRevision(t *testing.T) { defer clean() err := Command{ - Upstream: remote.NewGitUpstream(&kptfilev1.Git{ + Git: &kptfilev1.Git{ Repo: "foo", - }), + }, Destination: w.WorkspaceDirectory, }.Run(fake.CtxWithDefaultPrinter()) if !assert.Error(t, err) { @@ -83,11 +82,11 @@ func TestCommand_Run(t *testing.T) { defer testutil.Chdir(t, w.WorkspaceDirectory)() absPath := filepath.Join(w.WorkspaceDirectory, g.RepoName) - err := Command{Upstream: remote.NewGitUpstream(&kptfilev1.Git{ + err := Command{Git: &kptfilev1.Git{ Repo: "file://" + g.RepoDirectory, Ref: "master", Directory: "/", - }), + }, Destination: absPath}.Run(fake.CtxWithDefaultPrinter()) assert.NoError(t, err) @@ -144,8 +143,8 @@ func TestCommand_Run_subdir(t *testing.T) { defer testutil.Chdir(t, w.WorkspaceDirectory)() absPath := filepath.Join(w.WorkspaceDirectory, subdir) - err := Command{Upstream: remote.NewGitUpstream(&kptfilev1.Git{ - Repo: g.RepoDirectory, Ref: "refs/heads/master", Directory: subdir}), + err := Command{Git: &kptfilev1.Git{ + Repo: g.RepoDirectory, Ref: "refs/heads/master", Directory: subdir}, Destination: absPath, }.Run(fake.CtxWithDefaultPrinter()) assert.NoError(t, err) @@ -208,8 +207,8 @@ func TestCommand_Run_subdir_symlinks(t *testing.T) { cliOutput := &bytes.Buffer{} absPath := filepath.Join(w.WorkspaceDirectory, subdir) - err := Command{Upstream: remote.NewGitUpstream(&kptfilev1.Git{ - Repo: g.RepoDirectory, Ref: "refs/heads/master", Directory: subdir}), + err := Command{Git: &kptfilev1.Git{ + Repo: g.RepoDirectory, Ref: "refs/heads/master", Directory: subdir}, Destination: absPath, }.Run(fake.CtxWithPrinter(cliOutput, cliOutput)) assert.NoError(t, err) @@ -273,11 +272,11 @@ func TestCommand_Run_destination(t *testing.T) { absPath := filepath.Join(w.WorkspaceDirectory, dest) err := Command{ - Upstream: remote.NewGitUpstream(&kptfilev1.Git{ + Git: &kptfilev1.Git{ Repo: g.RepoDirectory, Ref: "master", Directory: "/", - }), + }, Destination: absPath, }.Run(fake.CtxWithDefaultPrinter()) assert.NoError(t, err) @@ -337,11 +336,11 @@ func TestCommand_Run_subdirAndDestination(t *testing.T) { absPath := filepath.Join(w.WorkspaceDirectory, dest) err := Command{ - Upstream: remote.NewGitUpstream(&kptfilev1.Git{ + Git: &kptfilev1.Git{ Repo: g.RepoDirectory, Ref: "master", Directory: subdir, - }), + }, Destination: absPath, }.Run(fake.CtxWithDefaultPrinter()) assert.NoError(t, err) @@ -417,11 +416,11 @@ func TestCommand_Run_branch(t *testing.T) { absPath := filepath.Join(w.WorkspaceDirectory, g.RepoName) err = Command{ - Upstream: remote.NewGitUpstream(&kptfilev1.Git{ + Git: &kptfilev1.Git{ Repo: g.RepoDirectory, Ref: "refs/heads/exp", Directory: "/", - }), + }, Destination: absPath, }.Run(fake.CtxWithDefaultPrinter()) assert.NoError(t, err) @@ -500,11 +499,11 @@ func TestCommand_Run_tag(t *testing.T) { absPath := filepath.Join(w.WorkspaceDirectory, g.RepoName) err = Command{ - Upstream: remote.NewGitUpstream(&kptfilev1.Git{ + Git: &kptfilev1.Git{ Repo: g.RepoDirectory, Ref: "refs/tags/v2", Directory: "/", - }), + }, Destination: absPath, }.Run(fake.CtxWithDefaultPrinter()) assert.NoError(t, err) @@ -641,11 +640,11 @@ func TestCommand_Run_ref(t *testing.T) { absPath := filepath.Join(w.WorkspaceDirectory, repos[testutil.Upstream].RepoName) err = Command{ - Upstream: remote.NewGitUpstream(&kptfilev1.Git{ + Git: &kptfilev1.Git{ Repo: repos[testutil.Upstream].RepoDirectory, Ref: ref, Directory: tc.directory, - }), + }, Destination: absPath, }.Run(fake.CtxWithDefaultPrinter()) assert.NoError(t, err) @@ -670,11 +669,11 @@ func TestCommand_Run_failExistingDir(t *testing.T) { absPath := filepath.Join(w.WorkspaceDirectory, g.RepoName) err := Command{ - Upstream: remote.NewGitUpstream(&kptfilev1.Git{ + Git: &kptfilev1.Git{ Repo: g.RepoDirectory, Ref: "master", Directory: "/", - }), + }, Destination: absPath, }.Run(fake.CtxWithDefaultPrinter()) assert.NoError(t, err) @@ -724,11 +723,11 @@ func TestCommand_Run_failExistingDir(t *testing.T) { // try to clone and expect a failure err = Command{ - Upstream: remote.NewGitUpstream(&kptfilev1.Git{ + Git: &kptfilev1.Git{ Repo: g.RepoDirectory, Ref: "master", Directory: "/", - }), + }, Destination: absPath, }.Run(fake.CtxWithDefaultPrinter()) if !assert.Error(t, err) { @@ -781,11 +780,11 @@ func TestCommand_Run_nonexistingParentDir(t *testing.T) { absPath := filepath.Join(w.WorkspaceDirectory, "more", "dirs", g.RepoName) err := Command{ - Upstream: remote.NewGitUpstream(&kptfilev1.Git{ + Git: &kptfilev1.Git{ Repo: g.RepoDirectory, Ref: "master", Directory: "/", - }), + }, Destination: absPath, }.Run(fake.CtxWithDefaultPrinter()) assert.NoError(t, err) @@ -801,11 +800,11 @@ func TestCommand_Run_failInvalidRepo(t *testing.T) { absPath := filepath.Join(w.WorkspaceDirectory, "foo") err := Command{ - Upstream: remote.NewGitUpstream(&kptfilev1.Git{ + Git: &kptfilev1.Git{ Repo: "foo", Directory: "/", Ref: "refs/heads/master", - }), + }, Destination: absPath, }.Run(fake.CtxWithDefaultPrinter()) if !assert.Error(t, err) { @@ -831,11 +830,11 @@ func TestCommand_Run_failInvalidBranch(t *testing.T) { absPath := filepath.Join(w.WorkspaceDirectory, g.RepoDirectory) err := Command{ - Upstream: remote.NewGitUpstream(&kptfilev1.Git{ + Git: &kptfilev1.Git{ Repo: g.RepoDirectory, Directory: "/", Ref: "refs/heads/foo", - }), + }, Destination: absPath, }.Run(fake.CtxWithDefaultPrinter()) if !assert.Error(t, err) { @@ -864,11 +863,11 @@ func TestCommand_Run_failInvalidTag(t *testing.T) { absPath := filepath.Join(w.WorkspaceDirectory, g.RepoDirectory) err := Command{ - Upstream: remote.NewGitUpstream(&kptfilev1.Git{ + Git: &kptfilev1.Git{ Repo: g.RepoDirectory, Directory: "/", Ref: "refs/tags/foo", - }), + }, Destination: absPath, }.Run(fake.CtxWithDefaultPrinter()) if !assert.Error(t, err) { @@ -1389,11 +1388,11 @@ func TestCommand_Run_subpackages(t *testing.T) { destinationDir := filepath.Join(w.WorkspaceDirectory, targetDir) err = Command{ - Upstream: remote.NewGitUpstream(&kptfilev1.Git{ + Git: &kptfilev1.Git{ Repo: upstreamRepo.RepoDirectory, Directory: tc.directory, Ref: tc.ref, - }), + }, Destination: destinationDir, UpdateStrategy: tc.updateStrategy, }.Run(fake.CtxWithDefaultPrinter()) @@ -1460,11 +1459,11 @@ func TestCommand_Run_symlinks(t *testing.T) { destinationDir := filepath.Join(w.WorkspaceDirectory, upstreamRepo.RepoName) err := Command{ - Upstream: remote.NewGitUpstream(&kptfilev1.Git{ + Git: &kptfilev1.Git{ Repo: upstreamRepo.RepoDirectory, Directory: "/", Ref: "master", - }), + }, Destination: destinationDir, }.Run(fake.CtxWithDefaultPrinter()) if !assert.NoError(t, err) { diff --git a/internal/util/parse/parse.go b/internal/util/parse/parse.go index 1d894d592c..7bedafa6bc 100644 --- a/internal/util/parse/parse.go +++ b/internal/util/parse/parse.go @@ -22,113 +22,18 @@ import ( "path/filepath" "strings" - kpterrors "github.com/GoogleContainerTools/kpt/internal/errors" "github.com/GoogleContainerTools/kpt/internal/gitutil" kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1" - "github.com/google/go-containerregistry/pkg/name" "sigs.k8s.io/kustomize/kyaml/errors" ) -type Options struct { - SetGit func(git *kptfilev1.Git) error - SetOci func(oci *kptfilev1.Oci) error -} - -func ParseArgs(ctx context.Context, args []string, opts Options) (string, error) { - const op kpterrors.Op = "parse.ParseArgs" - - tGit, errGit := GitParseArgs(ctx, args) - if errGit == nil { - if opts.SetGit == nil { - return "", kpterrors.E(op, fmt.Errorf("git locations not supported: %v", errGit)) - } - if err := opts.SetGit(&tGit.Git); err != nil { - return "", err - } - return tGit.Destination, nil - } - - tOci, errOci := OciParseArgs(ctx, args) - if errOci == nil { - if opts.SetOci == nil { - return "", kpterrors.E(op, fmt.Errorf("oci locations not supported: %v", errOci)) - } - if err := opts.SetOci(&tOci.Oci); err != nil { - return "", err - } - return tOci.Destination, nil - } - - // TODO(oci-support) combining error messages like this is suboptimal in several ways - return "", kpterrors.E(op, fmt.Errorf("%v %v", errGit, errOci)) -} - -type OciTarget struct { - kptfilev1.Oci - Destination string -} - -func OciParseArgs(ctx context.Context, args []string) (OciTarget, error) { - oci := OciTarget{} - if args[0] == "-" { - return oci, nil - } - - // The prefix must occur, and must not have other characters before it - arg0parts := strings.SplitN(args[0], "oci://", 2) - if len(arg0parts) != 2 || len(arg0parts[0]) != 0 { - return oci, errors.Errorf("ambiguous image:tag specify 'oci://' before argument: %s", args[0]) - } - - return targetFromImageReference(arg0parts[1], args[1]) -} - -func targetFromImageReference(image, dest string) (OciTarget, error) { - ref, err := name.ParseReference(image) - if err != nil { - return OciTarget{}, err - } - - registry := ref.Context().RegistryStr() - repository := ref.Context().RepositoryStr() - destination, err := getDest(dest, registry, repository) - if err != nil { - return OciTarget{}, err - } - - directory := "" - parts := strings.SplitN(ref.Context().Name(), "//", 2) - if len(parts) == 2 { - directory = "/" + parts[1] - repo, err := name.NewRepository(parts[0]) - if err != nil { - return OciTarget{}, err - } - - switch r := ref.(type) { - case name.Tag: - ref = repo.Tag(r.TagStr()) - case name.Digest: - ref = repo.Tag(r.DigestStr()) - } - } - - return OciTarget{ - Oci: kptfilev1.Oci{ - Image: ref.Name(), - Directory: directory, - }, - Destination: destination, - }, nil -} - -type GitTarget struct { +type Target struct { kptfilev1.Git Destination string } -func GitParseArgs(ctx context.Context, args []string) (GitTarget, error) { - g := GitTarget{} +func GitParseArgs(ctx context.Context, args []string) (Target, error) { + g := Target{} if args[0] == "-" { return g, nil } @@ -167,23 +72,20 @@ func GitParseArgs(ctx context.Context, args []string) (GitTarget, error) { version = defaultRef } + destination, err := getDest(args[1], repo, remoteDir) + if err != nil { + return g, err + } g.Ref = version g.Directory = path.Clean(remoteDir) g.Repo = repo - - if len(args) >= 2 { - destination, err := getDest(args[1], repo, remoteDir) - if err != nil { - return g, err - } - g.Destination = filepath.Clean(destination) - } + g.Destination = filepath.Clean(destination) return g, nil } // targetFromPkgURL parses a pkg url and destination into kptfile git info and local destination Target -func targetFromPkgURL(ctx context.Context, pkgURL, dest string) (GitTarget, error) { - g := GitTarget{} +func targetFromPkgURL(ctx context.Context, pkgURL, dest string) (Target, error) { + g := Target{} var repo, dir, version string parts := strings.Split(pkgURL, ".git") repo = strings.TrimSuffix(parts[0], "/") @@ -342,11 +244,6 @@ func getRepoAndPkg(v string) (string, string, error) { } func getDest(v, repo, subdir string) (string, error) { - // v is "" for commands that do not require an output path - if v == "" { - return "", nil - } - v = filepath.Clean(v) f, err := os.Stat(v) diff --git a/internal/util/pull/pull.go b/internal/util/pull/pull.go deleted file mode 100644 index 8f1e6509ed..0000000000 --- a/internal/util/pull/pull.go +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright 2019 Google LLC -// -// 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 get contains libraries for fetching packages. -package pull - -import ( - "context" - goerrors "errors" - "fmt" - "os" - "path/filepath" - - "github.com/GoogleContainerTools/kpt/internal/errors" - "github.com/GoogleContainerTools/kpt/internal/pkg" - "github.com/GoogleContainerTools/kpt/internal/printer" - "github.com/GoogleContainerTools/kpt/internal/types" - "github.com/GoogleContainerTools/kpt/internal/util/remote" - "github.com/GoogleContainerTools/kpt/pkg/kptfile/kptfileutil" - "sigs.k8s.io/kustomize/kyaml/filesys" -) - -// Command fetches a package from a git repository, copies it to a local -// directory, and expands any remote subpackages. -type Command struct { - // Contains information about the upstraem package to fetch - Origin remote.Origin - - // Destination is the output directory to clone the package to. Defaults to the name of the package -- - // either the base repo name, or the base subdirectory name. - Destination string -} - -// Run runs the Command. -func (c Command) Run(ctx context.Context) error { - const op errors.Op = "pull.Run" - pr := printer.FromContextOrDie(ctx) - - if err := (&c).DefaultValues(); err != nil { - return errors.E(op, err) - } - - if _, err := os.Stat(c.Destination); !goerrors.Is(err, os.ErrNotExist) { - return errors.E(op, errors.Exist, types.UniquePath(c.Destination), fmt.Errorf("destination directory already exists")) - } - - err := os.MkdirAll(c.Destination, 0700) - if err != nil { - return errors.E(op, errors.IO, types.UniquePath(c.Destination), err) - } - - pr.Printf("Pulling origin %s\n", c.Origin.String()) - - // TODO(oci-support) need to understand abs path for kpt pkg pull from git - _, digest, err := c.Origin.Fetch(ctx, c.Destination) - if err != nil { - return errors.E(op, types.UniquePath(c.Destination), err) - } - - pr.Printf("Pulled digest %s\n", digest) - - kf, err := pkg.ReadKptfile(filesys.FileSystemOrOnDisk{}, c.Destination) - if err != nil { - return errors.E(op, types.UniquePath(c.Destination), err) - } - - kf.Origin = c.Origin.Build(digest) - err = kptfileutil.WriteFile(c.Destination, kf) - if err != nil { - return cleanUpDirAndError(c.Destination, err) - } - - return nil -} - -// DefaultValues sets values to the default values if they were unspecified -func (c *Command) DefaultValues() error { - const op errors.Op = "pull.DefaultValues" - if c.Origin == nil { - return errors.E(op, errors.MissingParam, fmt.Errorf("must specify git repo or image reference information")) - } - if err := c.Origin.Validate(); err != nil { - return errors.E(op, err) - } - if !filepath.IsAbs(c.Destination) { - return errors.E(op, errors.InvalidParam, fmt.Errorf("destination must be an absolute path")) - } - - return nil -} - -func cleanUpDirAndError(destination string, err error) error { - const op errors.Op = "pull.Run" - rmErr := os.RemoveAll(destination) - if rmErr != nil { - return errors.E(op, types.UniquePath(destination), err, rmErr) - } - return errors.E(op, types.UniquePath(destination), err) -} diff --git a/internal/util/push/push.go b/internal/util/push/push.go deleted file mode 100644 index fad663c292..0000000000 --- a/internal/util/push/push.go +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright 2019 Google LLC -// -// 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 get contains libraries for fetching packages. -package push - -import ( - "bytes" - "context" - "fmt" - "strings" - - "github.com/GoogleContainerTools/kpt/internal/errors" - "github.com/GoogleContainerTools/kpt/internal/pkg" - "github.com/GoogleContainerTools/kpt/internal/printer" - "github.com/GoogleContainerTools/kpt/internal/util/remote" - "github.com/GoogleContainerTools/kpt/pkg/kptfile/kptfileutil" - "github.com/Masterminds/semver" -) - -// Command fetches a package from a git repository, copies it to a local -// directory, and expands any remote subpackages. -type Command struct { - // Pkg captures information about the package that should be push. - Pkg *pkg.Pkg - - // Ref is the version to push to origin - Ref string - - // Contains information about the package origin - Origin remote.Origin - - // Increment determines is the version portion of the reference should be increased - Increment bool - - // Origin assigns remote location for push. Ref and Increment will alter parts of this value. - Path string -} - -// Run runs the Command. -func (c Command) Run(ctx context.Context) error { - const op errors.Op = "push.Run" - pr := printer.FromContextOrDie(ctx) - - if err := (&c).DefaultValues(); err != nil { - return errors.E(op, err) - } - - path := c.Pkg.UniquePath.String() - kf, err := c.Pkg.Kptfile() - if err != nil { - return errors.E(op, c.Pkg.UniquePath, err) - } - - if c.Origin == nil { - c.Origin, err = remote.NewOrigin(kf) - if err != nil { - return errors.E(op, c.Pkg.UniquePath, fmt.Errorf("package must have an origin reference: %v", err)) - } - } - - if c.Ref != "" { - if err := c.Origin.SetRef(c.Ref); err != nil { - return errors.E(op, c.Pkg.UniquePath, fmt.Errorf("error updating ref: %v", err)) - } - } - - if c.Increment { - // TODO(oci-support) move this logic into a util with test coverage - ref, err := c.Origin.Ref() - if err != nil { - return errors.E(op, c.Pkg.UniquePath, fmt.Errorf("missing origin version information: %v", err)) - } - - prefix := "" - if ref != "" && ref[:1] == "v" { - prefix = "v" - } - - dotParts := len(strings.SplitN(ref, ".", 3)) - if dotParts > 3 { - return errors.E(op, c.Pkg.UniquePath, fmt.Errorf("origin version '%s' has more than three dotted parts", ref)) - } - - v, err := semver.NewVersion(ref) - if err != nil { - return errors.E(op, c.Pkg.UniquePath, fmt.Errorf("unable to increment '%s': %v", ref, err)) - } - - var buf bytes.Buffer - switch dotParts { - case 1: - fmt.Fprintf(&buf, "%s%d", prefix, v.Major()+1) - case 2: - fmt.Fprintf(&buf, "%s%d.%d", prefix, v.Major(), v.Minor()+1) - case 3: - fmt.Fprintf(&buf, "%s%d.%d.%d", prefix, v.Major(), v.Minor(), v.Patch()+1) - } - if v.Prerelease() != "" { - fmt.Fprintf(&buf, "-%s", v.Prerelease()) - } - if v.Metadata() != "" { - fmt.Fprintf(&buf, "+%s", v.Metadata()) - } - - pr.Printf("Incrementing %s to %s\n", ref, buf.String()) - - if err := c.Origin.SetRef(buf.String()); err != nil { - return errors.E(op, c.Pkg.UniquePath, fmt.Errorf("error updating ref: %v", err)) - } - } - - // the kptfile pushed in the package does not have origin data - // this is because the digest will be incorrect. Also, if it is - // pulled from a different location or via different branch, the - // correct origin will be added as part of the pull operation. - kf.Origin = nil - - pr.Printf("Pushing origin %s\n", c.Origin.String()) - - digest, err := c.Origin.Push(ctx, path, kf) - if err != nil { - return errors.E(op, c.Pkg.UniquePath, err) - } - - pr.Printf("Pushed digest %s\n", digest) - - kf.Origin = c.Origin.Build(digest) - err = kptfileutil.WriteFile(path, kf) - if err != nil { - return errors.E(op, c.Pkg.UniquePath, err) - } - - return nil -} - -// DefaultValues sets values to the default values if they were unspecified -func (c *Command) DefaultValues() error { - // const op errors.Op = "pull.DefaultValues" - // if c.Origin == nil { - // return errors.E(op, errors.MissingParam, fmt.Errorf("must specify git repo or image reference information")) - // } - // if err := c.Origin.Validate(); err != nil { - // return errors.E(op, err) - // } - - return nil -} diff --git a/internal/util/remote/git.go b/internal/util/remote/git.go deleted file mode 100644 index daee27f99d..0000000000 --- a/internal/util/remote/git.go +++ /dev/null @@ -1,403 +0,0 @@ -// Copyright 2021 Google LLC -// -// 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 remote - -import ( - "context" - "fmt" - "io/ioutil" - "os" - "path" - "path/filepath" - "strings" - - "github.com/GoogleContainerTools/kpt/internal/errors" - "github.com/GoogleContainerTools/kpt/internal/gitutil" - "github.com/GoogleContainerTools/kpt/internal/pkg" - "github.com/GoogleContainerTools/kpt/internal/printer" - "github.com/GoogleContainerTools/kpt/internal/types" - "github.com/GoogleContainerTools/kpt/internal/util/git" - "github.com/GoogleContainerTools/kpt/internal/util/pkgutil" - kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1" - "github.com/GoogleContainerTools/kpt/pkg/kptfile/kptfileutil" - "github.com/otiai10/copy" - "sigs.k8s.io/kustomize/kyaml/filesys" -) - -type gitUpstream struct { - git *kptfilev1.Git - gitLock *kptfilev1.GitLock -} - -var _ Upstream = &gitUpstream{} - -type gitOrigin struct { - git *kptfilev1.GitLock -} - -var _ Origin = &gitOrigin{} - -func NewGitUpstream(git *kptfilev1.Git) Upstream { - return &gitUpstream{ - git: git, - } -} - -func NewGitOrigin(git *kptfilev1.Git) Origin { - return &gitOrigin{ - git: &kptfilev1.GitLock{ - Repo: git.Repo, - Directory: git.Directory, - Ref: git.Ref, - }, - } -} - -func (u *gitUpstream) String() string { - return fmt.Sprintf("%s@%s", u.git.Repo, u.git.Ref) -} - -func (u *gitUpstream) LockedString() string { - return fmt.Sprintf("%s@%s", u.gitLock.Repo, u.gitLock.Ref) -} - -func (u *gitOrigin) String() string { - return fmt.Sprintf("%s@%s", u.git.Repo, u.git.Ref) -} - -func (u *gitOrigin) LockedString() string { - return fmt.Sprintf("%s@%s", u.git.Repo, u.git.Ref) -} - -func (u *gitUpstream) Validate() error { - const op errors.Op = "remote.Validate" - g := u.git - if g != nil { - if len(g.Repo) == 0 { - return errors.E(op, errors.MissingParam, fmt.Errorf("must specify repo")) - } - if len(g.Ref) == 0 { - return errors.E(op, errors.MissingParam, fmt.Errorf("must specify ref")) - } - if len(g.Directory) == 0 { - return errors.E(op, errors.MissingParam, fmt.Errorf("must specify directory")) - } - } - return nil -} - -func (u *gitOrigin) Validate() error { - const op errors.Op = "remote.Validate" - g := u.git - if g != nil { - if len(g.Repo) == 0 { - return errors.E(op, errors.MissingParam, fmt.Errorf("must specify repo")) - } - if len(g.Ref) == 0 { - return errors.E(op, errors.MissingParam, fmt.Errorf("must specify ref")) - } - if len(g.Directory) == 0 { - return errors.E(op, errors.MissingParam, fmt.Errorf("must specify directory")) - } - } - return nil -} - -func (u *gitUpstream) BuildUpstream() *kptfilev1.Upstream { - repoDir := u.git.Directory - if !strings.HasSuffix(repoDir, "file://") { - repoDir = filepath.Join(path.Split(repoDir)) - } - u.git.Directory = repoDir - - return &kptfilev1.Upstream{ - Type: kptfilev1.GitOrigin, - Git: u.git, - } -} - -func (u *gitUpstream) BuildUpstreamLock(digest string) *kptfilev1.UpstreamLock { - u.gitLock = &kptfilev1.GitLock{ - Repo: u.git.Repo, - Directory: u.git.Directory, - Ref: u.git.Ref, - Commit: digest, - } - return &kptfilev1.UpstreamLock{ - Type: kptfilev1.GitOrigin, - Git: u.gitLock, - } -} - -func (u *gitOrigin) Build(digest string) *kptfilev1.Origin { - return &kptfilev1.Origin{ - Type: kptfilev1.GitOrigin, - Git: &kptfilev1.GitLock{ - Repo: u.git.Repo, - Directory: u.git.Directory, - Ref: u.git.Ref, - Commit: digest, - }, - } -} - -func (u *gitUpstream) FetchUpstream(ctx context.Context, dest string) (string, string, error) { - repoSpec := &git.RepoSpec{ - OrgRepo: u.git.Repo, - Path: u.git.Directory, - Ref: u.git.Ref, - Dir: dest, - } - if err := ClonerUsingGitExec(ctx, repoSpec); err != nil { - return "", "", err - } - return path.Join(repoSpec.Dir, repoSpec.Path), repoSpec.Commit, nil -} - -func (u *gitUpstream) FetchUpstreamLock(ctx context.Context, dest string) (string, error) { - repoSpec := &git.RepoSpec{ - OrgRepo: u.gitLock.Repo, - Path: u.gitLock.Directory, - Ref: u.gitLock.Commit, - Dir: dest, - } - if err := ClonerUsingGitExec(ctx, repoSpec); err != nil { - return "", err - } - return path.Join(repoSpec.Dir, repoSpec.Path), nil -} - -func (u *gitOrigin) Fetch(ctx context.Context, dest string) (string, string, error) { - repoSpec := &git.RepoSpec{ - OrgRepo: u.git.Repo, - Path: u.git.Directory, - Ref: u.git.Ref, - } - if err := ClonerUsingGitExec(ctx, repoSpec); err != nil { - return "", "", err - } - defer os.RemoveAll(repoSpec.Dir) - if err := pkgutil.CopyPackage(repoSpec.AbsPath(), dest, true, pkg.All); err != nil { - return "", "", err - } - - return dest, repoSpec.Commit, nil -} - -func (u *gitUpstream) CloneUpstream(ctx context.Context, dest string) error { - repoSpec := &git.RepoSpec{ - OrgRepo: u.git.Repo, - Path: u.git.Directory, - Ref: u.git.Ref, - } - return cloneAndCopy(ctx, repoSpec, dest) -} - -func (u *gitOrigin) Push(ctx context.Context, dest string, kptfile *kptfilev1.KptFile) (digest string, err error) { - return "", fmt.Errorf("git push not implemented") -} - -func (u *gitUpstream) Ref() (string, error) { - return u.git.Ref, nil -} - -func (u *gitUpstream) SetRef(ref string) error { - u.git.Ref = ref - return nil -} - -func (u *gitOrigin) Ref() (string, error) { - return u.git.Ref, nil -} - -func (u *gitOrigin) SetRef(ref string) error { - u.git.Ref = ref - return nil -} - -// shouldUpdateSubPkgRef checks if subpkg ref should be updated. -// This is true if pkg has the same upstream repo, upstream directory is within or equal to root pkg directory and original root pkg ref matches the subpkg ref. -func (u *gitUpstream) ShouldUpdateSubPkgRef(rootUpstream Upstream, originalRootKfRef string) bool { - root, ok := rootUpstream.(*gitUpstream) - return ok && - u.git.Repo == root.git.Repo && - u.git.Ref == originalRootKfRef && - strings.HasPrefix(path.Clean(u.git.Directory), path.Clean(root.git.Directory)) -} - -// cloneAndCopy fetches the provided repo and copies the content into the -// directory specified by dest. The provided name is set as `metadata.name` -// of the Kptfile of the package. -func cloneAndCopy(ctx context.Context, r *git.RepoSpec, dest string) error { - const op errors.Op = "fetch.cloneAndCopy" - pr := printer.FromContextOrDie(ctx) - - err := ClonerUsingGitExec(ctx, r) - if err != nil { - return errors.E(op, errors.Git, types.UniquePath(dest), err) - } - defer os.RemoveAll(r.Dir) - - sourcePath := filepath.Join(r.Dir, r.Path) - pr.Printf("Adding package %q.\n", strings.TrimPrefix(r.Path, "/")) - if err := pkgutil.CopyPackage(sourcePath, dest, true, pkg.All); err != nil { - return errors.E(op, types.UniquePath(dest), err) - } - - if err := kptfileutil.UpdateKptfileWithoutOrigin(dest, sourcePath, false); err != nil { - return errors.E(op, types.UniquePath(dest), err) - } - - if err := kptfileutil.UpdateUpstreamLockFromGit(dest, r); err != nil { - return errors.E(op, errors.Git, types.UniquePath(dest), err) - } - return nil -} - -// ClonerUsingGitExec uses a local git install, as opposed -// to say, some remote API, to obtain a local clone of -// a remote repo. It looks for tags with the directory as a prefix to allow -// for versioning multiple kpt packages in a single repo independently. It -// relies on the private clonerUsingGitExec function to try fetching different -// refs. -func ClonerUsingGitExec(ctx context.Context, repoSpec *git.RepoSpec) error { - const op errors.Op = "fetch.ClonerUsingGitExec" - - // Create a local representation of the upstream repo. This will initialize - // the cache for the specified repo uri if it isn't already there. It also - // fetches and caches all tag and branch refs from the upstream repo. - upstreamRepo, err := gitutil.NewGitUpstreamRepo(ctx, repoSpec.CloneSpec()) - if err != nil { - return errors.E(op, errors.Git, errors.Repo(repoSpec.CloneSpec()), err) - } - - // Check if we have a ref in the upstream that matches the package-specific - // reference. If we do, we use that reference. - ps := strings.Split(repoSpec.Path, "/") - for len(ps) != 0 { - p := path.Join(ps...) - packageRef := path.Join(strings.TrimLeft(p, "/"), repoSpec.Ref) - if _, found := upstreamRepo.ResolveTag(packageRef); found { - repoSpec.Ref = packageRef - break - } - ps = ps[:len(ps)-1] - } - - // Pull the required ref into the repo git cache. - dir, err := upstreamRepo.GetRepo(ctx, []string{repoSpec.Ref}) - if err != nil { - return errors.E(op, errors.Git, errors.Repo(repoSpec.CloneSpec()), err) - } - - gitRunner, err := gitutil.NewLocalGitRunner(dir) - if err != nil { - return errors.E(op, errors.Git, errors.Repo(repoSpec.CloneSpec()), err) - } - - // Find the commit SHA for the ref that was just fetched. We need the SHA - // rather than the ref to be able to do a hard reset of the cache repo. - commit, found := upstreamRepo.ResolveRef(repoSpec.Ref) - if !found { - commit = repoSpec.Ref - } - - // Reset the local repo to the commit we need. Doing a hard reset instead of - // a checkout means we don't create any local branches so we don't need to - // worry about fast-forwarding them with changes from upstream. It also makes - // sure that any changes in the local worktree are cleaned out. - _, err = gitRunner.Run(ctx, "reset", "--hard", commit) - if err != nil { - gitutil.AmendGitExecError(err, func(e *gitutil.GitExecError) { - e.Repo = repoSpec.CloneSpec() - e.Ref = commit - }) - return errors.E(op, errors.Git, errors.Repo(repoSpec.CloneSpec()), err) - } - - if repoSpec.Dir == "" { - // We need to create a temp directory where we can copy the content of the repo. - // During update, we need to checkout multiple versions of the same repo, so - // we can't do merges directly from the cache. - repoSpec.Dir, err = ioutil.TempDir("", "kpt-get-") - if err != nil { - return errors.E(op, errors.Internal, fmt.Errorf("error creating temp directory: %w", err)) - } - } - repoSpec.Commit = commit - - pkgPath := filepath.Join(dir, repoSpec.Path) - // Verify that the requested path exists in the repo. - _, err = os.Stat(pkgPath) - if os.IsNotExist(err) { - return errors.E(op, - errors.Internal, - err, - fmt.Errorf("path %q does not exist in repo %q", repoSpec.Path, repoSpec.OrgRepo)) - } - - // Copy the content of the pkg into the temp directory. - // Note that we skip the content outside the package directory. - err = copyDir(ctx, pkgPath, repoSpec.AbsPath()) - if err != nil { - return errors.E(op, errors.Internal, fmt.Errorf("error copying package: %w", err)) - } - - // Verify that if a Kptfile exists in the package, it contains the correct - // version of the Kptfile. - _, err = pkg.ReadKptfile(filesys.FileSystemOrOnDisk{}, pkgPath) - if err != nil { - // A Kptfile isn't required, so it is fine if there is no Kptfile. - if errors.Is(err, os.ErrNotExist) { - return nil - } - - // If the error is of type KptfileError, we replace it with a - // RemoteKptfileError. This allows us to provide information about the - // git source of the Kptfile instead of the path to some random - // temporary directory. - var kfError *pkg.KptfileError - if errors.As(err, &kfError) { - return &pkg.RemoteKptfileError{ - RepoSpec: repoSpec, - Err: kfError.Err, - } - } - } - return nil -} - -// copyDir copies a src directory to a dst directory. -// copyDir skips copying the .git directory from the src and ignores symlinks. -func copyDir(ctx context.Context, srcDir string, dstDir string) error { - pr := printer.FromContextOrDie(ctx) - opts := copy.Options{ - Skip: func(src string) (bool, error) { - return strings.HasSuffix(src, ".git"), nil - }, - OnSymlink: func(src string) copy.SymlinkAction { - // try to print relative path of symlink - // if we can, else absolute path which is not - // pretty because it contains path to temporary repo dir - displayPath, err := filepath.Rel(srcDir, src) - if err != nil { - displayPath = src - } - pr.Printf("[Warn] Ignoring symlink %q \n", displayPath) - return copy.Skip - }, - } - return copy.Copy(srcDir, dstDir, opts) -} diff --git a/internal/util/remote/git_test.go b/internal/util/remote/git_test.go deleted file mode 100644 index 4a5cd6970d..0000000000 --- a/internal/util/remote/git_test.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2021 Google LLC -// -// 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 remote - -import ( - "reflect" - "testing" - - v1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1" -) - -//nolint:scopelint -func TestNewGitUpstream(t *testing.T) { - type args struct { - git *v1.Git - } - tests := []struct { - name string - args args - want Upstream - }{ - // TODO: Add test cases. - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if got := NewGitUpstream(tt.args.git); !reflect.DeepEqual(got, tt.want) { - t.Errorf("NewGitUpstream() = %v, want %v", got, tt.want) - } - }) - } -} - -//nolint:scopelint -func Test_gitUpstream_String(t *testing.T) { - type fields struct { - git *v1.Git - } - tests := []struct { - name string - fields fields - want string - }{ - { - name: "Returns repo ref string", - fields: fields{ - git: &v1.Git{ - Repo: "https://hostname/repo.git", - Ref: "main", - }, - }, - want: "https://hostname/repo.git@main", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - u := &gitUpstream{ - git: tt.fields.git, - } - if got := u.String(); got != tt.want { - t.Errorf("gitUpstream.String() = %v, want %v", got, tt.want) - } - }) - } -} diff --git a/internal/util/remote/oci.go b/internal/util/remote/oci.go deleted file mode 100644 index 7363ce4568..0000000000 --- a/internal/util/remote/oci.go +++ /dev/null @@ -1,461 +0,0 @@ -// Copyright 2021 Google LLC -// -// 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 remote - -import ( - "archive/tar" - "bytes" - "compress/gzip" - "context" - "fmt" - "io" - "io/fs" - "io/ioutil" - "os" - "path" - "path/filepath" - "strings" - - "github.com/GoogleContainerTools/kpt/internal/errors" - "github.com/GoogleContainerTools/kpt/internal/pkg" - "github.com/GoogleContainerTools/kpt/internal/types" - "github.com/GoogleContainerTools/kpt/internal/util/pkgutil" - kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1" - "github.com/GoogleContainerTools/kpt/pkg/kptfile/kptfileutil" - "github.com/google/go-containerregistry/pkg/crane" - "github.com/google/go-containerregistry/pkg/gcrane" - "github.com/google/go-containerregistry/pkg/name" - "github.com/google/go-containerregistry/pkg/v1/empty" - "github.com/google/go-containerregistry/pkg/v1/mutate" - "github.com/google/go-containerregistry/pkg/v1/remote" -) - -type ociUpstream struct { - oci *kptfilev1.Oci - ociLock *kptfilev1.OciLock -} - -var _ Upstream = &ociUpstream{} - -type ociOrigin struct { - oci *kptfilev1.OciLock -} - -var _ Origin = &ociOrigin{} - -func NewOciUpstream(oci *kptfilev1.Oci) Upstream { - return &ociUpstream{ - oci: oci, - } -} - -func NewOciOrigin(oci *kptfilev1.Oci) Origin { - return &ociOrigin{ - oci: &kptfilev1.OciLock{ - Image: oci.Image, - }, - } -} - -func (u *ociUpstream) String() string { - return u.oci.Image -} - -func (u *ociUpstream) LockedString() string { - return u.ociLock.Digest -} - -func (u *ociOrigin) String() string { - return u.oci.Image -} - -func (u *ociOrigin) LockedString() string { - return u.oci.Digest -} - -func (u *ociUpstream) BuildUpstream() *kptfilev1.Upstream { - return &kptfilev1.Upstream{ - Type: kptfilev1.OciOrigin, - Oci: u.oci, - } -} - -func (u *ociUpstream) BuildUpstreamLock(digest string) *kptfilev1.UpstreamLock { - u.ociLock.Image = u.oci.Image - u.ociLock.Directory = u.oci.Directory - u.ociLock.Digest = digest - - return &kptfilev1.UpstreamLock{ - Type: kptfilev1.OciOrigin, - Oci: u.ociLock, - } -} - -func (u *ociOrigin) Build(digest string) *kptfilev1.Origin { - return &kptfilev1.Origin{ - Type: kptfilev1.OciOrigin, - Oci: &kptfilev1.OciLock{ - Image: u.oci.Image, - Digest: digest, - }, - } -} - -func (u *ociUpstream) Validate() error { - const op errors.Op = "remote.Validate" - if u.oci != nil { - if len(u.oci.Image) == 0 { - return errors.E(op, errors.MissingParam, fmt.Errorf("must specify image")) - } - } - return nil -} - -func (u *ociOrigin) Validate() error { - const op errors.Op = "remote.Validate" - if u.oci != nil { - if len(u.oci.Image) == 0 { - return errors.E(op, errors.MissingParam, fmt.Errorf("must specify image")) - } - } - return nil -} - -func (u *ociUpstream) FetchUpstream(ctx context.Context, dest string) (string, string, error) { - const op errors.Op = "remote.FetchUpstream" - imageDigest, err := pullAndExtract(u.oci.Image, dest, remote.WithContext(ctx), remote.WithAuthFromKeychain(gcrane.Keychain)) - if err != nil { - return "", "", errors.E(op, errors.OCI, types.UniquePath(dest), err) - } - return path.Join(dest, u.oci.Directory), imageDigest.Name(), nil -} - -func (u *ociUpstream) FetchUpstreamLock(ctx context.Context, dest string) (string, error) { - const op errors.Op = "remote.FetchUpstreamLock" - _, err := pullAndExtract(u.ociLock.Digest, dest, remote.WithContext(ctx), remote.WithAuthFromKeychain(gcrane.Keychain)) - if err != nil { - return "", errors.E(op, errors.OCI, types.UniquePath(dest), err) - } - return path.Join(dest, u.ociLock.Directory), nil -} - -func (u *ociOrigin) Fetch(ctx context.Context, dest string) (string, string, error) { - const op errors.Op = "remote.Fetch" - imageDigest, err := pullAndExtract(u.oci.Image, dest, remote.WithContext(ctx), remote.WithAuthFromKeychain(gcrane.Keychain)) - if err != nil { - return "", "", errors.E(op, errors.OCI, types.UniquePath(dest), err) - } - return path.Join(dest, u.oci.Directory), imageDigest.Name(), nil -} - -func (u *ociUpstream) CloneUpstream(ctx context.Context, dest string) error { - const op errors.Op = "remote.FetchUpstreamClone" - // pr := printer.FromContextOrDie(ctx) - - // We need to create a temp directory where we can copy the content of the repo. - // During update, we need to checkout multiple versions of the same repo, so - // we can't do merges directly from the cache. - dir, err := ioutil.TempDir("", "kpt-get-") - if err != nil { - return errors.E(op, errors.Internal, fmt.Errorf("error creating temp directory: %w", err)) - } - defer os.RemoveAll(dir) - - imageDigest, err := pullAndExtract(u.oci.Image, dir, remote.WithContext(ctx), remote.WithAuthFromKeychain(gcrane.Keychain)) - if err != nil { - return errors.E(op, errors.OCI, types.UniquePath(dest), err) - } - - sourcePath := path.Join(dir, u.oci.Directory) - if err := pkgutil.CopyPackage(sourcePath, dest, true, pkg.All); err != nil { - return errors.E(op, types.UniquePath(dest), err) - } - - if err := kptfileutil.UpdateKptfileWithoutOrigin(dest, sourcePath, false); err != nil { - return errors.E(op, types.UniquePath(dest), err) - } - - if err := kptfileutil.UpdateUpstreamLock(dest, u.BuildUpstreamLock(imageDigest.String())); err != nil { - return errors.E(op, errors.OCI, types.UniquePath(dest), err) - } - - return nil -} - -func (u *ociOrigin) Push(ctx context.Context, source string, kptfile *kptfilev1.KptFile) (digest string, err error) { - const op errors.Op = "remote.Push" - - imageDigest, err := archiveAndPush(u.oci.Image, source, kptfile, remote.WithContext(ctx), remote.WithAuthFromKeychain(gcrane.Keychain)) - if err != nil { - return "", errors.E(op, errors.OCI, types.UniquePath(source), err) - } - - return imageDigest.String(), nil -} - -func (u *ociUpstream) Ref() (string, error) { - const op errors.Op = "remote.Ref" - r, err := name.ParseReference(u.oci.Image) - if err != nil { - return "", errors.E(op, errors.Internal, fmt.Errorf("error parsing reference: %s %w", u.oci.Image, err)) - } - return r.Identifier(), nil -} - -func (u *ociUpstream) SetRef(ref string) error { - const op errors.Op = "remote.SetRef" - r, err := name.ParseReference(u.oci.Image) - if err != nil { - return errors.E(op, errors.Internal, fmt.Errorf("error parsing reference: %s %w", u.oci.Image, err)) - } - - if len(strings.SplitN(ref, "sha256:", 2)[0]) == 0 { - u.oci.Image = r.Context().Digest(ref).Name() - } else { - u.oci.Image = r.Context().Tag(ref).Name() - } - - return nil -} - -func (u *ociOrigin) Ref() (string, error) { - const op errors.Op = "remote.Ref" - r, err := name.ParseReference(u.oci.Image) - if err != nil { - return "", errors.E(op, errors.Internal, fmt.Errorf("error parsing reference: %s %w", u.oci.Image, err)) - } - return r.Identifier(), nil -} - -func (u *ociOrigin) SetRef(ref string) error { - const op errors.Op = "remote.SetRef" - r, err := name.ParseReference(u.oci.Image) - if err != nil { - return errors.E(op, errors.Internal, fmt.Errorf("error parsing reference: %s %w", u.oci.Image, err)) - } - - if len(strings.SplitN(ref, "sha256:", 2)[0]) == 0 { - u.oci.Image = r.Context().Digest(ref).Name() - } else { - u.oci.Image = r.Context().Tag(ref).Name() - } - - return nil -} - -// shouldUpdateSubPkgRef checks if subpkg ref should be updated. -// This is true if pkg has the same upstream repo, upstream directory is within or equal to root pkg directory and original root pkg ref matches the subpkg ref. -func (u *ociUpstream) ShouldUpdateSubPkgRef(rootUpstream Upstream, originalRootKfRef string) bool { - root, ok := rootUpstream.(*ociUpstream) - if !ok { - return false - } - subName, err := name.ParseReference(u.oci.Image) - if err != nil { - return false - } - rootName, err := name.ParseReference(root.oci.Image) - if err != nil { - return false - } - return subName.Context().String() == rootName.Context().String() && - subName.Identifier() == originalRootKfRef -} - -// pullAndExtract uses current credentials (gcloud auth) to pull and -// extract (untar) image files to target directory. The desired version or digest must -// be in the imageName, and the resolved image sha256 digest is returned. -func pullAndExtract(imageName string, dir string, options ...remote.Option) (name.Reference, error) { - const op errors.Op = "remote.pullAndExtract" - - ref, err := name.ParseReference(imageName) - if err != nil { - return nil, fmt.Errorf("parsing reference %q: %v", imageName, err) - } - - // Pull image from source using provided options for auth credentials - image, err := remote.Image(ref, options...) - if err != nil { - return nil, fmt.Errorf("pulling image %s: %v", imageName, err) - } - - // Stream image files as if single tar (merged layers) - ioReader := mutate.Extract(image) - defer ioReader.Close() - - // Write contents to target dir - // TODO look for a more robust example of an untar loop - tarReader := tar.NewReader(ioReader) - for { - hdr, err := tarReader.Next() - if err == io.EOF { - break - } - if err != nil { - return nil, err - } - path := filepath.Join(dir, hdr.Name) - switch { - case hdr.FileInfo().IsDir(): - if err := os.MkdirAll(path, hdr.FileInfo().Mode()); err != nil { - return nil, err - } - case hdr.Linkname != "": - if err := os.Symlink(hdr.Linkname, path); err != nil { - // just warn for now - fmt.Fprintln(os.Stderr, err) - // return err - } - default: - file, err := os.OpenFile(path, - os.O_WRONLY|os.O_CREATE|os.O_TRUNC, - os.FileMode(hdr.Mode), - ) - if err != nil { - return nil, err - } - defer file.Close() - - _, err = io.Copy(file, tarReader) - if err != nil { - return nil, err - } - } - } - - // Determine the digest of the image that was extracted - imageDigestHash, err := image.Digest() - if err != nil { - return nil, errors.E(op, fmt.Errorf("error calculating image digest: %w", err)) - } - imageDigest := ref.Context().Digest("sha256:" + imageDigestHash.Hex) - - // Return the image with digest when successful, needed for upstreamLock - return imageDigest, nil -} - -// archiveAndPush uses current credentials (gcloud auth) to tar and -// extract (untar) image files to target directory. The desired version or digest must -// be in the imageName, and the resolved image sha256 digest is returned. -func archiveAndPush(imageName string, dir string, kptfile *kptfilev1.KptFile, options ...remote.Option) (name.Reference, error) { - const op errors.Op = "remote.archiveAndPush" - - ref, err := name.ParseReference(imageName) - if err != nil { - return nil, fmt.Errorf("parsing reference %q: %v", imageName, err) - } - - // Make new layer - tarFile, err := ioutil.TempFile("", "tar") - if err != nil { - return nil, err - } - defer os.Remove(tarFile.Name()) - - if err := func() error { - defer tarFile.Close() - - gw := gzip.NewWriter(tarFile) - defer gw.Close() - - tw := tar.NewWriter(gw) - defer tw.Close() - - if err := filepath.Walk(dir, func(path string, info fs.FileInfo, err error) error { - if err != nil { - return err - } - - relative, err := filepath.Rel(dir, path) - if err != nil { - return err - } - if info.IsDir() && relative == "." { - return nil - } - - // TODO(oci-support) if info is symlink also read link target - link := "" - - // generate tar header - header, err := tar.FileInfoHeader(info, link) - if err != nil { - return err - } - - // must provide real name - // (see https://golang.org/src/archive/tar/common.go?#L626) - header.Name = filepath.ToSlash(relative) - - var buf *bytes.Buffer - if strings.EqualFold(header.Name, "Kptfile") { - buf = &bytes.Buffer{} - if err := kptfileutil.Write(buf, kptfile); err != nil { - return err - } - header.Size = int64(buf.Len()) - } - - // write header - if err := tw.WriteHeader(header); err != nil { - return err - } - // if not a dir, write file content - if !info.IsDir() { - data, err := os.Open(path) - if err != nil { - return err - } - if buf != nil { - if _, err := io.Copy(tw, buf); err != nil { - return err - } - } else { - if _, err := io.Copy(tw, data); err != nil { - return err - } - } - } - return nil - }); err != nil { - return err - } - - return nil - }(); err != nil { - return nil, err - } - - // Append new layer - newLayers := []string{tarFile.Name()} - img, err := crane.Append(empty.Image, newLayers...) - if err != nil { - return nil, fmt.Errorf("appending %v: %v", newLayers, err) - } - - if err := remote.Write(ref, img, options...); err != nil { - return nil, fmt.Errorf("pushing image %s: %v", ref, err) - } - - // Determine the digest of the image that was pushed - imageDigestHash, err := img.Digest() - if err != nil { - return nil, errors.E(op, fmt.Errorf("error calculating image digest: %w", err)) - } - imageDigest := ref.Context().Digest("sha256:" + imageDigestHash.Hex) - - // Return the image with digest when successful, needed for upstreamLock - return imageDigest, nil -} diff --git a/internal/util/remote/origin.go b/internal/util/remote/origin.go deleted file mode 100644 index 9578fdaeec..0000000000 --- a/internal/util/remote/origin.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2021 Google LLC -// -// 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 remote - -import ( - "context" - "fmt" - - "github.com/GoogleContainerTools/kpt/internal/errors" - kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1" -) - -type Origin interface { - fmt.Stringer - LockedString() string - - Validate() error - - Build(digest string) *kptfilev1.Origin - - Fetch(ctx context.Context, dest string) (absPath string, digest string, err error) - Push(ctx context.Context, dest string, kptfile *kptfilev1.KptFile) (digest string, err error) - - Ref() (string, error) - SetRef(ref string) error -} - -func NewOrigin(kf *kptfilev1.KptFile) (Origin, error) { - const op errors.Op = "remote.NewOrigin" - if kf != nil && kf.Origin != nil { - switch kf.Origin.Type { - case kptfilev1.GitOrigin: - if kf.Upstream.Git == nil { - return nil, errors.E(op, errors.MissingParam, fmt.Errorf("kptfile origin must have git information")) - } - u := &gitOrigin{ - git: kf.Origin.Git, - } - return u, nil - case kptfilev1.OciOrigin: - if kf.Origin.Oci == nil { - return nil, errors.E(op, errors.MissingParam, fmt.Errorf("kptfile origin must have oci information")) - } - u := &ociOrigin{ - oci: kf.Origin.Oci, - } - return u, nil - } - } - return nil, errors.E(op, errors.MissingParam, fmt.Errorf("kptfile origin type must be one of: %s,%s", kptfilev1.GitOrigin, kptfilev1.OciOrigin)) -} diff --git a/internal/util/remote/upstream.go b/internal/util/remote/upstream.go deleted file mode 100644 index e73a1d9a38..0000000000 --- a/internal/util/remote/upstream.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2021 Google LLC -// -// 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 remote - -import ( - "context" - "fmt" - - "github.com/GoogleContainerTools/kpt/internal/errors" - kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1" -) - -type Upstream interface { - fmt.Stringer - LockedString() string - - Validate() error - - BuildUpstream() *kptfilev1.Upstream - BuildUpstreamLock(digest string) *kptfilev1.UpstreamLock - - FetchUpstream(ctx context.Context, dest string) (absPath string, digest string, err error) - FetchUpstreamLock(ctx context.Context, dest string) (absPath string, err error) - - CloneUpstream(ctx context.Context, dest string) error - - Ref() (string, error) - SetRef(ref string) error - ShouldUpdateSubPkgRef(rootUpstream Upstream, originalRootRef string) bool -} - -func NewUpstream(kf *kptfilev1.KptFile) (Upstream, error) { - const op errors.Op = "remote.NewUpstream" - if kf != nil && kf.Upstream != nil { - switch kf.Upstream.Type { - case kptfilev1.GitOrigin: - if kf.Upstream.Git == nil { - return nil, errors.E(op, errors.MissingParam, fmt.Errorf("kptfile upstream must have git information")) - } - u := &gitUpstream{ - git: kf.Upstream.Git, - gitLock: &kptfilev1.GitLock{}, - } - if kf.UpstreamLock != nil && kf.UpstreamLock.Git != nil { - u.gitLock = kf.UpstreamLock.Git - } - return u, nil - case kptfilev1.OciOrigin: - if kf.Upstream.Oci == nil { - return nil, errors.E(op, errors.MissingParam, fmt.Errorf("kptfile upstream must have oci information")) - } - u := &ociUpstream{ - oci: kf.Upstream.Oci, - ociLock: &kptfilev1.OciLock{}, - } - if kf.UpstreamLock != nil && kf.UpstreamLock.Oci != nil { - u.ociLock = kf.UpstreamLock.Oci - } - return u, nil - } - } - return nil, errors.E(op, errors.MissingParam, fmt.Errorf("kptfile upstream type must be one of: %s,%s", kptfilev1.GitOrigin, kptfilev1.OciOrigin)) -} - -func ShouldUpdateSubPkgRef(subUpstream Upstream, rootUpstream Upstream, originalRootRef string) bool { - return subUpstream.ShouldUpdateSubPkgRef(rootUpstream, originalRootRef) -} diff --git a/internal/util/remote/upstream_test.go b/internal/util/remote/upstream_test.go deleted file mode 100644 index 8a7e8183e3..0000000000 --- a/internal/util/remote/upstream_test.go +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright 2021 Google LLC -// -// 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 remote - -import ( - "reflect" - "testing" - - kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1" -) - -//nolint:scopelint -func TestNewUpstream(t *testing.T) { - type args struct { - kf *kptfilev1.KptFile - } - tests := []struct { - name string - args args - want Upstream - wantErr bool - }{ - { - name: "returns git upstream", - args: args{ - kf: &kptfilev1.KptFile{ - Upstream: &kptfilev1.Upstream{ - Type: kptfilev1.GitOrigin, - Git: &kptfilev1.Git{ - Repo: "repo-name", - Directory: "dir-name", - Ref: "ref-name", - }, - }, - }, - }, - want: &gitUpstream{ - git: &kptfilev1.Git{ - Repo: "repo-name", - Directory: "dir-name", - Ref: "ref-name", - }, - gitLock: &kptfilev1.GitLock{}, - }, - wantErr: false, - }, - { - name: "returns oci upstream", - args: args{ - kf: &kptfilev1.KptFile{ - Upstream: &kptfilev1.Upstream{ - Type: kptfilev1.OciOrigin, - Oci: &kptfilev1.Oci{ - Image: "image-name", - }, - }, - }, - }, - want: &ociUpstream{ - oci: &kptfilev1.Oci{ - Image: "image-name", - }, - ociLock: &kptfilev1.OciLock{}, - }, - wantErr: false, - }, - { - name: "empty type fails", - args: args{ - kf: &kptfilev1.KptFile{ - Upstream: &kptfilev1.Upstream{}, - }, - }, - want: nil, - wantErr: true, - }, - { - name: "nil upstream fails", - args: args{ - kf: &kptfilev1.KptFile{}, - }, - want: nil, - wantErr: true, - }, - { - name: "nil git fails", - args: args{ - kf: &kptfilev1.KptFile{ - Upstream: &kptfilev1.Upstream{ - Type: kptfilev1.GitOrigin, - }, - }, - }, - want: nil, - wantErr: true, - }, - { - name: "nil oci fails", - args: args{ - kf: &kptfilev1.KptFile{ - Upstream: &kptfilev1.Upstream{ - Type: kptfilev1.OciOrigin, - }, - }, - }, - want: nil, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got, err := NewUpstream(tt.args.kf) - if (err != nil) != tt.wantErr { - t.Errorf("NewUpstream() error = %v, wantErr %v", err, tt.wantErr) - return - } - if !reflect.DeepEqual(got, tt.want) { - t.Errorf("NewUpstream() = %v, want %v", got, tt.want) - } - }) - } -} diff --git a/internal/util/update/common.go b/internal/util/update/common.go index eb0f0a266b..b77ad30c7f 100644 --- a/internal/util/update/common.go +++ b/internal/util/update/common.go @@ -40,7 +40,7 @@ func PkgHasUpdatedUpstream(local, origin string) (bool, error) { // If the upstream information in local has changed from origin, it // means the user had updated the package independently and we don't // want to override it. - if !reflect.DeepEqual(localKf.Upstream, originKf.Upstream) { + if !reflect.DeepEqual(localKf.Upstream.Git, originKf.Upstream.Git) { return true, nil } return false, nil diff --git a/internal/util/update/update.go b/internal/util/update/update.go index 72c047e03a..98e6b9b5ec 100644 --- a/internal/util/update/update.go +++ b/internal/util/update/update.go @@ -18,16 +18,20 @@ package update import ( "context" "fmt" + "io/ioutil" "os" + "path" "path/filepath" + "strings" "github.com/GoogleContainerTools/kpt/internal/errors" "github.com/GoogleContainerTools/kpt/internal/pkg" "github.com/GoogleContainerTools/kpt/internal/printer" "github.com/GoogleContainerTools/kpt/internal/types" "github.com/GoogleContainerTools/kpt/internal/util/addmergecomment" + "github.com/GoogleContainerTools/kpt/internal/util/fetch" + "github.com/GoogleContainerTools/kpt/internal/util/git" "github.com/GoogleContainerTools/kpt/internal/util/pkgutil" - "github.com/GoogleContainerTools/kpt/internal/util/remote" "github.com/GoogleContainerTools/kpt/internal/util/stack" kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1" "github.com/GoogleContainerTools/kpt/pkg/kptfile/kptfileutil" @@ -114,19 +118,13 @@ func (u Command) Run(ctx context.Context) error { return errors.E(op, u.Pkg.UniquePath, err) } - rootUps, err := remote.NewUpstream(rootKf) - if err != nil { - return errors.E(op, u.Pkg.UniquePath, fmt.Errorf("package must have an upstream reference: %v", err)) - } - - originalRootKfRef, err := rootUps.Ref() - if err != nil { - return errors.E(op, u.Pkg.UniquePath, err) + if rootKf.Upstream == nil || rootKf.Upstream.Git == nil { + return errors.E(op, u.Pkg.UniquePath, + fmt.Errorf("package must have an upstream reference")) } + originalRootKfRef := rootKf.Upstream.Git.Ref if u.Ref != "" { - if err := rootUps.SetRef(u.Ref); err != nil { - return errors.E(op, u.Pkg.UniquePath, err) - } + rootKf.Upstream.Git.Ref = u.Ref } if u.Strategy != "" { rootKf.Upstream.UpdateStrategy = u.Strategy @@ -161,14 +159,13 @@ func (u Command) Run(ctx context.Context) error { return errors.E(op, p.UniquePath, err) } - if subUps, err := remote.NewUpstream(subKf); err == nil { + if subKf.Upstream != nil && subKf.Upstream.Git != nil { // update subpackage kf ref/strategy if current pkg is a subpkg of root pkg or is root pkg // and if original root pkg ref matches the subpkg ref - if remote.ShouldUpdateSubPkgRef(subUps, rootUps, originalRootKfRef) { - if err := updateSubKf(subKf, subUps, u.Ref, u.Strategy); err != nil { - return errors.E(op, subPkg.UniquePath, err) - } - if err = kptfileutil.WriteFile(subPkg.UniquePath.String(), subKf); err != nil { + if shouldUpdateSubPkgRef(subKf, rootKf, originalRootKfRef) { + updateSubKf(subKf, u.Ref, u.Strategy) + err = kptfileutil.WriteFile(subPkg.UniquePath.String(), subKf) + if err != nil { return errors.E(op, subPkg.UniquePath, err) } } @@ -186,17 +183,55 @@ func (u Command) Run(ctx context.Context) error { } // updateSubKf updates subpackage with given ref and update strategy -func updateSubKf(subKf *kptfilev1.KptFile, subUps remote.Upstream, ref string, strategy kptfilev1.UpdateStrategyType) error { +func updateSubKf(subKf *kptfilev1.KptFile, ref string, strategy kptfilev1.UpdateStrategyType) { // check if explicit ref provided if ref != "" { - if err := subUps.SetRef(ref); err != nil { - return err - } + subKf.Upstream.Git.Ref = ref } if strategy != "" { subKf.Upstream.UpdateStrategy = strategy } - return nil +} + +// shouldUpdateSubPkgRef checks if subpkg ref should be updated. +// This is true if pkg has the same upstream repo, upstream directory is within or equal to root pkg directory and original root pkg ref matches the subpkg ref. +func shouldUpdateSubPkgRef(subKf, rootKf *kptfilev1.KptFile, originalRootKfRef string) bool { + return subKf.Upstream.Git.Repo == rootKf.Upstream.Git.Repo && + subKf.Upstream.Git.Ref == originalRootKfRef && + strings.HasPrefix(path.Clean(subKf.Upstream.Git.Directory), path.Clean(rootKf.Upstream.Git.Directory)) +} + +// repoClone is an interface that represents a clone of a repo on the local +// disk. +type repoClone interface { + AbsPath() string +} + +// newNilRepoClone creates a new nilRepoClone that implements the repoClone +// interface +func newNilRepoClone() (*nilRepoClone, error) { + const op errors.Op = "update.newNilRepoClone" + dir, err := ioutil.TempDir("", "kpt-empty-") + if err != nil { + return nil, errors.E(op, errors.IO, fmt.Errorf("errors creating a temporary directory: %w", err)) + } + return &nilRepoClone{ + dir: dir, + }, nil +} + +// nilRepoClone is an implementation of the repoClone interface, but that +// just represents an empty directory. This simplifies the logic for update +// since we don't have to special case situations where we don't have +// upstream and/or origin. +type nilRepoClone struct { + dir string +} + +// AbsPath returns the absolute path to the local directory for the repo. For +// the nilRepoClone, this will always be an empty directory. +func (nrc *nilRepoClone) AbsPath() string { + return nrc.dir } // updateRootPackage updates a local package. It will use the information @@ -212,36 +247,30 @@ func (u Command) updateRootPackage(ctx context.Context, p *pkg.Pkg) error { pr := printer.FromContextOrDie(ctx) pr.PrintPackage(p, !(p == u.Pkg)) - upstream, err := remote.NewUpstream(kf) - if err != nil { - return errors.E(op, p.UniquePath, err) - } - - updatedTmpPath, err := os.MkdirTemp("", "kpt-updated-") - if err != nil { + g := kf.Upstream.Git + updated := &git.RepoSpec{OrgRepo: g.Repo, Path: g.Directory, Ref: g.Ref} + pr.Printf("Fetching upstream from %s@%s\n", kf.Upstream.Git.Repo, kf.Upstream.Git.Ref) + if err := fetch.ClonerUsingGitExec(ctx, updated); err != nil { return errors.E(op, p.UniquePath, err) } - defer os.RemoveAll(updatedTmpPath) - - pr.Printf("Fetching upstream from %s\n", upstream.String()) - updatedAbsPath, commit, err := upstream.FetchUpstream(ctx, updatedTmpPath) - if err != nil { - return errors.E(op, p.UniquePath, err) - } - - originTmpPath, err := os.MkdirTemp("", "kpt-origin-") - if err != nil { - return errors.E(op, p.UniquePath, err) - } - defer os.RemoveAll(originTmpPath) - originAbsPath := originTmpPath + defer os.RemoveAll(updated.AbsPath()) + var origin repoClone if kf.UpstreamLock != nil { - pr.Printf("Fetching origin from %s\n", upstream.LockedString()) - if originAbsPath, err = upstream.FetchUpstreamLock(ctx, originTmpPath); err != nil { + gLock := kf.UpstreamLock.Git + originRepoSpec := &git.RepoSpec{OrgRepo: gLock.Repo, Path: gLock.Directory, Ref: gLock.Commit} + pr.Printf("Fetching origin from %s@%s\n", kf.Upstream.Git.Repo, kf.Upstream.Git.Ref) + if err := fetch.ClonerUsingGitExec(ctx, originRepoSpec); err != nil { + return errors.E(op, p.UniquePath, err) + } + origin = originRepoSpec + } else { + origin, err = newNilRepoClone() + if err != nil { return errors.E(op, p.UniquePath, err) } } + defer os.RemoveAll(origin.AbsPath()) s := stack.New() s.Push(".") @@ -249,8 +278,8 @@ func (u Command) updateRootPackage(ctx context.Context, p *pkg.Pkg) error { for s.Len() > 0 { relPath := s.Pop() localPath := filepath.Join(p.UniquePath.String(), relPath) - updatedPath := filepath.Join(updatedAbsPath, relPath) - originPath := filepath.Join(originAbsPath, relPath) + updatedPath := filepath.Join(updated.AbsPath(), relPath) + originPath := filepath.Join(origin.AbsPath(), relPath) isRoot := false if relPath == "." { @@ -271,7 +300,7 @@ func (u Command) updateRootPackage(ctx context.Context, p *pkg.Pkg) error { } } - if err := kptfileutil.UpdateUpstreamLock(p.UniquePath.String(), upstream.BuildUpstreamLock(commit)); err != nil { + if err := kptfileutil.UpdateUpstreamLockFromGit(p.UniquePath.String(), updated); err != nil { return errors.E(op, p.UniquePath, err) } return nil diff --git a/pkg/api/kptfile/v1/types.go b/pkg/api/kptfile/v1/types.go index 9981a84698..f4cd5db0a0 100644 --- a/pkg/api/kptfile/v1/types.go +++ b/pkg/api/kptfile/v1/types.go @@ -49,9 +49,6 @@ type KptFile struct { // UpstreamLock is a resolved locator for the last fetch of the package. UpstreamLock *UpstreamLock `yaml:"upstreamLock,omitempty" json:"upstreamLock,omitempty"` - // Origin is a resolved locator for the last pull or push of the package. - Origin *Origin `yaml:"origin,omitempty" json:"origin,omitempty"` - // Info contains metadata such as license, documentation, etc. Info *PackageInfo `yaml:"info,omitempty" json:"info,omitempty"` @@ -68,9 +65,6 @@ type OriginType string const ( // GitOrigin specifies a package as having been cloned from a git repository. GitOrigin OriginType = "git" - - // OciOrigin specifies a package as having been pulled from an OCI image repository. - OciOrigin OriginType = "oci" ) // UpdateStrategyType defines the strategy for updating a package from upstream. @@ -127,9 +121,6 @@ type Upstream struct { // Git is the locator for a package stored on Git. Git *Git `yaml:"git,omitempty" json:"git,omitempty"` - // Oci is the locator for a package stored in an OCI image registry. - Oci *Oci `yaml:"oci,omitempty" json:"oci,omitempty"` - // UpdateStrategy declares how a package will be updated from upstream. UpdateStrategy UpdateStrategyType `yaml:"updateStrategy,omitempty" json:"updateStrategy,omitempty"` } @@ -148,16 +139,6 @@ type Git struct { Ref string `yaml:"ref,omitempty" json:"ref,omitempty"` } -// Oci is the user-specified locator for a package in an OCI image registry. -type Oci struct { - // Image is the OCI image repository for the package. - // e.g. 'LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/app-frontend:latest' - Image string `yaml:"image,omitempty" json:"image,omitempty"` - - // Directory is the sub-package of the image. - Directory string `yaml:"path,omitempty" json:"path,omitempty"` -} - // UpstreamLock is a resolved locator for the last fetch of the package. type UpstreamLock struct { // Type is the type of origin. @@ -165,21 +146,6 @@ type UpstreamLock struct { // Git is the resolved locator for a package on Git. Git *GitLock `yaml:"git,omitempty" json:"git,omitempty"` - - // Oci is the resolved locator for a package in an OCI image registry. - Oci *OciLock `yaml:"oci,omitempty" json:"oci,omitempty"` -} - -// Origin is a resolved locator when the package was last pulled or pushed. -type Origin struct { - // Type is the type of origin. - Type OriginType `yaml:"type,omitempty" json:"type,omitempty"` - - // Git is the resolved locator for a package on Git. - Git *GitLock `yaml:"git,omitempty" json:"git,omitempty"` - - // Oci is the resolved locator for a package in an OCI image registry. - Oci *OciLock `yaml:"oci,omitempty" json:"oci,omitempty"` } // GitLock is the resolved locator for a package on Git. @@ -201,19 +167,6 @@ type GitLock struct { Commit string `yaml:"commit,omitempty" json:"commit,omitempty"` } -// OciLock is the resolved locator for a package in an OCI image registry. -type OciLock struct { - // Image is the OCI image repository for the package. - // e.g. 'LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/app-frontend@sha256:b0c94f11d856e59673daca566857a7ead126ef8e2b6915ed662804f858d7eaea' - Image string `yaml:"image,omitempty" json:"image,omitempty"` - - // Directory is the sub-package of the image. - Directory string `yaml:"path,omitempty" json:"path,omitempty"` - - // Digest is the unique sha of the image when it was last pulled. - Digest string `yaml:"digest,omitempty" json:"digest,omitempty"` -} - // PackageInfo contains optional information about the package such as license, documentation, etc. // These fields are not consumed by any functionality in kpt and are simply passed through. // Note that like any other KRM resource, humans and automation can also use `metadata.labels` and diff --git a/pkg/kptfile/kptfileutil/util.go b/pkg/kptfile/kptfileutil/util.go index 4f67cd4988..9aa5f25131 100644 --- a/pkg/kptfile/kptfileutil/util.go +++ b/pkg/kptfile/kptfileutil/util.go @@ -18,7 +18,6 @@ import ( "bytes" goerrors "errors" "fmt" - "io" "io/ioutil" "os" "path/filepath" @@ -53,20 +52,6 @@ func WriteFile(dir string, k *kptfilev1.KptFile) error { return nil } -func Write(dst io.Writer, k *kptfilev1.KptFile) error { - const op errors.Op = "kptfileutil.WriteFile" - b, err := yaml.MarshalWithOptions(k, &yaml.EncoderOptions{SeqIndent: yaml.WideSequenceStyle}) - if err != nil { - return err - } - - if _, err := dst.Write(b); err != nil { - return errors.E(op, errors.IO, err) - } - - return nil -} - // ValidateInventory returns true and a nil error if the passed inventory // is valid; otherwiste, false and the reason the inventory is not valid // is returned. A valid inventory must have a non-empty namespace, name, @@ -211,8 +196,12 @@ func UpdateKptfile(localPath, updatedPath, originPath string, updateUpstream boo return nil } -func UpdateUpstreamLock(path string, upstreamLock *kptfilev1.UpstreamLock) error { - const op errors.Op = "kptfileutil.UpdateUpstreamLock" +// UpdateUpstreamLockFromGit updates the upstreamLock of the package specified +// by path by using the values from spec. It will also populate the commit +// field in upstreamLock using the latest commit of the git repo given +// by spec. +func UpdateUpstreamLockFromGit(path string, spec *git.RepoSpec) error { + const op errors.Op = "kptfileutil.UpdateUpstreamLockFromGit" // read KptFile cloned with the package if it exists kptfile, err := pkg.ReadKptfile(filesys.FileSystemOrOnDisk{}, path) if err != nil { @@ -220,21 +209,7 @@ func UpdateUpstreamLock(path string, upstreamLock *kptfilev1.UpstreamLock) error } // populate the cloneFrom values so we know where the package came from - kptfile.UpstreamLock = upstreamLock - - err = WriteFile(path, kptfile) - if err != nil { - return errors.E(op, types.UniquePath(path), err) - } - return nil -} - -// UpdateUpstreamLockFromGit updates the upstreamLock of the package specified -// by path by using the values from spec. It will also populate the commit -// field in upstreamLock using the latest commit of the git repo given -// by spec. -func UpdateUpstreamLockFromGit(path string, spec *git.RepoSpec) error { - return UpdateUpstreamLock(path, &kptfilev1.UpstreamLock{ + kptfile.UpstreamLock = &kptfilev1.UpstreamLock{ Type: kptfilev1.GitOrigin, Git: &kptfilev1.GitLock{ Repo: spec.OrgRepo, @@ -242,7 +217,12 @@ func UpdateUpstreamLockFromGit(path string, spec *git.RepoSpec) error { Ref: spec.Ref, Commit: spec.Commit, }, - }) + } + err = WriteFile(path, kptfile) + if err != nil { + return errors.E(op, types.UniquePath(path), err) + } + return nil } // merge merges the Kptfiles from various sources and updates localKf with output diff --git a/porch/engine/pkg/kpt/pkgupdate.go b/porch/engine/pkg/kpt/pkgupdate.go index 9248f5b8f6..7f9408d3f9 100644 --- a/porch/engine/pkg/kpt/pkgupdate.go +++ b/porch/engine/pkg/kpt/pkgupdate.go @@ -23,8 +23,8 @@ import ( internalpkg "github.com/GoogleContainerTools/kpt/internal/pkg" "github.com/GoogleContainerTools/kpt/internal/printer" + "github.com/GoogleContainerTools/kpt/internal/util/fetch" "github.com/GoogleContainerTools/kpt/internal/util/git" - "github.com/GoogleContainerTools/kpt/internal/util/remote" "github.com/GoogleContainerTools/kpt/internal/util/update" kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1" "github.com/GoogleContainerTools/kpt/pkg/kptfile/kptfileutil" @@ -86,7 +86,7 @@ func PkgUpdate(ctx context.Context, ref string, packageDir string, opts PkgUpdat // return errors.E(op, p.UniquePath, err) // } updated := *upstream - if err := remote.ClonerUsingGitExec(ctx, &updated); err != nil { + if err := fetch.ClonerUsingGitExec(ctx, &updated); err != nil { return err } defer os.RemoveAll(updated.AbsPath()) @@ -102,7 +102,7 @@ func PkgUpdate(ctx context.Context, ref string, packageDir string, opts PkgUpdat // if err := fetch.ClonerUsingGitExec(ctx, originRepoSpec); err != nil { // return errors.E(op, p.UniquePath, err) // } - if err := remote.ClonerUsingGitExec(ctx, originRepoSpec); err != nil { + if err := fetch.ClonerUsingGitExec(ctx, originRepoSpec); err != nil { return err //errors.E(op, p.UniquePath, err) } originDir = originRepoSpec.AbsPath() diff --git a/site/reference/cli/pkg/get/README.md b/site/reference/cli/pkg/get/README.md index 2fba974125..6288bae159 100644 --- a/site/reference/cli/pkg/get/README.md +++ b/site/reference/cli/pkg/get/README.md @@ -18,7 +18,7 @@ local directory. ``` -kpt pkg get {REPO_URI[.git]/PKG_PATH[@VERSION]|IMAGE:TAG} [LOCAL_DEST_DIRECTORY] [flags] +kpt pkg get REPO_URI[.git]/PKG_PATH[@VERSION] [LOCAL_DEST_DIRECTORY] [flags] ``` #### Args @@ -42,13 +42,6 @@ VERSION: A git tag, branch, ref or commit for the remote version of the package to fetch. Defaults to the default branch of the repository. -IMAGE: - Reference to an OCI image containing a package in the root directory. - -TAG: - An image tag or @sha256 digest for the remote version of the image - to fetch. Defaults to the 'latest' tag on the image. - LOCAL_DEST_DIRECTORY: The local directory to write the package to. Defaults to a subdirectory of the current working directory named after the upstream package. diff --git a/site/reference/cli/pkg/pull/README.md b/site/reference/cli/pkg/pull/README.md deleted file mode 100644 index c8b23f92f2..0000000000 --- a/site/reference/cli/pkg/pull/README.md +++ /dev/null @@ -1,126 +0,0 @@ ---- -title: "`pull`" -linkTitle: "pull" -type: docs -description: > - TODO(oci-support) rewrite: Fetch a package from a git repo. ---- - - - -TODO(oci-support) rewrite: `get` fetches a remote package from a git subdirectory and writes it to a new -local directory. - -### Synopsis - - - -``` -kpt pkg get {REPO_URI[.git]/PKG_PATH[@VERSION]|IMAGE:TAG} [LOCAL_DEST_DIRECTORY] [flags] -``` - -#### Args - -``` -REPO_URI: - URI of a git repository containing 1 or more packages as subdirectories. - In most cases the .git suffix should be specified to delimit the REPO_URI - from the PKG_PATH, but this is not required for widely recognized repo - prefixes. If get cannot parse the repo for the directory and version, - then it will print an error asking for '.git' to be specified as part of - the argument. - -PKG_PATH: - Path to remote subdirectory containing Kubernetes resource configuration - files or directories. Defaults to the root directory. - Uses '/' as the path separator (regardless of OS). - e.g. staging/cockroachdb - -VERSION: - A git tag, branch, ref or commit for the remote version of the package - to fetch. Defaults to the default branch of the repository. - -IMAGE: - Reference to an OCI image containing a package in the root directory. - -TAG: - An image tag or @sha256 digest for the remote version of the image - to fetch. Defaults to the 'latest' tag on the image. - -LOCAL_DEST_DIRECTORY: - The local directory to write the package to. Defaults to a subdirectory of the - current working directory named after the upstream package. -``` - -#### Flags - -``` ---strategy: - Defines which strategy should be used to update the package. It defaults to - 'resource-merge'. - - * resource-merge: Perform a structural comparison of the original / - updated resources, and merge the changes into the local package. - * fast-forward: Fail without updating if the local package was modified - since it was fetched. - * force-delete-replace: Wipe all the local changes to the package and replace - it with the remote version. -``` - -#### Env Vars - -``` -KPT_CACHE_DIR: - Controls where to cache remote packages when fetching them. - Defaults to /.kpt/repos/ - On macOS and Linux is determined by the $HOME env variable, while on - Windows it is given by the %USERPROFILE% env variable. -``` - - - -### Examples - -{{% hide %}} - - - -``` -# Set up workspace for the test. -TEST_HOME=$(mktemp -d) -cd $TEST_HOME -``` - -{{% /hide %}} - - - - - -```shell -# Fetch package cockroachdb from github.com/kubernetes/examples/staging/cockroachdb -# This creates a new subdirectory 'cockroachdb' for the downloaded package. -$ kpt pkg get https://github.com/kubernetes/examples.git/staging/cockroachdb@master -``` - - - -```shell -# Fetch package cockroachdb from github.com/kubernetes/examples/staging/cockroachdb -# This will create a new directory 'my-package' for the downloaded package if it -# doesn't already exist. -$ kpt pkg get https://github.com/kubernetes/examples.git/staging/cockroachdb@master ./my-package/ -``` - - - -```shell -# Fetch package examples from github.com/kubernetes/examples at the specified -# git hash. -# This will create a new directory 'examples' for the package. -$ kpt pkg get https://github.com/kubernetes/examples.git/@6fe2792 -``` - - diff --git a/site/reference/cli/pkg/push/README.md b/site/reference/cli/pkg/push/README.md deleted file mode 100644 index af8489639d..0000000000 --- a/site/reference/cli/pkg/push/README.md +++ /dev/null @@ -1,126 +0,0 @@ ---- -title: "`push`" -linkTitle: "push" -type: docs -description: > - TODO(oci-support) rewrite: Fetch a package from a git repo. ---- - - - -TODO(oci-support) rewrite: `get` fetches a remote package from a git subdirectory and writes it to a new -local directory. - -### Synopsis - - -TODO(oci-support) rewrite: -``` -kpt pkg get {REPO_URI[.git]/PKG_PATH[@VERSION]|IMAGE:TAG} [LOCAL_DEST_DIRECTORY] [flags] -``` - -#### Args - -``` -REPO_URI: - URI of a git repository containing 1 or more packages as subdirectories. - In most cases the .git suffix should be specified to delimit the REPO_URI - from the PKG_PATH, but this is not required for widely recognized repo - prefixes. If get cannot parse the repo for the directory and version, - then it will print an error asking for '.git' to be specified as part of - the argument. - -PKG_PATH: - Path to remote subdirectory containing Kubernetes resource configuration - files or directories. Defaults to the root directory. - Uses '/' as the path separator (regardless of OS). - e.g. staging/cockroachdb - -VERSION: - A git tag, branch, ref or commit for the remote version of the package - to fetch. Defaults to the default branch of the repository. - -IMAGE: - Reference to an OCI image containing a package in the root directory. - -TAG: - An image tag or @sha256 digest for the remote version of the image - to fetch. Defaults to the 'latest' tag on the image. - -LOCAL_DEST_DIRECTORY: - The local directory to write the package to. Defaults to a subdirectory of the - current working directory named after the upstream package. -``` - -#### Flags - -``` ---strategy: - Defines which strategy should be used to update the package. It defaults to - 'resource-merge'. - - * resource-merge: Perform a structural comparison of the original / - updated resources, and merge the changes into the local package. - * fast-forward: Fail without updating if the local package was modified - since it was fetched. - * force-delete-replace: Wipe all the local changes to the package and replace - it with the remote version. -``` - -#### Env Vars - -``` -KPT_CACHE_DIR: - Controls where to cache remote packages when fetching them. - Defaults to /.kpt/repos/ - On macOS and Linux is determined by the $HOME env variable, while on - Windows it is given by the %USERPROFILE% env variable. -``` - - - -### Examples - -{{% hide %}} - - - -``` -# Set up workspace for the test. -TEST_HOME=$(mktemp -d) -cd $TEST_HOME -``` - -{{% /hide %}} - - - - - -```shell -# Fetch package cockroachdb from github.com/kubernetes/examples/staging/cockroachdb -# This creates a new subdirectory 'cockroachdb' for the downloaded package. -$ kpt pkg get https://github.com/kubernetes/examples.git/staging/cockroachdb@master -``` - - - -```shell -# Fetch package cockroachdb from github.com/kubernetes/examples/staging/cockroachdb -# This will create a new directory 'my-package' for the downloaded package if it -# doesn't already exist. -$ kpt pkg get https://github.com/kubernetes/examples.git/staging/cockroachdb@master ./my-package/ -``` - - - -```shell -# Fetch package examples from github.com/kubernetes/examples at the specified -# git hash. -# This will create a new directory 'examples' for the package. -$ kpt pkg get https://github.com/kubernetes/examples.git/@6fe2792 -``` - - diff --git a/site/reference/schema/kptfile/kptfile.json b/site/reference/schema/kptfile/kptfile.json index 4afdab4a56..1eea9f4613 100644 --- a/site/reference/schema/kptfile/kptfile.json +++ b/site/reference/schema/kptfile/kptfile.json @@ -180,61 +180,6 @@ }, "x-go-package": "sigs.k8s.io/kustomize/kyaml/yaml" }, - "Oci": { - "type": "object", - "title": "Oci is the user-specified locator for a package in an OCI image registry.", - "properties": { - "image": { - "description": "Image is the OCI image repository for the package.\ne.g. 'LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/app-frontend:latest'", - "type": "string", - "x-go-name": "Image" - }, - "path": { - "description": "Directory is the sub-package of the image.", - "type": "string", - "x-go-name": "Directory" - } - }, - "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1" - }, - "OciLock": { - "type": "object", - "title": "OciLock is the resolved locator for a package in an OCI image registry.", - "properties": { - "digest": { - "description": "Digest is the unique sha of the image when it was last pulled.", - "type": "string", - "x-go-name": "Digest" - }, - "image": { - "description": "Image is the OCI image repository for the package.\ne.g. 'LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/app-frontend@sha256:b0c94f11d856e59673daca566857a7ead126ef8e2b6915ed662804f858d7eaea'", - "type": "string", - "x-go-name": "Image" - }, - "path": { - "description": "Directory is the sub-package of the image.", - "type": "string", - "x-go-name": "Directory" - } - }, - "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1" - }, - "Origin": { - "type": "object", - "title": "Origin is a resolved locator when the package was last pulled or pushed.", - "properties": { - "git": { - "$ref": "#/definitions/GitLock" - }, - "oci": { - "$ref": "#/definitions/OciLock" - }, - "type": { - "$ref": "#/definitions/OriginType" - } - }, - "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1" - }, "OriginType": { "type": "string", "title": "OriginType defines the type of origin for a package.", @@ -411,9 +356,6 @@ "git": { "$ref": "#/definitions/Git" }, - "oci": { - "$ref": "#/definitions/Oci" - }, "type": { "$ref": "#/definitions/OriginType" }, @@ -430,9 +372,6 @@ "git": { "$ref": "#/definitions/GitLock" }, - "oci": { - "$ref": "#/definitions/OciLock" - }, "type": { "$ref": "#/definitions/OriginType" } @@ -485,9 +424,6 @@ "type": "string", "x-go-name": "Namespace" }, - "origin": { - "$ref": "#/definitions/Origin" - }, "pipeline": { "$ref": "#/definitions/Pipeline" }, diff --git a/site/reference/schema/kptfile/kptfile.yaml b/site/reference/schema/kptfile/kptfile.yaml index 9d18993367..3c1dd48b8a 100644 --- a/site/reference/schema/kptfile/kptfile.yaml +++ b/site/reference/schema/kptfile/kptfile.yaml @@ -159,51 +159,6 @@ definitions: x-go-name: Namespace type: object x-go-package: sigs.k8s.io/kustomize/kyaml/yaml - Oci: - properties: - image: - description: |- - Image is the OCI image repository for the package. - e.g. 'LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/app-frontend:latest' - type: string - x-go-name: Image - path: - description: Directory is the sub-package of the image. - type: string - x-go-name: Directory - title: Oci is the user-specified locator for a package in an OCI image registry. - type: object - x-go-package: github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1 - OciLock: - properties: - digest: - description: Digest is the unique sha of the image when it was last pulled. - type: string - x-go-name: Digest - image: - description: |- - Image is the OCI image repository for the package. - e.g. 'LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/app-frontend@sha256:b0c94f11d856e59673daca566857a7ead126ef8e2b6915ed662804f858d7eaea' - type: string - x-go-name: Image - path: - description: Directory is the sub-package of the image. - type: string - x-go-name: Directory - title: OciLock is the resolved locator for a package in an OCI image registry. - type: object - x-go-package: github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1 - Origin: - properties: - git: - $ref: '#/definitions/GitLock' - oci: - $ref: '#/definitions/OciLock' - type: - $ref: '#/definitions/OriginType' - title: Origin is a resolved locator when the package was last pulled or pushed. - type: object - x-go-package: github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1 OriginType: title: OriginType defines the type of origin for a package. type: string @@ -348,8 +303,6 @@ definitions: properties: git: $ref: '#/definitions/Git' - oci: - $ref: '#/definitions/Oci' type: $ref: '#/definitions/OriginType' updateStrategy: @@ -361,8 +314,6 @@ definitions: properties: git: $ref: '#/definitions/GitLock' - oci: - $ref: '#/definitions/OciLock' type: $ref: '#/definitions/OriginType' title: UpstreamLock is a resolved locator for the last fetch of the package. @@ -402,8 +353,6 @@ definitions: description: Namespace is the metadata.namespace field of a Resource type: string x-go-name: Namespace - origin: - $ref: '#/definitions/Origin' pipeline: $ref: '#/definitions/Pipeline' upstream: diff --git a/site/sidebar.md b/site/sidebar.md index ab783df6f9..6e1b48f028 100644 --- a/site/sidebar.md +++ b/site/sidebar.md @@ -17,7 +17,6 @@ - [3.6 Creating a Package](book/03-packages/06-creating-a-package.md) - [3.7 Composing a Package](book/03-packages/07-composing-a-package.md) - [3.8 Publishing a Package](book/03-packages/08-publishing-a-package.md) - - TODO(oci-support) Add to existing sections. Introduce new section specifically for Artifact Registry. - [4 Using Functions](book/04-using-functions/) - [4.1 Declarative Function Execution](book/04-using-functions/01-declarative-function-execution.md) - [4.2 Imperative Function Execution](book/04-using-functions/02-imperative-function-execution.md) @@ -47,8 +46,6 @@ - [init](reference/cli/pkg/init/) - [tree](reference/cli/pkg/tree/) - [update](reference/cli/pkg/update/) - - [pull](reference/cli/pkg/pull/) - - [push](reference/cli/pkg/push/) - [fn](reference/cli/fn/) - [render](reference/cli/fn/render/) - [eval](reference/cli/fn/eval/) diff --git a/thirdparty/cli-utils/status/cmdstatus.go b/thirdparty/cli-utils/status/cmdstatus.go index 029ac5e63f..5cfed61ddf 100644 --- a/thirdparty/cli-utils/status/cmdstatus.go +++ b/thirdparty/cli-utils/status/cmdstatus.go @@ -14,6 +14,7 @@ import ( "github.com/GoogleContainerTools/kpt/internal/util/argutil" "github.com/GoogleContainerTools/kpt/internal/util/strings" "github.com/GoogleContainerTools/kpt/pkg/live" + "github.com/GoogleContainerTools/kpt/pkg/status" statusprinters "github.com/GoogleContainerTools/kpt/thirdparty/cli-utils/status/printers" "github.com/go-errors/errors" "github.com/spf13/cobra" @@ -26,7 +27,6 @@ import ( "sigs.k8s.io/cli-utils/pkg/kstatus/polling" "sigs.k8s.io/cli-utils/pkg/kstatus/polling/aggregator" "sigs.k8s.io/cli-utils/pkg/kstatus/polling/collector" - "sigs.k8s.io/cli-utils/pkg/kstatus/polling/engine" "sigs.k8s.io/cli-utils/pkg/kstatus/polling/event" kstatus "sigs.k8s.io/cli-utils/pkg/kstatus/status" "sigs.k8s.io/cli-utils/pkg/printers" @@ -235,7 +235,7 @@ func allKnownNotifierFunc(cancelFunc context.CancelFunc) collector.ObserverFunc } func pollerFactoryFunc(f util.Factory) (poller.Poller, error) { - return polling.NewStatusPollerFromFactory(f, []engine.StatusReader{}) + return status.NewStatusPoller(f) } func invClient(f util.Factory) (inventory.InventoryClient, error) {