diff --git a/go.mod b/go.mod index e34d627f..1c4cb56a 100644 --- a/go.mod +++ b/go.mod @@ -8,15 +8,14 @@ require ( gomodules.xyz/flags v0.1.3 gomodules.xyz/go-sh v0.1.0 gomodules.xyz/logs v0.0.6 - gomodules.xyz/x v0.0.10 - k8s.io/api v0.21.1 + gomodules.xyz/x v0.0.13 k8s.io/apimachinery v0.21.1 k8s.io/client-go v0.21.1 k8s.io/klog/v2 v2.9.0 - kmodules.xyz/client-go v0.0.0-20220203031013-1de48437aaf3 - kmodules.xyz/custom-resources v0.0.0-20220208103158-61b298634e43 - kmodules.xyz/offshoot-api v0.0.0-20211207130839-cc7187e020cf - stash.appscode.dev/apimachinery v0.18.1-0.20220316053843-5bd9e9bde0fd + kmodules.xyz/client-go v0.0.0-20220308080632-2543b61b64fd + kmodules.xyz/custom-resources v0.0.0-20220317043135-5c76c52c975d + kmodules.xyz/offshoot-api v0.0.0-20220317044008-01567138fc2f + stash.appscode.dev/apimachinery v0.18.1-0.20220321055929-ee132c17707b ) replace bitbucket.org/ww/goautoneg => gomodules.xyz/goautoneg v0.0.0-20120707110453-a547fc61f48d diff --git a/go.sum b/go.sum index d04833e3..833604cc 100644 --- a/go.sum +++ b/go.sum @@ -361,8 +361,9 @@ github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCV github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/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 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= @@ -456,8 +457,9 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mohae/deepcopy v0.0.0-20170603005431-491d3605edfb/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= 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= @@ -662,7 +664,6 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec 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.bytebuilders.dev/license-verifier v0.9.3/go.mod h1:GpIW0o8O0wpiBVt7IIz4z7bcPuG8nza8/bCDkaupDn8= go.bytebuilders.dev/license-verifier v0.9.7 h1:m7Z3cuVJYUUctCfTK6qT0IKtPVZurxq1b1bKzWjqwsE= go.bytebuilders.dev/license-verifier v0.9.7/go.mod h1:GpIW0o8O0wpiBVt7IIz4z7bcPuG8nza8/bCDkaupDn8= go.bytebuilders.dev/license-verifier/kubernetes v0.9.7 h1:TN9N9FmmxrPTQoAPJsQnHRgY00liNZgiTUyZ2QNtqyg= @@ -945,7 +946,6 @@ gomodules.xyz/pointer v0.1.0 h1:sG2UKrYVSo6E3r4itAjXfPfe4fuXMi0KdyTHpR3vGCg= gomodules.xyz/pointer v0.1.0/go.mod h1:sPLsC0+yLTRecUiC5yVlyvXhZ6LAGojNCRWNNqoplvo= gomodules.xyz/runtime v0.2.0/go.mod h1:/R/Dw906YIUHKJ5cfKUaJgJrojFjpRU+n0s3Wjn1tqs= gomodules.xyz/sets v0.0.0-20200930152147-4f4543544799/go.mod h1:jKgNp01/iDs+svOWXaPk5cKP3VXy0mWUoTF/ore+aMc= -gomodules.xyz/sets v0.1.0/go.mod h1:jKgNp01/iDs+svOWXaPk5cKP3VXy0mWUoTF/ore+aMc= gomodules.xyz/sets v0.2.0/go.mod h1:jKgNp01/iDs+svOWXaPk5cKP3VXy0mWUoTF/ore+aMc= gomodules.xyz/sets v0.2.1 h1:vK3oUWoGVrZKLDKO/bzEo/ucHFdCE7+DxWPeWxK72KQ= gomodules.xyz/sets v0.2.1/go.mod h1:jKgNp01/iDs+svOWXaPk5cKP3VXy0mWUoTF/ore+aMc= @@ -953,10 +953,10 @@ gomodules.xyz/stow v0.2.4/go.mod h1:aAgUEHyZ+4nKznyVupMMkP0JX9MXW1ZRrbRGaclp3E0= gomodules.xyz/wait v0.2.0 h1:HnRIh+cvIrrKIFaXoYznCVVirv2/2xu3KzjSzsQmYAY= gomodules.xyz/wait v0.2.0/go.mod h1:g/epKzZQuCqgvhzhaoG4cSBNGHqnOrhFR4Q7szDJ1JM= gomodules.xyz/x v0.0.5/go.mod h1:EGy7cB7ifSuOcbNFc0U1zUPTf5yY8RtXVJlAlhGS9OE= -gomodules.xyz/x v0.0.7/go.mod h1:CMXe28rpApV30pPw9cxdyEmvoC+aa5LiAqzks9dlxag= gomodules.xyz/x v0.0.8/go.mod h1:YnL5CAnLrEtAV/NQGn5sKJe6u08/vDlRyJddXIuD9mc= -gomodules.xyz/x v0.0.10 h1:b78HYvlXlqOVb8OZEy2uZeN/bp78nH42qIFnLQVR6O0= gomodules.xyz/x v0.0.10/go.mod h1:AgHPywNbRKtogAdk08vCqsfwjtXtXX1/FUPyG7OWdOs= +gomodules.xyz/x v0.0.13 h1:k4ABA8dVGUTxqiNYOHPAs5sZbmgLxYcL9WuBT/kDOiM= +gomodules.xyz/x v0.0.13/go.mod h1:AgHPywNbRKtogAdk08vCqsfwjtXtXX1/FUPyG7OWdOs= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0= gonum.org/v1/gonum v0.6.2/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= @@ -1067,23 +1067,23 @@ k8s.io/system-validators v1.4.0/go.mod h1:bPldcLgkIUK22ALflnsXk8pvkTEndYdNuaHH6g k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= kmodules.xyz/client-go v0.0.0-20210617233340-13d22e91512b/go.mod h1:A6GAK6xP5zBuWK6A/vUkkjKzcuywkms7fIxRf5wblO4= -kmodules.xyz/client-go v0.0.0-20211013093146-1fbfd52e78c9/go.mod h1:0gkPeALtYjB27OHt4rd6+ZmMgoVTHVLtEJQeU23/gtA= kmodules.xyz/client-go v0.0.0-20211107190155-5bb4090d2728/go.mod h1:ENUu8pPK19xzBkVpAJHoGCI2QRvb1SqffWRt0K2sV5I= -kmodules.xyz/client-go v0.0.0-20220104114408-2a3a05dbe89f/go.mod h1:xxl1ve1Obe4xaW+XjXsNHyLTni4QPIvHn9TfnYEoQRo= -kmodules.xyz/client-go v0.0.0-20220203031013-1de48437aaf3 h1:CWux6RrrTkplf9F0ChJwkEEQuOorbc5rzmqC7uJUUZU= -kmodules.xyz/client-go v0.0.0-20220203031013-1de48437aaf3/go.mod h1:aOwnhdxO0uh54ds1wQYRlKVtYlzLyakaesmMQeupVek= +kmodules.xyz/client-go v0.0.0-20220215012708-9963581d69a7/go.mod h1:sOq5P3AkZdv6D/skvUPwEG15NDYy5olwBllH/JXfhGI= +kmodules.xyz/client-go v0.0.0-20220308080632-2543b61b64fd h1:9sOSO9moUpqn2CKeXh+GYP8ol1nU5IsLHJvZtNIzKz0= +kmodules.xyz/client-go v0.0.0-20220308080632-2543b61b64fd/go.mod h1:hu7eGess/SEbiss671Y062QBc8O45Qh0IGv19/0kPXM= kmodules.xyz/constants v0.0.0-20210218100002-2c304bfda278/go.mod h1:DbiFk1bJ1KEO94t1SlAn7tzc+Zz95rSXgyUKa2nzPmY= kmodules.xyz/crd-schema-fuzz v0.0.0-20210618002152-fae23aef5fb4/go.mod h1:IIkUctlfoptoci0BOrsUf8ya+MOG5uaeh1PE4uzaIbA= -kmodules.xyz/custom-resources v0.0.0-20220208103158-61b298634e43 h1:mwW2DgP7sAMambZe7Met/e9nrBYnzYgM/lupbm7jgGM= -kmodules.xyz/custom-resources v0.0.0-20220208103158-61b298634e43/go.mod h1:/XjDeILFV2wBota5kHo21DMvOt08nSAk1vm6buCuwt4= -kmodules.xyz/objectstore-api v0.0.0-20211207131029-3271069de43e h1:hbnb7Zy6pe0IwWWdIVbgfzBLM3kmppUMDpf7Sxy11d8= -kmodules.xyz/objectstore-api v0.0.0-20211207131029-3271069de43e/go.mod h1:IICnDdPFOEeGXdaPVHOGYfdwD1cyh/p1I/TWMkyNTIE= +kmodules.xyz/crd-schema-fuzz v0.0.0-20211025154117-6edb24ef11bc/go.mod h1:yLOBJKasPhnCodKSZGFZ6OGFFrp0tq3ALS9rDnYFjkg= +kmodules.xyz/custom-resources v0.0.0-20220317043135-5c76c52c975d h1:YMi4geEI+RROtXKjLp6f05G7KM0ancZSy69vZwe5fZ8= +kmodules.xyz/custom-resources v0.0.0-20220317043135-5c76c52c975d/go.mod h1:cDD2gsimPPj+Uu/6pzzw/wXjxLZyA0B/eM+UA3wWE9A= +kmodules.xyz/objectstore-api v0.0.0-20220317043839-8f754cdffcf0 h1:SznGzgK5Xu34cpdr24iJaW4AzZHZeMJLHV41AkfDmmA= +kmodules.xyz/objectstore-api v0.0.0-20220317043839-8f754cdffcf0/go.mod h1:xbaGWFbesdDp4I/k/w9+Xv8c7aiCzKlgVjmemxxXOgw= kmodules.xyz/offshoot-api v0.0.0-20210829122105-6f4d481b0c61/go.mod h1:3LECbAL3FgbyK80NP3V3Pmiuo/a3hFWg/PR6SPFhTns= -kmodules.xyz/offshoot-api v0.0.0-20211207130839-cc7187e020cf h1:cVaxFPsZyaymGsx4XoTii1MEvtwGxmLg75qwMxNHB4w= -kmodules.xyz/offshoot-api v0.0.0-20211207130839-cc7187e020cf/go.mod h1:sJYyxf84ZvbVz4SivxMgSelGRYn19wOLUtObiEncCxk= -kmodules.xyz/prober v0.0.0-20210618020259-5836fb959027 h1:rtSPsruEkoBOLcbJkxMQjnPafpv8/vJnfWlTIj9yRBg= -kmodules.xyz/prober v0.0.0-20210618020259-5836fb959027/go.mod h1:H4NcvS1RQxeXtQONALbU6r9OT3Xa7cMhfamX/k9t9wo= -kmodules.xyz/resource-metrics v0.0.6/go.mod h1:M7rWuo2qh3BpHhogiEVPnvGY9Xx4Pfygqn1Rex8YbgM= +kmodules.xyz/offshoot-api v0.0.0-20220317044008-01567138fc2f h1:AD6ptk7qRZ8N6DY4Y2lCnqvfu3X/20YdQArTxN5g3sA= +kmodules.xyz/offshoot-api v0.0.0-20220317044008-01567138fc2f/go.mod h1:MhgruKArKzAxhZsBc8ZToiD/vzdtWYrnTu5hSkkYGfk= +kmodules.xyz/prober v0.0.0-20220317043828-5ae0114adcad h1:bMfimFOEgmaKCN/gnSxLIRvQbWg4dqBgcWrMnHWQgyc= +kmodules.xyz/prober v0.0.0-20220317043828-5ae0114adcad/go.mod h1:QC3O1p+sU/8NnpLKI0VCAO3IQwPlwuimf9l6+Qp3Vt8= +kmodules.xyz/resource-metrics v0.0.8/go.mod h1:M7rWuo2qh3BpHhogiEVPnvGY9Xx4Pfygqn1Rex8YbgM= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= @@ -1108,5 +1108,5 @@ sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= -stash.appscode.dev/apimachinery v0.18.1-0.20220316053843-5bd9e9bde0fd h1:pdQh2qRksCdHQ+RsaGmwYkkbcxkltHJuNMUkrP7HHnI= -stash.appscode.dev/apimachinery v0.18.1-0.20220316053843-5bd9e9bde0fd/go.mod h1:R+AE9wyi0sPZ0t3HWwZq+FiA7ewoGbqsdW6atczGf94= +stash.appscode.dev/apimachinery v0.18.1-0.20220321055929-ee132c17707b h1:NzNCh1LNlEAK1gdCNcRUY17s6f0oMfuFJ0JNP0SbLE4= +stash.appscode.dev/apimachinery v0.18.1-0.20220321055929-ee132c17707b/go.mod h1:f2VcuZ6mMvRaSVLavWxi9HDp3LNusFKmmaAqfY7H7d8= diff --git a/pkg/backup.go b/pkg/backup.go index 4d204a7e..c5f84bad 100644 --- a/pkg/backup.go +++ b/pkg/backup.go @@ -18,16 +18,15 @@ package pkg import ( "context" - v1 "kmodules.xyz/offshoot-api/api/v1" "path/filepath" - "stash.appscode.dev/apimachinery/pkg/invoker" - "stash.appscode.dev/elasticsearch/pkg/manifests" "time" - api_v1beta1 "stash.appscode.dev/apimachinery/apis/stash/v1beta1" + "stash.appscode.dev/apimachinery/apis/stash/v1beta1" stash "stash.appscode.dev/apimachinery/client/clientset/versioned" + "stash.appscode.dev/apimachinery/pkg/invoker" "stash.appscode.dev/apimachinery/pkg/restic" api_util "stash.appscode.dev/apimachinery/pkg/util" + "stash.appscode.dev/elasticsearch/pkg/manager" "github.com/spf13/cobra" license "go.bytebuilders.dev/license-verifier/kubernetes" @@ -37,7 +36,7 @@ import ( "k8s.io/client-go/tools/clientcmd" "k8s.io/klog/v2" appcatalog_cs "kmodules.xyz/custom-resources/client/clientset/versioned" - "stash.appscode.dev/apimachinery/apis/stash/v1beta1" + v1 "kmodules.xyz/offshoot-api/api/v1" ) func NewCmdBackup() *cobra.Command { @@ -99,12 +98,12 @@ func NewCmdBackup() *cobra.Command { backupOutput, err = opt.backupManifests(ti.Target.Ref) if err != nil { backupOutput = &restic.BackupOutput{ - BackupTargetStatus: api_v1beta1.BackupTargetStatus{ + BackupTargetStatus: v1beta1.BackupTargetStatus{ Ref: ti.Target.Ref, - Stats: []api_v1beta1.HostBackupStats{ + Stats: []v1beta1.HostBackupStats{ { Hostname: opt.backupOptions.Host, - Phase: api_v1beta1.HostBackupFailed, + Phase: v1beta1.HostBackupFailed, Error: err.Error(), }, }, @@ -161,7 +160,7 @@ func NewCmdBackup() *cobra.Command { return cmd } -func (opt *options) backupManifests(targetRef api_v1beta1.TargetRef) (*restic.BackupOutput, error) { +func (opt *options) backupManifests(targetRef v1beta1.TargetRef) (*restic.BackupOutput, error) { var err error opt.setupOptions.StorageSecret, err = opt.kubeClient.CoreV1().Secrets(opt.storageSecret.Namespace).Get(context.TODO(), opt.storageSecret.Name, metav1.GetOptions{}) if err != nil { @@ -200,9 +199,10 @@ func (opt *options) backupManifests(targetRef api_v1beta1.TargetRef) (*restic.Ba return nil, err } - dumper := manifests.NewDumper() + mgOpts := manager.BackupOptions{} + mgr := manager.NewBackupManager(mgOpts) - err = dumper.Dump() + err = mgr.Dump() if err != nil { return nil, err } diff --git a/pkg/manager/application.go b/pkg/manager/application.go new file mode 100644 index 00000000..387cdf22 --- /dev/null +++ b/pkg/manager/application.go @@ -0,0 +1,15 @@ +package manager + +type applicationBackupManager struct { + BackupOptions +} + +func newApplicationBackupManager(opt BackupOptions) BackupManager { + return applicationBackupManager{ + BackupOptions: opt, + } +} + +func (opt applicationBackupManager) Dump() error { + return nil +} diff --git a/pkg/manager/cluster.go b/pkg/manager/cluster.go new file mode 100644 index 00000000..5f8ba9d4 --- /dev/null +++ b/pkg/manager/cluster.go @@ -0,0 +1,154 @@ +package manager + +import ( + "context" + "path/filepath" + "strings" + + "stash.appscode.dev/elasticsearch/pkg/manager/sanitizers" + + core "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/client-go/discovery" + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" + "k8s.io/klog/v2" + "kmodules.xyz/client-go/tools/backup" + "sigs.k8s.io/yaml" +) + +type clusterBackupManager struct { + BackupOptions +} + +func newClusterBackupManager(opt BackupOptions) BackupManager { + return clusterBackupManager{ + BackupOptions: opt, + } +} + +func (opt clusterBackupManager) Dump() error { + // backup cluster resources yaml into opt.backupDir + mgr := backup.NewBackupManager(opt.Ctx, opt.Config, opt.Sanitize) + + _, err := mgr.BackupToDir(opt.DataDir) + if err != nil { + return err + } + return nil +} + +type ItemList struct { + Items []map[string]interface{} `json:"items,omitempty"` +} + +type processorFunc func(relPath string, data []byte) error + +func (opt clusterBackupManager) Backup(process processorFunc) error { + // ref: https://github.com/kubernetes/ingress-nginx/blob/0dab51d9eb1e5a9ba3661f351114825ac8bfc1af/pkg/ingress/controller/launch.go#L252 + opt.Config.QPS = 1e6 + opt.Config.Burst = 1e6 + if err := rest.SetKubernetesDefaults(opt.Config); err != nil { + return err + } + opt.Config.NegotiatedSerializer = serializer.WithoutConversionCodecFactory{CodecFactory: scheme.Codecs} + if opt.Config.UserAgent == "" { + opt.Config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + disClient, err := discovery.NewDiscoveryClientForConfig(opt.Config) + if err != nil { + return err + } + resourceLists, err := disClient.ServerPreferredResources() + if err != nil { + return err + } + resourceListBytes, err := yaml.Marshal(resourceLists) + if err != nil { + return err + } + err = process("resource_lists.yaml", resourceListBytes) + if err != nil { + return err + } + + for _, list := range resourceLists { + gv, err := schema.ParseGroupVersion(list.GroupVersion) + if err != nil { + return err + } + for _, r := range list.APIResources { + if strings.ContainsRune(r.Name, '/') { + continue // skip subresource + } + if !sets.NewString(r.Verbs...).HasAll("list", "get") { + continue + } + + klog.V(3).Infof("Taking backup of %s apiVersion:%s kind:%s", list.GroupVersion, r.Name, r.Kind) + opt.Config.GroupVersion = &gv + opt.Config.APIPath = "/apis" + if gv.Group == core.GroupName { + opt.Config.APIPath = "/api" + } + client, err := rest.RESTClientFor(opt.Config) + if err != nil { + return err + } + request := client.Get().Resource(r.Name).Param("pretty", "true") + resp, err := request.DoRaw(context.TODO()) + if err != nil { + return err + } + items := &ItemList{} + err = yaml.Unmarshal(resp, &items) + if err != nil { + return err + } + for _, item := range items.Items { + var path string + item["apiVersion"] = list.GroupVersion + item["kind"] = r.Kind + + md, ok := item["metadata"] + if ok { + path = getPathFromSelfLink(md) + } + + if opt.Sanitize { + s := sanitizers.NewSanitizer(r) + item, err := s.Sanitize(item) + if err != nil { + return err + } + delete(item, "status") + } + data, err := yaml.Marshal(item) + if err != nil { + return err + } + absPath := filepath.Join(opt.DataDir, path) + err = opt.Storage.Write(absPath, data) + if err != nil { + return err + } + err = process(path, data) + if err != nil { + return err + } + } + } + } + return nil +} + +func getPathFromSelfLink(md interface{}) string { + meta, ok := md.(map[string]interface{}) + if ok { + return meta["selfLink"].(string) + ".yaml" + } + return "" +} diff --git a/pkg/manager/namespace.go b/pkg/manager/namespace.go new file mode 100644 index 00000000..cd3632c8 --- /dev/null +++ b/pkg/manager/namespace.go @@ -0,0 +1,15 @@ +package manager + +type namespaceBackupManager struct { + BackupOptions +} + +func newNamespaceBackupManager(opt BackupOptions) BackupManager { + return namespaceBackupManager{ + BackupOptions: opt, + } +} + +func (opt namespaceBackupManager) Dump() error { + return nil +} diff --git a/pkg/manager/options.go b/pkg/manager/options.go new file mode 100644 index 00000000..a15281fe --- /dev/null +++ b/pkg/manager/options.go @@ -0,0 +1,76 @@ +package manager + +import ( + "io/ioutil" + "os" + "path/filepath" + + "stash.appscode.dev/apimachinery/apis" + "stash.appscode.dev/apimachinery/apis/stash/v1beta1" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/rest" +) + +type BackupManager interface { + Dump() error +} + +type BackupOptions struct { + Ctx string + Config *rest.Config + Sanitize bool + DataDir string + Selector string + Target v1beta1.TargetRef + IncludeDependants bool + Storage DataWriter +} + +func NewBackupManager(opt BackupOptions) BackupManager { + switch opt.Target.Kind { + case v1beta1.TargetKindEmpty: + return newClusterBackupManager(opt) + case apis.KindNamespace: + return newNamespaceBackupManager(opt) + default: + return newApplicationBackupManager(opt) + } +} + +type ClusterBackupMeta struct { + metav1.TypeMeta `json:",inline"` + GlobalResources []ResourceGroup `json:"globalResources,omitempty"` + Namespaces []NamespacedResources `json:"namespaces,omitempty"` +} + +type ResourceGroup struct { + metav1.TypeMeta `json:",inline"` + Instances []string `json:"instances,omitempty"` +} + +type NamespacedResources struct { + Name string `json:"name,omitempty"` + Resources []ResourceGroup `json:"resources,omitempty"` +} + +type NamespaceBackupMeta struct { + metav1.TypeMeta `json:",inline"` + Name string `json:"name,omitempty"` + Resources []ResourceGroup `json:"resources,omitempty"` +} + +type DataWriter interface { + Write(string, []byte) error +} + +type FileWriter struct{} + +func (w *FileWriter) Write(path string, data []byte) error { + dir := filepath.Dir(path) + err := os.MkdirAll(dir, 0o777) + if err != nil { + return err + } + return ioutil.WriteFile(path, data, 0o644) +} diff --git a/pkg/manager/sanitizers/metadata.go b/pkg/manager/sanitizers/metadata.go new file mode 100644 index 00000000..2a403a0a --- /dev/null +++ b/pkg/manager/sanitizers/metadata.go @@ -0,0 +1,64 @@ +package sanitizers + +import "fmt" + +type metadataSanitizer struct{} + +func NewMetadataSanitizer() Sanitizer { + return metadataSanitizer{} +} + +func (s metadataSanitizer) Sanitize(in map[string]interface{}) (map[string]interface{}, error) { + meta, ok := in["metadata"].(map[string]interface{}) + if !ok { + return in, nil + } + + delete(meta, "creationTimestamp") + delete(meta, "resourceVersion") + delete(meta, "uid") + delete(meta, "generateName") + delete(meta, "generation") + + annotation, ok := meta["annotations"] + if ok { + annotations, ok := annotation.(map[string]string) + if !ok { + return nil, fmt.Errorf("failed to parse annotations") + } + cleanUpDecorators(annotations) + } + in["metadata"] = meta + return in, nil +} + +func cleanUpObjectMeta(md interface{}) { + meta, ok := md.(map[string]interface{}) + if !ok { + return + } + delete(meta, "creationTimestamp") + delete(meta, "resourceVersion") + delete(meta, "uid") + delete(meta, "generateName") + delete(meta, "generation") + annotation, ok := meta["annotations"] + if !ok { + return + } + annotations, ok := annotation.(map[string]string) + if !ok { + return + } + cleanUpDecorators(annotations) +} + +func cleanUpDecorators(m map[string]string) { + delete(m, "controller-uid") + delete(m, "deployment.kubernetes.io/desired-replicas") + delete(m, "deployment.kubernetes.io/max-replicas") + delete(m, "deployment.kubernetes.io/revision") + delete(m, "pod-template-hash") + delete(m, "pv.kubernetes.io/bind-completed") + delete(m, "pv.kubernetes.io/bound-by-controller") +} diff --git a/pkg/manager/sanitizers/pod.go b/pkg/manager/sanitizers/pod.go new file mode 100644 index 00000000..e2cac039 --- /dev/null +++ b/pkg/manager/sanitizers/pod.go @@ -0,0 +1,65 @@ +package sanitizers + +import ( + "fmt" + + core "k8s.io/api/core/v1" + "sigs.k8s.io/yaml" +) + +type podSanitizer struct{} + +func NewPodSanitizer() Sanitizer { + return podSanitizer{} +} + +func (s podSanitizer) Sanitize(in map[string]interface{}) (map[string]interface{}, error) { + ms := NewMetadataSanitizer() + in, err := ms.Sanitize(in) + if err != nil { + return nil, err + } + spec, ok := in["spec"].(map[string]interface{}) + if !ok { + return nil, fmt.Errorf("invalid pod spec") + } + spec, err = cleanUpPodSpec(spec) + if err != nil { + return nil, err + } + in["spec"] = spec + return in, nil +} + +func cleanUpPodSpec(in map[string]interface{}) (map[string]interface{}, error) { + b, err := yaml.Marshal(in) + if err != nil { + return nil, err + } + spec := &core.PodSpec{} + err = yaml.Unmarshal(b, spec) + if err != nil { + return in, nil // Not a podSpec + } + spec.DNSPolicy = core.DNSPolicy("") + spec.NodeName = "" + if spec.ServiceAccountName == "default" { + spec.ServiceAccountName = "" + } + spec.TerminationGracePeriodSeconds = nil + for i, c := range spec.Containers { + c.TerminationMessagePath = "" + spec.Containers[i] = c + } + for i, c := range spec.InitContainers { + c.TerminationMessagePath = "" + spec.InitContainers[i] = c + } + b, err = yaml.Marshal(spec) + if err != nil { + return nil, err + } + var out map[string]interface{} + err = yaml.Unmarshal(b, &out) + return out, err +} diff --git a/pkg/manager/sanitizers/sanitizer.go b/pkg/manager/sanitizers/sanitizer.go new file mode 100644 index 00000000..aab8582e --- /dev/null +++ b/pkg/manager/sanitizers/sanitizer.go @@ -0,0 +1,35 @@ +package sanitizers + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +type Sanitizer interface { + Sanitize(in map[string]interface{}) (map[string]interface{}, error) +} + +func NewSanitizer(r metav1.APIResource) Sanitizer { + switch r.Kind { + case "Pod": + return NewPodSanitizer() + case "StatefulSet", "Deployment", "ReplicaSet", "DaemonSet", "ReplicationController", "Job": + return NewWorkloadSanitizer() + default: + return NewDefaultSanitizer() + } +} + +type defaultSanitizer struct{} + +func NewDefaultSanitizer() Sanitizer { + return defaultSanitizer{} +} + +func (s defaultSanitizer) Sanitize(in map[string]interface{}) (map[string]interface{}, error) { + ms := NewMetadataSanitizer() + in, err := ms.Sanitize(in) + if err != nil { + return nil, err + } + return in, nil +} diff --git a/pkg/manager/sanitizers/workload.go b/pkg/manager/sanitizers/workload.go new file mode 100644 index 00000000..e85daf9b --- /dev/null +++ b/pkg/manager/sanitizers/workload.go @@ -0,0 +1,35 @@ +package sanitizers + +import "fmt" + +type workloadSanitizer struct{} + +func NewWorkloadSanitizer() Sanitizer { + return workloadSanitizer{} +} + +func (s workloadSanitizer) Sanitize(in map[string]interface{}) (map[string]interface{}, error) { + ms := NewMetadataSanitizer() + in, err := ms.Sanitize(in) + if err != nil { + return nil, err + } + + spec, ok := in["spec"].(map[string]interface{}) + if !ok { + return nil, fmt.Errorf("unable to parse workload spec") + } + + template, ok := spec["template"].(map[string]interface{}) + if !ok { + return nil, fmt.Errorf("unable to parse pod template") + } + ps := NewPodSanitizer() + template, err = ps.Sanitize(template) + if err != nil { + return nil, err + } + spec["template"] = template + in["spec"] = spec + return in, nil +} diff --git a/pkg/manifests/application.go b/pkg/manifests/application.go deleted file mode 100644 index 3140f4af..00000000 --- a/pkg/manifests/application.go +++ /dev/null @@ -1,12 +0,0 @@ -package manifests - -type applicationDumper struct { -} - -func newApplicationDumper() ManifestDumper { - return applicationDumper{} -} - -func (opt applicationDumper) Dump() error { - return nil -} diff --git a/pkg/manifests/cluster.go b/pkg/manifests/cluster.go deleted file mode 100644 index c3af9686..00000000 --- a/pkg/manifests/cluster.go +++ /dev/null @@ -1,21 +0,0 @@ -package manifests - -import "kmodules.xyz/client-go/tools/backup" - -type clusterDumper struct { -} - -func newClusterDumper() ManifestDumper { - return clusterDumper{} -} - -func (opt clusterDumper) Dump() error { - // backup cluster resources yaml into opt.backupDir - mgr := backup.NewBackupManager(opt.context, opt.config, opt.sanitize) - - _, err := mgr.BackupToDir(opt.interimDataDir) - if err != nil { - return err - } - return nil -} diff --git a/pkg/manifests/namespace.go b/pkg/manifests/namespace.go deleted file mode 100644 index cc8dd571..00000000 --- a/pkg/manifests/namespace.go +++ /dev/null @@ -1,12 +0,0 @@ -package manifests - -type namespaceDumper struct { -} - -func newNamespaceDumper() ManifestDumper { - return namespaceDumper{} -} - -func (opt namespaceDumper) Dump() error { - return nil -} diff --git a/pkg/manifests/options.go b/pkg/manifests/options.go deleted file mode 100644 index 09c7dfc8..00000000 --- a/pkg/manifests/options.go +++ /dev/null @@ -1,22 +0,0 @@ -package manifests - -import ( - "stash.appscode.dev/apimachinery/apis" - "stash.appscode.dev/apimachinery/apis/stash/v1beta1" -) - -type ManifestDumper interface { - Dump() error -} - -func NewDumper() ManifestDumper { - switch target.Kind { - case v1beta1.TargetKindEmpty: - return newClusterDumper() - case apis.KindNamespace: - return newNamespaceDumper() - default: - return newApplicationDumper() - - } -} diff --git a/pkg/utils.go b/pkg/utils.go index b1f2dca5..2405a661 100644 --- a/pkg/utils.go +++ b/pkg/utils.go @@ -18,14 +18,15 @@ package pkg import ( "fmt" - "k8s.io/client-go/rest" "os" + "strings" + stash "stash.appscode.dev/apimachinery/client/clientset/versioned" "stash.appscode.dev/apimachinery/pkg/restic" - "strings" shell "gomodules.xyz/go-sh" "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" kmapi "kmodules.xyz/client-go/api/v1" appcatalog_cs "kmodules.xyz/custom-resources/client/clientset/versioned" ) diff --git a/vendor/github.com/json-iterator/go/README.md b/vendor/github.com/json-iterator/go/README.md index 52b111d5..c589addf 100644 --- a/vendor/github.com/json-iterator/go/README.md +++ b/vendor/github.com/json-iterator/go/README.md @@ -8,8 +8,6 @@ A high-performance 100% compatible drop-in replacement of "encoding/json" -You can also use thrift like JSON using [thrift-iterator](https://github.com/thrift-iterator/go) - # Benchmark ![benchmark](http://jsoniter.com/benchmarks/go-benchmark.png) diff --git a/vendor/github.com/json-iterator/go/go.mod b/vendor/github.com/json-iterator/go/go.mod index e05c42ff..e817cccb 100644 --- a/vendor/github.com/json-iterator/go/go.mod +++ b/vendor/github.com/json-iterator/go/go.mod @@ -6,6 +6,6 @@ require ( github.com/davecgh/go-spew v1.1.1 github.com/google/gofuzz v1.0.0 github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 - github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 + github.com/modern-go/reflect2 v1.0.2 github.com/stretchr/testify v1.3.0 ) diff --git a/vendor/github.com/json-iterator/go/go.sum b/vendor/github.com/json-iterator/go/go.sum index be00a6df..4b7bb8a2 100644 --- a/vendor/github.com/json-iterator/go/go.sum +++ b/vendor/github.com/json-iterator/go/go.sum @@ -5,11 +5,10 @@ github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 h1:Esafd1046DLDQ0W1YjYsBW+p8U2u7vzgW2SQVmlNazg= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= diff --git a/vendor/github.com/modern-go/reflect2/.travis.yml b/vendor/github.com/modern-go/reflect2/.travis.yml index fbb43744..b097728d 100644 --- a/vendor/github.com/modern-go/reflect2/.travis.yml +++ b/vendor/github.com/modern-go/reflect2/.travis.yml @@ -1,7 +1,7 @@ language: go go: - - 1.8.x + - 1.9.x - 1.x before_install: diff --git a/vendor/github.com/modern-go/reflect2/Gopkg.lock b/vendor/github.com/modern-go/reflect2/Gopkg.lock index 2a3a6989..10ef8111 100644 --- a/vendor/github.com/modern-go/reflect2/Gopkg.lock +++ b/vendor/github.com/modern-go/reflect2/Gopkg.lock @@ -1,15 +1,9 @@ # This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. -[[projects]] - name = "github.com/modern-go/concurrent" - packages = ["."] - revision = "e0a39a4cb4216ea8db28e22a69f4ec25610d513a" - version = "1.0.0" - [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "daee8a88b3498b61c5640056665b8b9eea062006f5e596bbb6a3ed9119a11ec7" + input-imports = [] solver-name = "gps-cdcl" solver-version = 1 diff --git a/vendor/github.com/modern-go/reflect2/Gopkg.toml b/vendor/github.com/modern-go/reflect2/Gopkg.toml index 2f4f4dbd..a9bc5061 100644 --- a/vendor/github.com/modern-go/reflect2/Gopkg.toml +++ b/vendor/github.com/modern-go/reflect2/Gopkg.toml @@ -26,10 +26,6 @@ ignored = [] -[[constraint]] - name = "github.com/modern-go/concurrent" - version = "1.0.0" - [prune] go-tests = true unused-packages = true diff --git a/vendor/github.com/modern-go/reflect2/go.mod b/vendor/github.com/modern-go/reflect2/go.mod new file mode 100644 index 00000000..9057e9b3 --- /dev/null +++ b/vendor/github.com/modern-go/reflect2/go.mod @@ -0,0 +1,3 @@ +module github.com/modern-go/reflect2 + +go 1.12 diff --git a/vendor/github.com/modern-go/reflect2/go_above_118.go b/vendor/github.com/modern-go/reflect2/go_above_118.go new file mode 100644 index 00000000..2b4116f6 --- /dev/null +++ b/vendor/github.com/modern-go/reflect2/go_above_118.go @@ -0,0 +1,23 @@ +//+build go1.18 + +package reflect2 + +import ( + "unsafe" +) + +// m escapes into the return value, but the caller of mapiterinit +// doesn't let the return value escape. +//go:noescape +//go:linkname mapiterinit reflect.mapiterinit +func mapiterinit(rtype unsafe.Pointer, m unsafe.Pointer, it *hiter) + +func (type2 *UnsafeMapType) UnsafeIterate(obj unsafe.Pointer) MapIterator { + var it hiter + mapiterinit(type2.rtype, *(*unsafe.Pointer)(obj), &it) + return &UnsafeMapIterator{ + hiter: &it, + pKeyRType: type2.pKeyRType, + pElemRType: type2.pElemRType, + } +} \ No newline at end of file diff --git a/vendor/github.com/modern-go/reflect2/go_above_17.go b/vendor/github.com/modern-go/reflect2/go_above_17.go deleted file mode 100644 index 5c1cea86..00000000 --- a/vendor/github.com/modern-go/reflect2/go_above_17.go +++ /dev/null @@ -1,8 +0,0 @@ -//+build go1.7 - -package reflect2 - -import "unsafe" - -//go:linkname resolveTypeOff reflect.resolveTypeOff -func resolveTypeOff(rtype unsafe.Pointer, off int32) unsafe.Pointer diff --git a/vendor/github.com/modern-go/reflect2/go_above_19.go b/vendor/github.com/modern-go/reflect2/go_above_19.go index c7e3b780..974f7685 100644 --- a/vendor/github.com/modern-go/reflect2/go_above_19.go +++ b/vendor/github.com/modern-go/reflect2/go_above_19.go @@ -6,6 +6,9 @@ import ( "unsafe" ) +//go:linkname resolveTypeOff reflect.resolveTypeOff +func resolveTypeOff(rtype unsafe.Pointer, off int32) unsafe.Pointer + //go:linkname makemap reflect.makemap func makemap(rtype unsafe.Pointer, cap int) (m unsafe.Pointer) diff --git a/vendor/github.com/modern-go/reflect2/go_below_118.go b/vendor/github.com/modern-go/reflect2/go_below_118.go new file mode 100644 index 00000000..00003dbd --- /dev/null +++ b/vendor/github.com/modern-go/reflect2/go_below_118.go @@ -0,0 +1,21 @@ +//+build !go1.18 + +package reflect2 + +import ( + "unsafe" +) + +// m escapes into the return value, but the caller of mapiterinit +// doesn't let the return value escape. +//go:noescape +//go:linkname mapiterinit reflect.mapiterinit +func mapiterinit(rtype unsafe.Pointer, m unsafe.Pointer) (val *hiter) + +func (type2 *UnsafeMapType) UnsafeIterate(obj unsafe.Pointer) MapIterator { + return &UnsafeMapIterator{ + hiter: mapiterinit(type2.rtype, *(*unsafe.Pointer)(obj)), + pKeyRType: type2.pKeyRType, + pElemRType: type2.pElemRType, + } +} \ No newline at end of file diff --git a/vendor/github.com/modern-go/reflect2/go_below_17.go b/vendor/github.com/modern-go/reflect2/go_below_17.go deleted file mode 100644 index 65a93c88..00000000 --- a/vendor/github.com/modern-go/reflect2/go_below_17.go +++ /dev/null @@ -1,9 +0,0 @@ -//+build !go1.7 - -package reflect2 - -import "unsafe" - -func resolveTypeOff(rtype unsafe.Pointer, off int32) unsafe.Pointer { - return nil -} diff --git a/vendor/github.com/modern-go/reflect2/go_below_19.go b/vendor/github.com/modern-go/reflect2/go_below_19.go deleted file mode 100644 index b050ef70..00000000 --- a/vendor/github.com/modern-go/reflect2/go_below_19.go +++ /dev/null @@ -1,14 +0,0 @@ -//+build !go1.9 - -package reflect2 - -import ( - "unsafe" -) - -//go:linkname makemap reflect.makemap -func makemap(rtype unsafe.Pointer) (m unsafe.Pointer) - -func makeMapWithSize(rtype unsafe.Pointer, cap int) unsafe.Pointer { - return makemap(rtype) -} diff --git a/vendor/github.com/modern-go/reflect2/reflect2.go b/vendor/github.com/modern-go/reflect2/reflect2.go index 63b49c79..c43c8b9d 100644 --- a/vendor/github.com/modern-go/reflect2/reflect2.go +++ b/vendor/github.com/modern-go/reflect2/reflect2.go @@ -1,8 +1,9 @@ package reflect2 import ( - "github.com/modern-go/concurrent" "reflect" + "runtime" + "sync" "unsafe" ) @@ -130,13 +131,13 @@ var ConfigSafe = Config{UseSafeImplementation: true}.Froze() type frozenConfig struct { useSafeImplementation bool - cache *concurrent.Map + cache *sync.Map } func (cfg Config) Froze() *frozenConfig { return &frozenConfig{ useSafeImplementation: cfg.UseSafeImplementation, - cache: concurrent.NewMap(), + cache: new(sync.Map), } } @@ -288,11 +289,12 @@ func NoEscape(p unsafe.Pointer) unsafe.Pointer { } func UnsafeCastString(str string) []byte { + bytes := make([]byte, 0) stringHeader := (*reflect.StringHeader)(unsafe.Pointer(&str)) - sliceHeader := &reflect.SliceHeader{ - Data: stringHeader.Data, - Cap: stringHeader.Len, - Len: stringHeader.Len, - } - return *(*[]byte)(unsafe.Pointer(sliceHeader)) + sliceHeader := (*reflect.SliceHeader)(unsafe.Pointer(&bytes)) + sliceHeader.Data = stringHeader.Data + sliceHeader.Cap = stringHeader.Len + sliceHeader.Len = stringHeader.Len + runtime.KeepAlive(str) + return bytes } diff --git a/vendor/github.com/modern-go/reflect2/test.sh b/vendor/github.com/modern-go/reflect2/test.sh deleted file mode 100644 index 3d2b9768..00000000 --- a/vendor/github.com/modern-go/reflect2/test.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -set -e -echo "" > coverage.txt - -for d in $(go list github.com/modern-go/reflect2-tests/... | grep -v vendor); do - go test -coverprofile=profile.out -coverpkg=github.com/modern-go/reflect2 $d - if [ -f profile.out ]; then - cat profile.out >> coverage.txt - rm profile.out - fi -done diff --git a/vendor/github.com/modern-go/reflect2/type_map.go b/vendor/github.com/modern-go/reflect2/type_map.go index 3acfb558..4b13c315 100644 --- a/vendor/github.com/modern-go/reflect2/type_map.go +++ b/vendor/github.com/modern-go/reflect2/type_map.go @@ -1,17 +1,13 @@ +// +build !gccgo + package reflect2 import ( "reflect" - "runtime" - "strings" "sync" "unsafe" ) -// typelinks1 for 1.5 ~ 1.6 -//go:linkname typelinks1 reflect.typelinks -func typelinks1() [][]unsafe.Pointer - // typelinks2 for 1.7 ~ //go:linkname typelinks2 reflect.typelinks func typelinks2() (sections []unsafe.Pointer, offset [][]int32) @@ -27,49 +23,10 @@ func discoverTypes() { types = make(map[string]reflect.Type) packages = make(map[string]map[string]reflect.Type) - ver := runtime.Version() - if ver == "go1.5" || strings.HasPrefix(ver, "go1.5.") { - loadGo15Types() - } else if ver == "go1.6" || strings.HasPrefix(ver, "go1.6.") { - loadGo15Types() - } else { - loadGo17Types() - } -} - -func loadGo15Types() { - var obj interface{} = reflect.TypeOf(0) - typePtrss := typelinks1() - for _, typePtrs := range typePtrss { - for _, typePtr := range typePtrs { - (*emptyInterface)(unsafe.Pointer(&obj)).word = typePtr - typ := obj.(reflect.Type) - if typ.Kind() == reflect.Ptr && typ.Elem().Kind() == reflect.Struct { - loadedType := typ.Elem() - pkgTypes := packages[loadedType.PkgPath()] - if pkgTypes == nil { - pkgTypes = map[string]reflect.Type{} - packages[loadedType.PkgPath()] = pkgTypes - } - types[loadedType.String()] = loadedType - pkgTypes[loadedType.Name()] = loadedType - } - if typ.Kind() == reflect.Slice && typ.Elem().Kind() == reflect.Ptr && - typ.Elem().Elem().Kind() == reflect.Struct { - loadedType := typ.Elem().Elem() - pkgTypes := packages[loadedType.PkgPath()] - if pkgTypes == nil { - pkgTypes = map[string]reflect.Type{} - packages[loadedType.PkgPath()] = pkgTypes - } - types[loadedType.String()] = loadedType - pkgTypes[loadedType.Name()] = loadedType - } - } - } + loadGoTypes() } -func loadGo17Types() { +func loadGoTypes() { var obj interface{} = reflect.TypeOf(0) sections, offset := typelinks2() for i, offs := range offset { diff --git a/vendor/github.com/modern-go/reflect2/unsafe_link.go b/vendor/github.com/modern-go/reflect2/unsafe_link.go index 57229c8d..b49f614e 100644 --- a/vendor/github.com/modern-go/reflect2/unsafe_link.go +++ b/vendor/github.com/modern-go/reflect2/unsafe_link.go @@ -19,18 +19,12 @@ func typedslicecopy(elemType unsafe.Pointer, dst, src sliceHeader) int //go:linkname mapassign reflect.mapassign //go:noescape -func mapassign(rtype unsafe.Pointer, m unsafe.Pointer, key, val unsafe.Pointer) +func mapassign(rtype unsafe.Pointer, m unsafe.Pointer, key unsafe.Pointer, val unsafe.Pointer) //go:linkname mapaccess reflect.mapaccess //go:noescape func mapaccess(rtype unsafe.Pointer, m unsafe.Pointer, key unsafe.Pointer) (val unsafe.Pointer) -// m escapes into the return value, but the caller of mapiterinit -// doesn't let the return value escape. -//go:noescape -//go:linkname mapiterinit reflect.mapiterinit -func mapiterinit(rtype unsafe.Pointer, m unsafe.Pointer) *hiter - //go:noescape //go:linkname mapiternext reflect.mapiternext func mapiternext(it *hiter) @@ -42,9 +36,21 @@ func ifaceE2I(rtype unsafe.Pointer, src interface{}, dst unsafe.Pointer) // If you modify hiter, also change cmd/internal/gc/reflect.go to indicate // the layout of this structure. type hiter struct { - key unsafe.Pointer // Must be in first position. Write nil to indicate iteration end (see cmd/internal/gc/range.go). - value unsafe.Pointer // Must be in second position (see cmd/internal/gc/range.go). - // rest fields are ignored + key unsafe.Pointer + value unsafe.Pointer + t unsafe.Pointer + h unsafe.Pointer + buckets unsafe.Pointer + bptr unsafe.Pointer + overflow *[]unsafe.Pointer + oldoverflow *[]unsafe.Pointer + startBucket uintptr + offset uint8 + wrapped bool + B uint8 + i uint8 + bucket uintptr + checkBucket uintptr } // add returns p+x. diff --git a/vendor/github.com/modern-go/reflect2/unsafe_map.go b/vendor/github.com/modern-go/reflect2/unsafe_map.go index f2e76e6b..37872da8 100644 --- a/vendor/github.com/modern-go/reflect2/unsafe_map.go +++ b/vendor/github.com/modern-go/reflect2/unsafe_map.go @@ -107,14 +107,6 @@ func (type2 *UnsafeMapType) Iterate(obj interface{}) MapIterator { return type2.UnsafeIterate(objEFace.data) } -func (type2 *UnsafeMapType) UnsafeIterate(obj unsafe.Pointer) MapIterator { - return &UnsafeMapIterator{ - hiter: mapiterinit(type2.rtype, *(*unsafe.Pointer)(obj)), - pKeyRType: type2.pKeyRType, - pElemRType: type2.pElemRType, - } -} - type UnsafeMapIterator struct { *hiter pKeyRType unsafe.Pointer diff --git a/vendor/kmodules.xyz/client-go/api/v1/certificates.go b/vendor/kmodules.xyz/client-go/api/v1/certificates.go index ce28de5e..c72d55df 100644 --- a/vendor/kmodules.xyz/client-go/api/v1/certificates.go +++ b/vendor/kmodules.xyz/client-go/api/v1/certificates.go @@ -254,8 +254,7 @@ func RemoveCertificate(certificates []CertificateSpec, alias string) []Certifica return append(certificates[:idx], certificates[idx+1:]...) } -type stringSetMerger struct { -} +type stringSetMerger struct{} func (t stringSetMerger) Transformer(typ reflect.Type) func(dst, src reflect.Value) error { if typ == reflect.TypeOf([]string{}) { diff --git a/vendor/kmodules.xyz/client-go/api/v1/object.go b/vendor/kmodules.xyz/client-go/api/v1/object.go index 22480b2c..8fa29fff 100644 --- a/vendor/kmodules.xyz/client-go/api/v1/object.go +++ b/vendor/kmodules.xyz/client-go/api/v1/object.go @@ -143,6 +143,49 @@ func ParseObjectID(key OID) (*ObjectID, error) { return &id, nil } +func ObjectIDMap(key OID) (map[string]interface{}, error) { + id := map[string]interface{}{ + "group": "", + "kind": "", + "namespace": "", + "name": "", + } + + chunks := strings.Split(string(key), ",") + for _, chunk := range chunks { + parts := strings.FieldsFunc(chunk, func(r rune) bool { + return r == '=' || unicode.IsSpace(r) + }) + if len(parts) == 0 || len(parts) > 2 { + return nil, fmt.Errorf("invalid chunk %s", chunk) + } + + switch parts[0] { + case "G": + if len(parts) == 2 { + id["group"] = parts[1] + } + case "K": + if len(parts) == 1 { + return nil, fmt.Errorf("kind not set") + } + id["kind"] = parts[1] + case "NS": + if len(parts) == 2 { + id["namespace"] = parts[1] + } + case "N": + if len(parts) == 1 { + return nil, fmt.Errorf("name not set") + } + id["name"] = parts[1] + default: + return nil, fmt.Errorf("unknown key %s", parts[0]) + } + } + return id, nil +} + func (oid *ObjectID) GroupKind() schema.GroupKind { return schema.GroupKind{Group: oid.Group, Kind: oid.Kind} } @@ -164,7 +207,7 @@ type ObjectInfo struct { Ref ObjectReference `json:"ref" protobuf:"bytes,2,opt,name=ref"` } -// +kubebuilder:validation:Enum=auth_via;backup_via;catalog;connect_via;exposed_by;monitored_by;offshoot;restore_into;scaled_by;view +// +kubebuilder:validation:Enum=auth_via;backup_via;catalog;connect_via;exposed_by;monitored_by;offshoot;restore_into;scaled_by;view;cert_issuer;policy type EdgeLabel string const ( @@ -178,4 +221,6 @@ const ( EdgeRestoreInto EdgeLabel = "restore_into" EdgeScaledBy EdgeLabel = "scaled_by" EdgeView EdgeLabel = "view" + EdgeCertIssuer EdgeLabel = "cert_issuer" + EdgePolicy EdgeLabel = "policy" ) diff --git a/vendor/kmodules.xyz/client-go/core/v1/kubernetes.go b/vendor/kmodules.xyz/client-go/core/v1/kubernetes.go index 8f86a9bc..6d780305 100644 --- a/vendor/kmodules.xyz/client-go/core/v1/kubernetes.go +++ b/vendor/kmodules.xyz/client-go/core/v1/kubernetes.go @@ -100,7 +100,7 @@ func UpsertContainer(containers []core.Container, upsert core.Container) []core. } func UpsertContainers(containers []core.Container, addons []core.Container) []core.Container { - var out = containers + out := containers for _, c := range addons { out = UpsertContainer(out, c) } diff --git a/vendor/kmodules.xyz/client-go/discovery/lib.go b/vendor/kmodules.xyz/client-go/discovery/lib.go index 66b4f52f..22902c92 100644 --- a/vendor/kmodules.xyz/client-go/discovery/lib.go +++ b/vendor/kmodules.xyz/client-go/discovery/lib.go @@ -177,9 +177,11 @@ func (e *KnownBug) Error() string { return "Bug: " + e.URL + ". To fix, " + e.Fix } -var err62649_K1_9 = &KnownBug{URL: "https://github.com/kubernetes/kubernetes/pull/62649", Fix: "upgrade to Kubernetes 1.9.8 or later."} -var err62649_K1_10 = &KnownBug{URL: "https://github.com/kubernetes/kubernetes/pull/62649", Fix: "upgrade to Kubernetes 1.10.2 or later."} -var err83778_K1_16 = &KnownBug{URL: "https://github.com/kubernetes/kubernetes/pull/83787", Fix: "upgrade to Kubernetes 1.16.2 or later."} +var ( + err62649_K1_9 = &KnownBug{URL: "https://github.com/kubernetes/kubernetes/pull/62649", Fix: "upgrade to Kubernetes 1.9.8 or later."} + err62649_K1_10 = &KnownBug{URL: "https://github.com/kubernetes/kubernetes/pull/62649", Fix: "upgrade to Kubernetes 1.10.2 or later."} + err83778_K1_16 = &KnownBug{URL: "https://github.com/kubernetes/kubernetes/pull/83787", Fix: "upgrade to Kubernetes 1.16.2 or later."} +) var ( DefaultConstraint = ">= 1.11.0" diff --git a/vendor/kmodules.xyz/client-go/dynamic/kubernetes.go b/vendor/kmodules.xyz/client-go/dynamic/kubernetes.go index 8e44bcfc..c58d6a04 100644 --- a/vendor/kmodules.xyz/client-go/dynamic/kubernetes.go +++ b/vendor/kmodules.xyz/client-go/dynamic/kubernetes.go @@ -77,8 +77,8 @@ func untilHasKey( namespace, name string, fn func(metav1.Object) map[string]string, key string, value *string, - timeout time.Duration) (out string, err error) { - + timeout time.Duration, +) (out string, err error) { ctx := context.Background() if timeout > 0 { var cancel context.CancelFunc diff --git a/vendor/kmodules.xyz/client-go/go.mod b/vendor/kmodules.xyz/client-go/go.mod index b34da2d2..f66e71b3 100644 --- a/vendor/kmodules.xyz/client-go/go.mod +++ b/vendor/kmodules.xyz/client-go/go.mod @@ -8,7 +8,7 @@ require ( github.com/davecgh/go-spew v1.1.1 github.com/evanphx/json-patch v4.11.0+incompatible github.com/fatih/structs v1.1.0 - github.com/fsnotify/fsnotify v1.4.9 + github.com/fsnotify/fsnotify v1.5.1 github.com/gabriel-vasile/mimetype v1.2.0 github.com/go-openapi/spec v0.19.5 github.com/gogo/protobuf v1.3.2 @@ -18,9 +18,9 @@ require ( github.com/imdario/mergo v0.3.12 github.com/jpillora/go-ogle-analytics v0.0.0-20161213085824-14b04e0594ef github.com/json-iterator/go v1.1.11 - github.com/mitchellh/mapstructure v1.1.2 + github.com/mitchellh/mapstructure v1.4.1 github.com/pkg/errors v0.9.1 - github.com/spf13/cobra v1.1.3 + github.com/spf13/cobra v1.2.1 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 github.com/yudai/gojsondiff v1.0.0 @@ -28,16 +28,16 @@ require ( gomodules.xyz/jsonpatch/v2 v2.2.0 gomodules.xyz/mergo v0.3.13-0.20210702100041-9d62ff8ece4d gomodules.xyz/pointer v0.1.0 - gomodules.xyz/x v0.0.8 + gomodules.xyz/x v0.0.10 k8s.io/api v0.21.1 k8s.io/apiextensions-apiserver v0.21.1 k8s.io/apimachinery v0.21.1 k8s.io/apiserver v0.21.1 k8s.io/cli-runtime v0.21.1 k8s.io/client-go v0.21.1 - k8s.io/klog/v2 v2.8.0 + k8s.io/klog/v2 v2.9.0 k8s.io/kube-aggregator v0.21.1 - k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 + k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e sigs.k8s.io/controller-runtime v0.9.0 sigs.k8s.io/yaml v1.2.0 ) @@ -70,7 +70,7 @@ require ( github.com/golang/protobuf v1.5.2 // indirect github.com/google/btree v1.0.0 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect - github.com/google/uuid v1.1.2 // indirect + github.com/google/uuid v1.3.0 // indirect github.com/googleapis/gnostic v0.5.5 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect @@ -89,7 +89,7 @@ require ( github.com/prometheus/client_model v0.2.0 // indirect github.com/prometheus/common v0.18.0 // indirect github.com/prometheus/procfs v0.6.0 // indirect - github.com/sergi/go-diff v1.1.0 // indirect + github.com/sergi/go-diff v1.2.0 // indirect github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca // indirect github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect github.com/yudai/pp v2.0.1+incompatible // indirect @@ -98,7 +98,7 @@ require ( go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.19.0 // indirect - golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 // indirect + golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b // indirect golang.org/x/net v0.0.0-20210428140749-89ef3d95e781 // indirect golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect golang.org/x/sync v0.0.0-20201207232520-09787c993a3a // indirect @@ -107,8 +107,8 @@ require ( golang.org/x/text v0.3.7 // indirect gomodules.xyz/homedir v0.1.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a // indirect - google.golang.org/grpc v1.27.1 // indirect + google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c // indirect + google.golang.org/grpc v1.38.0 // indirect google.golang.org/protobuf v1.25.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect @@ -210,7 +210,7 @@ replace k8s.io/api => k8s.io/api v0.21.1 replace k8s.io/apimachinery => github.com/kmodules/apimachinery v0.21.2-rc.0.0.20210617231004-332981b97d2d -replace k8s.io/apiserver => github.com/kmodules/apiserver v0.21.2-0.20210716212718-83e5493ac170 +replace k8s.io/apiserver => github.com/kmodules/apiserver v0.21.2-0.20220112070009-e3f6e88991d9 replace k8s.io/cli-runtime => k8s.io/cli-runtime v0.21.1 @@ -226,7 +226,7 @@ replace k8s.io/utils => k8s.io/utils v0.0.0-20201110183641-67b214c5f920 replace sigs.k8s.io/application => github.com/kmodules/application v0.8.4-0.20210427030912-90eeee3bc4ad -replace github.com/satori/go.uuid => github.com/gofrs/uuid v4.0.0+incompatible +replace github.com/satori/go.uuid => github.com/gomodules/uuid v4.0.0+incompatible replace github.com/dgrijalva/jwt-go => github.com/gomodules/jwt v3.2.2+incompatible diff --git a/vendor/kmodules.xyz/client-go/go.sum b/vendor/kmodules.xyz/client-go/go.sum index eaf79dff..571bfdd1 100644 --- a/vendor/kmodules.xyz/client-go/go.sum +++ b/vendor/kmodules.xyz/client-go/go.sum @@ -43,6 +43,7 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy 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/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= @@ -61,6 +62,7 @@ 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/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.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= @@ -87,6 +89,7 @@ github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/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 h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= @@ -122,7 +125,7 @@ github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi github.com/evanphx/json-patch v4.11.0+incompatible h1:glyUF9yIYtMHzn8xaKw5rMhdWcwsYV8dZHIq5567/xs= github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/form3tech-oss/jwt-go v3.2.5+incompatible h1:/l4kBbb4/vGSsdtB5nUe8L7B9mImVMaBPw9L/0TBHU8= @@ -130,8 +133,9 @@ github.com/form3tech-oss/jwt-go v3.2.5+incompatible/go.mod h1:pbq4aXjuKjdthFRnoD github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= 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/gabriel-vasile/mimetype v1.2.0 h1:A6z5J8OhjiWFV91sQ3dMI8apYu/tvP9keDaMM3Xu6p4= github.com/gabriel-vasile/mimetype v1.2.0/go.mod h1:6CDPel/o/3/s4+bp6kIbsWATq8pmgOisOPG40CJa6To= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -167,6 +171,7 @@ github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG 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/gobuffalo/here v0.6.0/go.mod h1:wAG085dHOYqUpf+Ap+WOdrPTp5IYcDAs/x7PLa8Y5fM= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= 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 h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= @@ -196,7 +201,7 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= 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= @@ -207,8 +212,9 @@ github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaU 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 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/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.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= @@ -228,8 +234,9 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.5 h1:UImYN5qQ8tuGpGE16ZmjvcTtTw24zw1QAp/SlnNrZhI= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= +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.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= @@ -255,7 +262,7 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs= +github.com/howeyc/gopass v0.0.0-20210920133722-c8aef6fb66ef/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -284,10 +291,11 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kmodules/apimachinery v0.21.2-rc.0.0.20210617231004-332981b97d2d h1:6Yzcd8c16QYTv0rd0TSNWLNJ+WeJM5qp41eT9XIu78s= github.com/kmodules/apimachinery v0.21.2-rc.0.0.20210617231004-332981b97d2d/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -github.com/kmodules/apiserver v0.21.2-0.20210716212718-83e5493ac170 h1:JnFBVfamGETJErVnJ4WoE3q+n1+4hrq61uY23HsV3c4= -github.com/kmodules/apiserver v0.21.2-0.20210716212718-83e5493ac170/go.mod h1:nLLYZvMWn35glJ4/FZRhzLG/3MPxAaZTgV4FJZdr+tY= +github.com/kmodules/apiserver v0.21.2-0.20220112070009-e3f6e88991d9 h1:ZHj6YH/If+3Gycc0Dm1NH1GexUkmxrRyFMb5SFpl8dU= +github.com/kmodules/apiserver v0.21.2-0.20220112070009-e3f6e88991d9/go.mod h1:nLLYZvMWn35glJ4/FZRhzLG/3MPxAaZTgV4FJZdr+tY= 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.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= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -301,18 +309,20 @@ github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-b github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0 h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/markbates/pkger v0.17.1/go.mod h1:0JoVlrol20BSywW79rN3kdFFsE5xYM+rSCQDXbLhiuI= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.9 h1:sqDoxXbdeALODt0DAeJCVp38ps9ZogZEAXjus69YV3U= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= 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.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +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/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= @@ -325,8 +335,9 @@ github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eI github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= 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/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= @@ -388,6 +399,7 @@ github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIw github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= @@ -397,6 +409,7 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= @@ -414,14 +427,16 @@ github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3x github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/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/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= +github.com/sergi/go-diff v1.2.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.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= @@ -433,15 +448,18 @@ github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= 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/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.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= -github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M= -github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= +github.com/spf13/cobra v1.2.1 h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw= +github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= 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/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -449,6 +467,7 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= @@ -491,6 +510,9 @@ go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489 h1:1JFLBqwIgdyHN1ZtgjTBwO+blA6gVOmZurpiMEsETKo= 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/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= @@ -523,11 +545,13 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/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-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-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 h1:/ZScEX8SfEmUGRHs0gxpqteO5nfNW6axyZbBdw9A12g= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b h1:wSOdpTq0/eI46Ez/LkDwIsAKA71YP2SRKBODiRWM0as= +golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= @@ -572,8 +596,11 @@ golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781 h1:DzZ89McO9/gWPsQXS/FVKAlG02ZjaQ6AlZRBimEYOd0= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -625,7 +652,10 @@ golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/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-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2 h1:c8PlLMqBbOHoqtjteWm5/kbe6rNY2pbRfbIMVnepueo= golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= @@ -690,9 +720,9 @@ gomodules.xyz/mergo v0.3.13-0.20210702100041-9d62ff8ece4d/go.mod h1:i2WNHvGpzLKI gomodules.xyz/password-generator v0.2.7/go.mod h1:TvwYYTx9+P1pPwKQKfZgB/wr2Id9MqAQ3B5auY7reNg= gomodules.xyz/pointer v0.1.0 h1:sG2UKrYVSo6E3r4itAjXfPfe4fuXMi0KdyTHpR3vGCg= gomodules.xyz/pointer v0.1.0/go.mod h1:sPLsC0+yLTRecUiC5yVlyvXhZ6LAGojNCRWNNqoplvo= -gomodules.xyz/sets v0.2.0/go.mod h1:jKgNp01/iDs+svOWXaPk5cKP3VXy0mWUoTF/ore+aMc= -gomodules.xyz/x v0.0.8 h1:piAVBINs42F6RPf5WbiulSNYWU0JFwueKoBfR98J9Ro= -gomodules.xyz/x v0.0.8/go.mod h1:YnL5CAnLrEtAV/NQGn5sKJe6u08/vDlRyJddXIuD9mc= +gomodules.xyz/sets v0.2.1/go.mod h1:jKgNp01/iDs+svOWXaPk5cKP3VXy0mWUoTF/ore+aMc= +gomodules.xyz/x v0.0.10 h1:b78HYvlXlqOVb8OZEy2uZeN/bp78nH42qIFnLQVR6O0= +gomodules.xyz/x v0.0.10/go.mod h1:AgHPywNbRKtogAdk08vCqsfwjtXtXX1/FUPyG7OWdOs= google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -720,6 +750,7 @@ gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= 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= +gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= 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= @@ -730,6 +761,7 @@ gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRN gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -759,8 +791,9 @@ k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8 k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/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.8.0 h1:Q3gmuM9hKEjefWFFYF0Mat+YyFJvsUyYuwyNNJ5C9Ts= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= +k8s.io/klog/v2 v2.9.0 h1:D7HV+n1V57XeZ0m6tdRkfknthUaM06VFbWldOFh8kzM= +k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/kube-aggregator v0.21.1 h1:3pPRhOXZcJYjNDjPDizFx0G5//DArWKANZE03J5z8Ck= k8s.io/kube-aggregator v0.21.1/go.mod h1:cAZ0n02IiSl57sQSHz4vvrz3upQRMbytOiZnpPJaQzQ= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 h1:vEx13qjvaZ4yfObSSXW7BrMc/KQBBT/Jyee8XtLf4x0= diff --git a/vendor/kmodules.xyz/client-go/meta/annotations.go b/vendor/kmodules.xyz/client-go/meta/annotations.go index 3fd4822e..4ffdd4e5 100644 --- a/vendor/kmodules.xyz/client-go/meta/annotations.go +++ b/vendor/kmodules.xyz/client-go/meta/annotations.go @@ -25,13 +25,15 @@ import ( type ParserFunc func(map[string]string, string) (interface{}, error) -var _ ParserFunc = GetBool -var _ ParserFunc = GetInt -var _ ParserFunc = GetString -var _ ParserFunc = GetList -var _ ParserFunc = GetMap -var _ ParserFunc = GetFloat -var _ ParserFunc = GetDuration +var ( + _ ParserFunc = GetBool + _ ParserFunc = GetInt + _ ParserFunc = GetString + _ ParserFunc = GetList + _ ParserFunc = GetMap + _ ParserFunc = GetFloat + _ ParserFunc = GetDuration +) func GetBool(m map[string]string, key string) (interface{}, error) { if m == nil { diff --git a/vendor/kmodules.xyz/client-go/meta/arguments.go b/vendor/kmodules.xyz/client-go/meta/arguments.go index 31002b32..43b2fba0 100644 --- a/vendor/kmodules.xyz/client-go/meta/arguments.go +++ b/vendor/kmodules.xyz/client-go/meta/arguments.go @@ -92,7 +92,6 @@ func ParseArgumentListToMap(arguments []string) map[string]string { resultingMap := map[string]string{} for i, arg := range arguments { key, val, err := parseArgument(arg) - // Ignore if the first argument doesn't satisfy the criteria, it's most often the binary name // Warn in all other cases, but don't error out. This can happen only if the user has edited the argument list by hand, so they might know what they are doing if err != nil { diff --git a/vendor/kmodules.xyz/client-go/meta/cmp.go b/vendor/kmodules.xyz/client-go/meta/cmp.go index 7371be04..101583a6 100644 --- a/vendor/kmodules.xyz/client-go/meta/cmp.go +++ b/vendor/kmodules.xyz/client-go/meta/cmp.go @@ -25,22 +25,20 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -var ( - cmpOptions = []cmp.Option{ - cmp.Comparer(func(x, y resource.Quantity) bool { - return x.Cmp(y) == 0 - }), - cmp.Comparer(func(x, y *metav1.Time) bool { - if x == nil && y == nil { - return true - } - if x != nil && y != nil { - return x.Time.Equal(y.Time) - } - return false - }), - } -) +var cmpOptions = []cmp.Option{ + cmp.Comparer(func(x, y resource.Quantity) bool { + return x.Cmp(y) == 0 + }), + cmp.Comparer(func(x, y *metav1.Time) bool { + if x == nil && y == nil { + return true + } + if x != nil && y != nil { + return x.Time.Equal(y.Time) + } + return false + }), +} func Diff(x, y interface{}) string { return cmp.Diff(x, y, cmpOptions...) @@ -78,7 +76,7 @@ func EqualAnnotation(x, y map[string]string) bool { } func JsonDiff(old, new interface{}) (string, error) { - var json = jsoniter.ConfigFastest + json := jsoniter.ConfigFastest oldBytes, err := json.Marshal(old) if err != nil { return "", err diff --git a/vendor/kmodules.xyz/client-go/meta/encoding.go b/vendor/kmodules.xyz/client-go/meta/encoding.go index 44f82a23..46aa784d 100644 --- a/vendor/kmodules.xyz/client-go/meta/encoding.go +++ b/vendor/kmodules.xyz/client-go/meta/encoding.go @@ -169,7 +169,8 @@ func StringToQuantityHookFunc() mapstructure.DecodeHookFunc { return func( f reflect.Type, t reflect.Type, - data interface{}) (interface{}, error) { + data interface{}, + ) (interface{}, error) { if f.Kind() != reflect.String { return data, nil } diff --git a/vendor/kmodules.xyz/client-go/meta/lib.go b/vendor/kmodules.xyz/client-go/meta/lib.go index bb7fdff0..1b3a92b5 100644 --- a/vendor/kmodules.xyz/client-go/meta/lib.go +++ b/vendor/kmodules.xyz/client-go/meta/lib.go @@ -37,7 +37,7 @@ const ( ComponentLabelKey = "app.kubernetes.io/component" ManagedByLabelKey = "app.kubernetes.io/managed-by" - MaxCronJobNameLength = 52 //xref: https://github.com/kubernetes/kubernetes/pull/52733 + MaxCronJobNameLength = 52 // xref: https://github.com/kubernetes/kubernetes/pull/52733 ) var labelKeyBlacklist = []string{ diff --git a/vendor/kmodules.xyz/client-go/tools/backup/manager.go b/vendor/kmodules.xyz/client-go/tools/backup/manager.go index 8900c285..731ebae7 100644 --- a/vendor/kmodules.xyz/client-go/tools/backup/manager.go +++ b/vendor/kmodules.xyz/client-go/tools/backup/manager.go @@ -38,7 +38,6 @@ import ( "k8s.io/client-go/rest" "k8s.io/klog/v2" "sigs.k8s.io/yaml" - "fmt" ) const ( @@ -77,17 +76,17 @@ func (mgr BackupManager) BackupToDir(backupDir string) (string, error) { p := func(relPath string, data []byte) error { absPath := filepath.Join(backupDir, snapshotDir, relPath) dir := filepath.Dir(absPath) - err := os.MkdirAll(dir, 0777) + err := os.MkdirAll(dir, 0o777) if err != nil { return err } - return ioutil.WriteFile(absPath, data, 0644) + return ioutil.WriteFile(absPath, data, 0o644) } return snapshotDir, mgr.Backup(p) } func (mgr BackupManager) BackupToTar(backupDir string) (string, error) { - err := os.MkdirAll(backupDir, 0777) + err := os.MkdirAll(backupDir, 0o777) if err != nil { return "", err } @@ -112,7 +111,7 @@ func (mgr BackupManager) BackupToTar(backupDir string) (string, error) { header := new(tar.Header) header.Name = relPath header.Size = int64(len(data)) - header.Mode = 0666 + header.Mode = 0o666 header.ModTime = t // write the header to the tarball archive if err := tw.WriteHeader(header); err != nil { @@ -194,11 +193,9 @@ func (mgr BackupManager) Backup(process processorFunc) error { item["apiVersion"] = list.GroupVersion item["kind"] = r.Kind - md, ok := item["metadata"] if ok { - fmt.Println("================= Metadata ==================\n",md) - path = generatePath(md,r.Kind) + path = getPathFromSelfLink(md) if mgr.sanitize { cleanUpObjectMeta(md) } @@ -311,20 +308,3 @@ func getPathFromSelfLink(md interface{}) string { } return "" } - -func generatePath(md interface{},kind string) string { - meta, ok := md.(map[string]interface{}) - if ok { - namespace:=getField(meta,"namespace") - name:=getField(meta,"name") - return filepath.Join(namespace,kind,name)+".yaml" - } - return "" -} - -func getField(m map[string]interface{},key string) string { - if v,ok:=m[key];ok{ - return v.(string) - } - return "" -} \ No newline at end of file diff --git a/vendor/kmodules.xyz/client-go/util.go b/vendor/kmodules.xyz/client-go/util.go index 6e602e8d..2add9ddd 100644 --- a/vendor/kmodules.xyz/client-go/util.go +++ b/vendor/kmodules.xyz/client-go/util.go @@ -55,8 +55,10 @@ func IsRequestRetryable(err error) bool { kerr.IsTooManyRequests(err) } -var reMutator = regexp.MustCompile(`^Internal error occurred: admission webhook "[^"]+" denied the request.*$`) -var reValidator = regexp.MustCompile(`^admission webhook "[^"]+" denied the request.*$`) +var ( + reMutator = regexp.MustCompile(`^Internal error occurred: admission webhook "[^"]+" denied the request.*$`) + reValidator = regexp.MustCompile(`^admission webhook "[^"]+" denied the request.*$`) +) func AdmissionWebhookDeniedRequest(err error) bool { return (kerr.IsInternalError(err) && reMutator.MatchString(err.Error())) || diff --git a/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/appbinding_types.go b/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/appbinding_types.go index dba1c9f9..d193e6e1 100644 --- a/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/appbinding_types.go +++ b/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/appbinding_types.go @@ -81,6 +81,10 @@ type AppBindingSpec struct { // +kubebuilder:validation:EmbeddedResource // +kubebuilder:pruning:PreserveUnknownFields Parameters *runtime.RawExtension `json:"parameters,omitempty" protobuf:"bytes,6,opt,name=parameters"` + + // TLSSecret is the name of the secret that will hold + // the client certificate and private key associated with the AppBinding. + TLSSecret *core.LocalObjectReference `json:"tlsSecret,omitempty" protobuf:"bytes,7,opt,name=tlsSecret"` } type AppType string @@ -128,6 +132,12 @@ type ClientConfig struct { // CABundle is a PEM encoded CA bundle which will be used to validate the serving certificate of this app. // +optional CABundle []byte `json:"caBundle,omitempty" protobuf:"bytes,4,opt,name=caBundle"` + + // ServerName is used to verify the hostname on the returned + // certificates unless InsecureSkipVerify is given. It is also included + // in the client's handshake to support virtual hosting unless it is + // an IP address. + ServerName string `json:"serverName,omitempty" protobuf:"bytes,5,opt,name=serverName"` } // ServiceReference holds a reference to Service.legacy.k8s.io diff --git a/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/generated.pb.go b/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/generated.pb.go index 334210f2..e435e226 100644 --- a/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/generated.pb.go +++ b/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/generated.pb.go @@ -544,87 +544,90 @@ func init() { } var fileDescriptor_4577f11f96b23493 = []byte{ - // 1279 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0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 0x0f, 0x00, 0x00, + // 1313 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4d, 0x8f, 0x1b, 0x45, + 0x13, 0xde, 0xf1, 0xe7, 0xba, 0xec, 0xec, 0xee, 0xdb, 0x6f, 0x22, 0xcc, 0x4a, 0xb1, 0x57, 0x83, + 0x84, 0x16, 0xa1, 0x8c, 0xd9, 0x05, 0x45, 0x5c, 0x10, 0xda, 0x09, 0x09, 0x84, 0x98, 0x10, 0xda, + 0x4e, 0x0e, 0x08, 0x04, 0xbd, 0xe3, 0xb6, 0x3d, 0xb1, 0x67, 0x7a, 0xe8, 0x1e, 0x3b, 0x31, 0x42, + 0xc0, 0x81, 0x2b, 0x12, 0xe2, 0x17, 0x71, 0xcc, 0x05, 0x29, 0x37, 0x72, 0xb2, 0x88, 0xf9, 0x05, + 0x5c, 0x38, 0xa0, 0x1c, 0x50, 0xf7, 0xf4, 0x7c, 0xd8, 0x9b, 0x15, 0x89, 0x37, 0x5c, 0x46, 0xd3, + 0x55, 0xd5, 0xcf, 0x53, 0x55, 0x5d, 0x55, 0xdd, 0x70, 0x6d, 0xe4, 0xb1, 0xde, 0x64, 0x4c, 0x85, + 0x75, 0x7f, 0xf6, 0x75, 0xcb, 0x99, 0x88, 0x90, 0x79, 0x97, 0x38, 0x15, 0x6c, 0xc2, 0x1d, 0x2a, + 0x5a, 0x24, 0x70, 0xe5, 0x27, 0x70, 0x48, 0x48, 0xc6, 0x6c, 0xd0, 0x9a, 0x1e, 0x90, 0x71, 0x30, + 0x24, 0x07, 0xad, 0x01, 0xf5, 0x29, 0x27, 0x21, 0xed, 0x59, 0x01, 0x67, 0x21, 0x43, 0x97, 0xb3, + 0x38, 0x56, 0x84, 0xf3, 0x45, 0x82, 0x63, 0x49, 0x1c, 0x2b, 0xc5, 0xb1, 0x62, 0x9c, 0xdd, 0x4b, + 0x03, 0x37, 0x1c,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, 0x2f, 0x1a, 0xc6, 0x83, 0x45, 0xc3, 0x78, + 0xb8, 0x68, 0x18, 0x8f, 0x16, 0x0d, 0xe3, 0xf7, 0x45, 0xc3, 0xf8, 0xe9, 0x8f, 0xc6, 0xc6, 0xa7, + 0x9b, 0x31, 0xda, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x84, 0x5b, 0xc5, 0x15, 0x98, 0x0f, 0x00, + 0x00, } func (m *AddKeyTransform) Marshal() (dAtA []byte, err error) { @@ -814,6 +817,18 @@ func (m *AppBindingSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.TLSSecret != nil { + { + size, err := m.TLSSecret.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } if m.Parameters != nil { { size, err := m.Parameters.MarshalToSizedBuffer(dAtA[:i]) @@ -940,6 +955,11 @@ func (m *ClientConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + i -= len(m.ServerName) + copy(dAtA[i:], m.ServerName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ServerName))) + i-- + dAtA[i] = 0x2a if m.CABundle != nil { i -= len(m.CABundle) copy(dAtA[i:], m.CABundle) @@ -1476,6 +1496,10 @@ func (m *AppBindingSpec) Size() (n int) { l = m.Parameters.Size() n += 1 + l + sovGenerated(uint64(l)) } + if m.TLSSecret != nil { + l = m.TLSSecret.Size() + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -1515,6 +1539,8 @@ func (m *ClientConfig) Size() (n int) { l = len(m.CABundle) n += 1 + l + sovGenerated(uint64(l)) } + l = len(m.ServerName) + n += 1 + l + sovGenerated(uint64(l)) return n } @@ -1736,6 +1762,7 @@ func (this *AppBindingSpec) String() string { `Secret:` + strings.Replace(fmt.Sprintf("%v", this.Secret), "LocalObjectReference", "v1.LocalObjectReference", 1) + `,`, `SecretTransforms:` + repeatedStringForSecretTransforms + `,`, `Parameters:` + strings.Replace(fmt.Sprintf("%v", this.Parameters), "RawExtension", "runtime.RawExtension", 1) + `,`, + `TLSSecret:` + strings.Replace(fmt.Sprintf("%v", this.TLSSecret), "LocalObjectReference", "v1.LocalObjectReference", 1) + `,`, `}`, }, "") return s @@ -1761,6 +1788,7 @@ func (this *ClientConfig) String() string { `Service:` + strings.Replace(this.Service.String(), "ServiceReference", "ServiceReference", 1) + `,`, `InsecureSkipTLSVerify:` + fmt.Sprintf("%v", this.InsecureSkipTLSVerify) + `,`, `CABundle:` + valueToStringGenerated(this.CABundle) + `,`, + `ServerName:` + fmt.Sprintf("%v", this.ServerName) + `,`, `}`, }, "") return s @@ -2591,6 +2619,42 @@ func (m *AppBindingSpec) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TLSSecret", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TLSSecret == nil { + m.TLSSecret = &v1.LocalObjectReference{} + } + if err := m.TLSSecret.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -2914,6 +2978,38 @@ func (m *ClientConfig) Unmarshal(dAtA []byte) error { m.CABundle = []byte{} } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServerName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ServerName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/generated.proto b/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/generated.proto index c2a5a677..946dd4ee 100644 --- a/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/generated.proto +++ b/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/generated.proto @@ -117,6 +117,10 @@ message AppBindingSpec { // +kubebuilder:validation:EmbeddedResource // +kubebuilder:pruning:PreserveUnknownFields optional k8s.io.apimachinery.pkg.runtime.RawExtension parameters = 6; + + // TLSSecret is the name of the secret that will hold + // the client certificate and private key associated with the AppBinding. + optional k8s.io.api.core.v1.LocalObjectReference tlsSecret = 7; } message AppReference { @@ -179,6 +183,12 @@ message ClientConfig { // CABundle is a PEM encoded CA bundle which will be used to validate the serving certificate of this app. // +optional optional bytes caBundle = 4; + + // ServerName is used to verify the hostname on the returned + // certificates unless InsecureSkipVerify is given. It is also included + // in the client's handshake to support virtual hosting unless it is + // an IP address. + optional string serverName = 5; } // ObjectReference contains enough information to let you locate the diff --git a/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/openapi_generated.go b/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/openapi_generated.go index 5e9626da..15d5da28 100644 --- a/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/openapi_generated.go +++ b/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/openapi_generated.go @@ -16015,6 +16015,12 @@ func schema_custom_resources_apis_appcatalog_v1alpha1_AppBindingSpec(ref common. Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), }, }, + "tlsSecret": { + SchemaProps: spec.SchemaProps{ + Description: "TLSSecret is the name of the secret that will hold the client certificate and private key associated with the AppBinding.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, }, Required: []string{"clientConfig"}, }, @@ -16095,6 +16101,13 @@ func schema_custom_resources_apis_appcatalog_v1alpha1_ClientConfig(ref common.Re Format: "byte", }, }, + "serverName": { + SchemaProps: spec.SchemaProps{ + Description: "ServerName is used to verify the hostname on the returned certificates unless InsecureSkipVerify is given. It is also included in the client's handshake to support virtual hosting unless it is an IP address.", + Type: []string{"string"}, + Format: "", + }, + }, }, }, }, diff --git a/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/zz_generated.deepcopy.go b/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/zz_generated.deepcopy.go index 0ce62682..d01e3164 100644 --- a/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1/zz_generated.deepcopy.go @@ -154,6 +154,11 @@ func (in *AppBindingSpec) DeepCopyInto(out *AppBindingSpec) { *out = new(runtime.RawExtension) (*in).DeepCopyInto(*out) } + if in.TLSSecret != nil { + in, out := &in.TLSSecret, &out.TLSSecret + *out = new(v1.LocalObjectReference) + **out = **in + } return } diff --git a/vendor/kmodules.xyz/custom-resources/crds/appcatalog.appscode.com_appbindings.yaml b/vendor/kmodules.xyz/custom-resources/crds/appcatalog.appscode.com_appbindings.yaml index e1b05a65..5c6027ca 100644 --- a/vendor/kmodules.xyz/custom-resources/crds/appcatalog.appscode.com_appbindings.yaml +++ b/vendor/kmodules.xyz/custom-resources/crds/appcatalog.appscode.com_appbindings.yaml @@ -61,6 +61,12 @@ spec: when communicating with this app. This is strongly discouraged. You should use the CABundle instead. type: boolean + serverName: + description: ServerName is used to verify the hostname on the + returned certificates unless InsecureSkipVerify is given. It + is also included in the client's handshake to support virtual + hosting unless it is an IP address. + type: string service: description: "`service` is a reference to the service for this app. Either `service` or `url` must be specified. \n If the @@ -211,6 +217,15 @@ spec: type: object type: object type: array + tlsSecret: + description: TLSSecret is the name of the secret that will hold the + client certificate and private key associated with the AppBinding. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object type: description: Type used to facilitate programmatic handling of application. type: string diff --git a/vendor/kmodules.xyz/prober/api/v1/doc.go b/vendor/kmodules.xyz/prober/api/v1/doc.go index da5db8ad..494a3061 100644 --- a/vendor/kmodules.xyz/prober/api/v1/doc.go +++ b/vendor/kmodules.xyz/prober/api/v1/doc.go @@ -16,4 +16,5 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:openapi-gen=true +// +gencrdrefdocs:force=true package v1 // import "kmodules.xyz/prober/api/v1" diff --git a/vendor/kmodules.xyz/prober/api/v1/openapi_generated.go b/vendor/kmodules.xyz/prober/api/v1/openapi_generated.go index a84f29ce..5b134769 100644 --- a/vendor/kmodules.xyz/prober/api/v1/openapi_generated.go +++ b/vendor/kmodules.xyz/prober/api/v1/openapi_generated.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/vendor/kmodules.xyz/prober/api/v1/zz_generated.deepcopy.go b/vendor/kmodules.xyz/prober/api/v1/zz_generated.deepcopy.go index 7869f6c5..5b76dd83 100644 --- a/vendor/kmodules.xyz/prober/api/v1/zz_generated.deepcopy.go +++ b/vendor/kmodules.xyz/prober/api/v1/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/vendor/modules.txt b/vendor/modules.txt index 5fa886c1..b69886bc 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -73,7 +73,7 @@ github.com/hashicorp/golang-lru/simplelru github.com/imdario/mergo # github.com/inconshreveable/mousetrap v1.0.0 github.com/inconshreveable/mousetrap -# github.com/json-iterator/go v1.1.11 +# github.com/json-iterator/go v1.1.12 github.com/json-iterator/go # github.com/mailru/easyjson v0.7.0 github.com/mailru/easyjson/buffer @@ -83,7 +83,7 @@ github.com/mailru/easyjson/jwriter github.com/mitchellh/mapstructure # github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd github.com/modern-go/concurrent -# github.com/modern-go/reflect2 v1.0.1 +# github.com/modern-go/reflect2 v1.0.2 github.com/modern-go/reflect2 # github.com/pkg/errors v0.9.1 github.com/pkg/errors @@ -159,7 +159,7 @@ gomodules.xyz/pointer gomodules.xyz/sets # gomodules.xyz/wait v0.2.0 gomodules.xyz/wait -# gomodules.xyz/x v0.0.10 +# gomodules.xyz/x v0.0.13 ## explicit gomodules.xyz/x/arrays gomodules.xyz/x/version @@ -211,7 +211,6 @@ gopkg.in/inf.v0 # gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v2 # k8s.io/api v0.21.1 => k8s.io/api v0.21.1 -## explicit k8s.io/api/admissionregistration/v1 k8s.io/api/admissionregistration/v1beta1 k8s.io/api/apiserverinternal/v1alpha1 @@ -505,7 +504,7 @@ k8s.io/utils/buffer k8s.io/utils/integer k8s.io/utils/pointer k8s.io/utils/trace -# kmodules.xyz/client-go v0.0.0-20220203031013-1de48437aaf3 +# kmodules.xyz/client-go v0.0.0-20220308080632-2543b61b64fd ## explicit kmodules.xyz/client-go kmodules.xyz/client-go/api/v1 @@ -517,7 +516,7 @@ kmodules.xyz/client-go/dynamic kmodules.xyz/client-go/meta kmodules.xyz/client-go/tools/backup kmodules.xyz/client-go/tools/clusterid -# kmodules.xyz/custom-resources v0.0.0-20220208103158-61b298634e43 +# kmodules.xyz/custom-resources v0.0.0-20220317043135-5c76c52c975d ## explicit kmodules.xyz/custom-resources/apis/appcatalog kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1 @@ -531,12 +530,12 @@ kmodules.xyz/custom-resources/client/clientset/versioned/typed/appcatalog/v1alph kmodules.xyz/custom-resources/client/clientset/versioned/typed/auditor/v1alpha1 kmodules.xyz/custom-resources/client/clientset/versioned/typed/metrics/v1alpha1 kmodules.xyz/custom-resources/crds -# kmodules.xyz/objectstore-api v0.0.0-20211207131029-3271069de43e +# kmodules.xyz/objectstore-api v0.0.0-20220317043839-8f754cdffcf0 kmodules.xyz/objectstore-api/api/v1 -# kmodules.xyz/offshoot-api v0.0.0-20211207130839-cc7187e020cf +# kmodules.xyz/offshoot-api v0.0.0-20220317044008-01567138fc2f ## explicit kmodules.xyz/offshoot-api/api/v1 -# kmodules.xyz/prober v0.0.0-20210618020259-5836fb959027 +# kmodules.xyz/prober v0.0.0-20220317043828-5ae0114adcad kmodules.xyz/prober/api/v1 # sigs.k8s.io/controller-runtime v0.9.0 sigs.k8s.io/controller-runtime/pkg/client @@ -550,8 +549,9 @@ sigs.k8s.io/structured-merge-diff/v4/typed sigs.k8s.io/structured-merge-diff/v4/value # sigs.k8s.io/yaml v1.2.0 sigs.k8s.io/yaml -# stash.appscode.dev/apimachinery v0.18.1-0.20220316053843-5bd9e9bde0fd +# stash.appscode.dev/apimachinery v0.18.1-0.20220321055929-ee132c17707b ## explicit +stash.appscode.dev/apimachinery/apis stash.appscode.dev/apimachinery/apis/repositories stash.appscode.dev/apimachinery/apis/repositories/v1alpha1 stash.appscode.dev/apimachinery/apis/stash diff --git a/vendor/stash.appscode.dev/apimachinery/apis/constants.go b/vendor/stash.appscode.dev/apimachinery/apis/constants.go new file mode 100644 index 00000000..82ad0034 --- /dev/null +++ b/vendor/stash.appscode.dev/apimachinery/apis/constants.go @@ -0,0 +1,184 @@ +/* +Copyright AppsCode Inc. and Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +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 apis + +import "time" + +const ( + StashDockerRegistry = "STASH_DOCKER_REGISTRY" + StashDockerImage = "STASH_DOCKER_IMAGE" + StashImageTag = "STASH_IMAGE_TAG" + ImageStash = "stash" + + Namespace = "NAMESPACE" + BackupSession = "BACKUP_SESSION" + RestoreSession = "RESTORE_SESSION" + + RepositoryName = "REPOSITORY_NAME" + RepositoryNamespace = "REPOSITORY_NAMESPACE" + RepositoryProvider = "REPOSITORY_PROVIDER" + RepositorySecretName = "REPOSITORY_SECRET_NAME" + RepositorySecretNamespace = "REPOSITORY_SECRET_NAMESPACE" + RepositoryBucket = "REPOSITORY_BUCKET" + RepositoryPrefix = "REPOSITORY_PREFIX" + RepositoryEndpoint = "REPOSITORY_ENDPOINT" + RepositoryRegion = "REPOSITORY_REGION" + + Hostname = "HOSTNAME" + SourceHostname = "SOURCE_HOSTNAME" + InterimDataDir = "INTERIM_DATA_DIR" + + TargetName = "TARGET_NAME" + TargetAPIVersion = "TARGET_API_VERSION" + TargetKind = "TARGET_KIND" + TargetResource = "TARGET_RESOURCE" + TargetNamespace = "TARGET_NAMESPACE" + TargetMountPath = "TARGET_MOUNT_PATH" + TargetPaths = "TARGET_PATHS" + + TargetAppVersion = "TARGET_APP_VERSION" + TargetAppType = "TARGET_APP_TYPE" + TargetAppGroup = "TARGET_APP_GROUP" + TargetAppResource = "TARGET_APP_RESOURCE" + TargetAppReplicas = "TARGET_APP_REPLICAS" + + InvokerKind = "INVOKER_KIND" + InvokerName = "INVOKER_NAME" + AddonImage = "ADDON_IMAGE" + + ExcludePatterns = "EXCLUDE_PATTERNS" + IncludePatterns = "INCLUDE_PATTERNS" + + RestorePaths = "RESTORE_PATHS" + RestoreSnapshots = "RESTORE_SNAPSHOTS" + + RetentionKeepLast = "RETENTION_KEEP_LAST" + RetentionKeepHourly = "RETENTION_KEEP_HOURLY" + RetentionKeepDaily = "RETENTION_KEEP_DAILY" + RetentionKeepWeekly = "RETENTION_KEEP_WEEKLY" + RetentionKeepMonthly = "RETENTION_KEEP_MONTHLY" + RetentionKeepYearly = "RETENTION_KEEP_YEARLY" + RetentionKeepTags = "RETENTION_KEEP_TAGS" + RetentionPrune = "RETENTION_PRUNE" + RetentionDryRun = "RETENTION_DRY_RUN" + + // default true + // false when TmpDir.DisableCaching is true in backupConfig/restoreSession + EnableCache = "ENABLE_CACHE" + MaxConnections = "MAX_CONNECTIONS" + + PushgatewayURL = "PROMETHEUS_PUSHGATEWAY_URL" + PrometheusJobName = "PROMETHEUS_JOB_NAME" + + StashDefaultVolume = "stash-volume" + StashDefaultMountPath = "/stash-data" + StashInterimVolume = "stash-interim-volume" + StashInterimVolumeMountPath = "/stash-interim-volume" + StashInterimDataDir = "/stash-interim-volume/data" + + // backup or restore hooks + HookType = "HOOK_TYPE" + PreBackupHook = "preBackup" + PostBackupHook = "postBackup" + PreRestoreHook = "preRestore" + PostRestoreHook = "postRestore" + PreTaskHook = "pre-task-hook" + PostTaskHook = "post-task-hook" + + // License related constants + LicenseApiService = "LICENSE_APISERVICE" + LicenseReader = "appscode:license-reader" +) + +const ( + PrefixStashBackup = "stash-backup" + PrefixStashRestore = "stash-restore" + PrefixStashVolumeSnapshot = "stash-vs" + PrefixStashTrigger = "stash-trigger" + + StashContainer = "stash" + StashInitContainer = "stash-init" + StashCronJobContainer = "stash-trigger" + LocalVolumeName = "stash-local" + ScratchDirVolumeName = "stash-scratchdir" + TmpDirVolumeName = "tmp-dir" + TmpDirMountPath = "/tmp" + PodinfoVolumeName = "stash-podinfo" + + RecoveryJobPrefix = "stash-recovery-" + ScaledownCronPrefix = "stash-scaledown-cron-" + CheckJobPrefix = "stash-check-" + + AnnotationRestic = "restic" + AnnotationRecovery = "recovery" + AnnotationOperation = "operation" + AnnotationOldReplica = "old-replica" + + OperationRecovery = "recovery" + OperationCheck = "check" + + AppLabelStash = "stash" + AppLabelStashV1Beta1 = "stash-v1beta1" + OperationScaleDown = "scale-down" + + RepositoryFinalizer = "stash" + SnapshotIDLength = 8 + + ModelSidecar = "sidecar" + ModelCronJob = "cronjob" + LabelApp = "app" + LabelInvokerType = StashKey + "/invoker-type" + LabelInvokerName = StashKey + "/invoker-name" + StashSecretVolume = "stash-secret-volume" + StashSecretMountDir = "/etc/stash/repository/secret" + StashNetVolAccessor = "stash-netvol-accessor" + + KeyPodName = "POD_NAME" + KeyNodeName = "NODE_NAME" + KeyPodOrdinal = "POD_ORDINAL" + + RetryInterval = 50 * time.Millisecond + ReadinessTimeout = 2 * time.Minute +) + +const ( + CallerWebhook = "webhook" + CallerController = "controller" + DefaultHost = "host-0" +) + +// ==================== Prometheus metrics related constants ============ +const ( + PromJobStashBackup = "stash-backup" + PromJobStashRestore = "stash-restore" +) + +// ==================== RBAC related constants ========================== +const ( + KindRole = "Role" + KindClusterRole = "ClusterRole" + + StashBackupJobClusterRole = "stash-backup-job" + StashRestoreJobClusterRole = "stash-restore-job" + StashCronJobClusterRole = "stash-cron-job" + StashSidecarClusterRole = "stash-sidecar" + StashRestoreInitContainerClusterRole = "stash-restore-init-container" + + StashVolumeSnapshotterClusterRole = "stash-vs-job" + StashVolumeSnapshotRestorerClusterRole = "stash-vs-restorer-job" + StashStorageClassReaderClusterRole = "stash-sc-reader" +) diff --git a/vendor/stash.appscode.dev/apimachinery/apis/repositories/v1alpha1/openapi_generated.go b/vendor/stash.appscode.dev/apimachinery/apis/repositories/v1alpha1/openapi_generated.go index f9e3f5ec..af1daae3 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/repositories/v1alpha1/openapi_generated.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/repositories/v1alpha1/openapi_generated.go @@ -17298,6 +17298,12 @@ func schema_custom_resources_apis_appcatalog_v1alpha1_AppBindingSpec(ref common. Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), }, }, + "tlsSecret": { + SchemaProps: spec.SchemaProps{ + Description: "TLSSecret is the name of the secret that will hold the client certificate and private key associated with the AppBinding.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, }, Required: []string{"clientConfig"}, }, @@ -17378,6 +17384,13 @@ func schema_custom_resources_apis_appcatalog_v1alpha1_ClientConfig(ref common.Re Format: "byte", }, }, + "serverName": { + SchemaProps: spec.SchemaProps{ + Description: "ServerName is used to verify the hostname on the returned certificates unless InsecureSkipVerify is given. It is also included in the client's handshake to support virtual hosting unless it is an IP address.", + Type: []string{"string"}, + Format: "", + }, + }, }, }, }, diff --git a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1alpha1/openapi_generated.go b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1alpha1/openapi_generated.go index 93854961..643233bb 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1alpha1/openapi_generated.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1alpha1/openapi_generated.go @@ -17303,6 +17303,12 @@ func schema_custom_resources_apis_appcatalog_v1alpha1_AppBindingSpec(ref common. Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), }, }, + "tlsSecret": { + SchemaProps: spec.SchemaProps{ + Description: "TLSSecret is the name of the secret that will hold the client certificate and private key associated with the AppBinding.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, }, Required: []string{"clientConfig"}, }, @@ -17383,6 +17389,13 @@ func schema_custom_resources_apis_appcatalog_v1alpha1_ClientConfig(ref common.Re Format: "byte", }, }, + "serverName": { + SchemaProps: spec.SchemaProps{ + Description: "ServerName is used to verify the hostname on the returned certificates unless InsecureSkipVerify is given. It is also included in the client's handshake to support virtual hosting unless it is an IP address.", + Type: []string{"string"}, + Format: "", + }, + }, }, }, }, diff --git a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/openapi_generated.go b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/openapi_generated.go index ec9283ec..aa10b9af 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/openapi_generated.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/openapi_generated.go @@ -17346,6 +17346,12 @@ func schema_custom_resources_apis_appcatalog_v1alpha1_AppBindingSpec(ref common. Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), }, }, + "tlsSecret": { + SchemaProps: spec.SchemaProps{ + Description: "TLSSecret is the name of the secret that will hold the client certificate and private key associated with the AppBinding.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, }, Required: []string{"clientConfig"}, }, @@ -17426,6 +17432,13 @@ func schema_custom_resources_apis_appcatalog_v1alpha1_ClientConfig(ref common.Re Format: "byte", }, }, + "serverName": { + SchemaProps: spec.SchemaProps{ + Description: "ServerName is used to verify the hostname on the returned certificates unless InsecureSkipVerify is given. It is also included in the client's handshake to support virtual hosting unless it is an IP address.", + Type: []string{"string"}, + Format: "", + }, + }, }, }, }, diff --git a/vendor/stash.appscode.dev/apimachinery/apis/ui/v1alpha1/openapi_generated.go b/vendor/stash.appscode.dev/apimachinery/apis/ui/v1alpha1/openapi_generated.go index a6bf8d2f..b4576b0c 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/ui/v1alpha1/openapi_generated.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/ui/v1alpha1/openapi_generated.go @@ -17298,6 +17298,12 @@ func schema_custom_resources_apis_appcatalog_v1alpha1_AppBindingSpec(ref common. Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), }, }, + "tlsSecret": { + SchemaProps: spec.SchemaProps{ + Description: "TLSSecret is the name of the secret that will hold the client certificate and private key associated with the AppBinding.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, }, Required: []string{"clientConfig"}, }, @@ -17378,6 +17384,13 @@ func schema_custom_resources_apis_appcatalog_v1alpha1_ClientConfig(ref common.Re Format: "byte", }, }, + "serverName": { + SchemaProps: spec.SchemaProps{ + Description: "ServerName is used to verify the hostname on the returned certificates unless InsecureSkipVerify is given. It is also included in the client's handshake to support virtual hosting unless it is an IP address.", + Type: []string{"string"}, + Format: "", + }, + }, }, }, }, diff --git a/vendor/stash.appscode.dev/apimachinery/apis/util.go b/vendor/stash.appscode.dev/apimachinery/apis/util.go new file mode 100644 index 00000000..288ba0d2 --- /dev/null +++ b/vendor/stash.appscode.dev/apimachinery/apis/util.go @@ -0,0 +1,56 @@ +/* +Copyright AppsCode Inc. and Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +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 apis + +const ( + StashKey = "stash.appscode.com" + VersionTag = StashKey + "/tag" + + KeyDeleteJobOnCompletion = StashKey + "/delete-job-on-completion" + AllowDeletingJobOnCompletion = "true" +) + +const ( + KindDeployment = "Deployment" + KindReplicaSet = "ReplicaSet" + KindReplicationController = "ReplicationController" + KindStatefulSet = "StatefulSet" + KindDaemonSet = "DaemonSet" + KindPod = "Pod" + KindPersistentVolumeClaim = "PersistentVolumeClaim" + KindAppBinding = "AppBinding" + KindDeploymentConfig = "DeploymentConfig" + KindSecret = "Secret" + KindService = "Service" + KindJob = "Job" + KindCronJob = "CronJob" + KindNamespace = "Namespace" +) + +const ( + ResourcePluralDeployment = "deployments" + ResourcePluralReplicaSet = "replicasets" + ResourcePluralReplicationController = "replicationcontrollers" + ResourcePluralStatefulSet = "statefulsets" + ResourcePluralDaemonSet = "daemonsets" + ResourcePluralPod = "pods" + ResourcePluralPersistentVolumeClaim = "persistentvolumeclaims" + ResourcePluralAppBinding = "appbindings" + ResourcePluralDeploymentConfig = "deploymentconfigs" + ResourcePluralSecret = "secrets" + ResourcePluralService = "services" +)